Quoting from #1285:
They are runtime loadable (dlopen, or equivalent, from tcl program, via
'load') rather than shared libraries for dynamic linking by others. On OS X,
these two concepts have different extensions (.so vs .dylib). It's confusing
when a runtime-loadable module has a dynamic-linker extension. In commit
40123aedcd2761e98d8c9917be6040ea6187c97f, the -module flag was added to
LDFLAGS in tclpkg/gv/Makefile.am, which fixes libgv_tcl.
Could the same change be applied to the other tclpkg/*/Makefile.am LDFLAGS?
Gitlab: fixes #1285
Suggested-by: Daniel Macks
- Failed assertion in `chkSgraph` for circo layout and ortho splines. #1990
- Segmentation Fault with splines="ortho". #1658
- Transparent Label appear in SVG output #146
+- Binary tcl modules should compile with -module #1285
## [4.0.0] – 2022-05-29
libgdtclft_la_SOURCES = gdtclft.c
libgdtclft_C_la_SOURCES = gdtclft.c
-libgdtclft_la_LDFLAGS = -no-undefined
+libgdtclft_la_LDFLAGS = -no-undefined -module -avoid-version
if WITH_LIBGD
libgdtclft_la_LIBADD = \
tcldot-io.c \
no_builtins.c $(GDTCLFT)
libtcldot_la_CPPFLAGS = $(AM_CPPFLAGS) -DDEMAND_LOADING=1
-libtcldot_la_LDFLAGS = -no-undefined
+libtcldot_la_LDFLAGS = -no-undefined -module -avoid-version
libtcldot_la_LIBADD = $(TCLHANDLE_LIBS) $(GDTCLFT_LIBS) \
$(top_builddir)/tclpkg/tclstubs/libtclstubs_C.la \
tcldot-io.c \
tcldot_builtins.c $(GDTCLFT)
libtcldot_builtin_la_CPPFLAGS = $(AM_CPPFLAGS) -DDEMAND_LOADING=1
-libtcldot_builtin_la_LDFLAGS = -no-undefined
+libtcldot_builtin_la_LDFLAGS = -no-undefined -module -avoid-version
libtcldot_builtin_la_LIBADD = $(TCLHANDLE_LIBS) \
$(top_builddir)/plugin/dot_layout/libgvplugin_dot_layout_C.la \
endif
libtclhandle_C_la_SOURCES = tclhandle.c
+libtclhandle_C_la_LDFLAGS = -module -avoid-version
-I$(top_srcdir)/tclpkg/tclhandle \
-I$(top_srcdir)/lib/pathplan $(TCL_INCLUDES)
libtclplan_la_CFLAGS = $(TCL_CFLAGS)
-libtclplan_la_LDFLAGS = -no-undefined
+libtclplan_la_LDFLAGS = -no-undefined -module -avoid-version
libtclplan_la_LIBADD = \
$(top_builddir)/tclpkg/tclhandle/libtclhandle_C.la \
$(top_builddir)/tclpkg/tclstubs/libtclstubs_C.la \
libtclstubs_C_la_SOURCES = tclStubLib.c
libtclstubs_C_la_CPPFLAGS = $(TCL_CFLAGS) $(TCL_INCLUDES)
libtclstubs_C_la_LIBADD = $(TCL_STUB_LIB_SPEC)
+libtclstubs_C_la_LDFLAGS = -module -avoid-version
endif
endif
-libtkspline_la_LDFLAGS = -no-undefined
+libtkspline_la_LDFLAGS = -no-undefined -module -avoid-version
libtkspline_la_SOURCES = tkspline.c
libtkspline_la_LIBADD = \
$(top_builddir)/tclpkg/tkstubs/libtkstubs_C.la \
libtkstubs_C_la_SOURCES = tkStubLib.c tkStubImg.c
libtkstubs_C_la_CPPFLAGS = $(TCL_CFLAGS) $(TK_CFLAGS) $(TCL_INCLUDES) $(TK_INCLUDES) $(TK_XINCLUDES)
libtkstubs_C_la_LIBADD = $(TK_STUB_LIB_SPEC)
+libtkstubs_C_la_LDFLAGS = -module -avoid-version