[tlbuild] Linking problem with pplib
Ken Brown
kbrow1i at gmail.com
Sun May 17 03:40:59 CEST 2020
I just did a test build on Cygwin and got "undefined reference" errors when
linking luatex, luahbtex, and xetex. The problem is that pplib uses symbols
defined by zlib but appears after it on the link command line. The attached
patch fixes the problem.
Ken
-------------- next part --------------
diff --git a/texk/web2c/luatexdir/am/luatex.am b/texk/web2c/luatexdir/am/luatex.am
index bf2065978..93333ba58 100644
--- a/texk/web2c/luatexdir/am/luatex.am
+++ b/texk/web2c/luatexdir/am/luatex.am
@@ -95,11 +95,11 @@ luahbtex_LDFLAGS = -export-dynamic
luajithbtex_LDFLAGS = -export-dynamic $(LUAJIT_LDEXTRA)
luatex_postldadd = libmplibcore.a
-luatex_postldadd += $(ZZIPLIB_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS) $(PPLIB_LIBS)
+luatex_postldadd += $(ZZIPLIB_LIBS) $(LIBPNG_LIBS) $(PPLIB_LIBS) $(ZLIB_LIBS)
luatex_postldadd += $(LDADD) libmputil.a libunilib.a libmd5.a $(lua_socketlibs)
luahbtex_postldadd = libmplibcore.a
-luahbtex_postldadd += $(ZZIPLIB_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS) $(HARFBUZZ_LIBS) $(GRAPHITE2_LIBS) $(PPLIB_LIBS)
+luahbtex_postldadd += $(ZZIPLIB_LIBS) $(LIBPNG_LIBS) $(HARFBUZZ_LIBS) $(GRAPHITE2_LIBS) $(PPLIB_LIBS) $(ZLIB_LIBS)
luahbtex_postldadd += $(LDADD) libmputil.a libunilib.a libmd5.a $(lua_socketlibs)
diff --git a/texk/web2c/xetexdir/am/xetex.am b/texk/web2c/xetexdir/am/xetex.am
index 04e7f9ca9..ec34981a1 100644
--- a/texk/web2c/xetexdir/am/xetex.am
+++ b/texk/web2c/xetexdir/am/xetex.am
@@ -39,8 +39,8 @@ xetex_ldadd += $(ICU_LIBS) $(ICU_LIBS_EXTRA)
xetex_ldadd += $(TECKIT_LIBS)
xetex_ldadd += $(LIBPNG_LIBS)
xetex_ldadd += $(FREETYPE2_LIBS)
-xetex_ldadd += $(ZLIB_LIBS)
xetex_ldadd += $(PPLIB_LIBS)
+xetex_ldadd += $(ZLIB_LIBS)
xetex_ldadd += libmd5.a
xetex_dependencies = $(proglib)
xetex_dependencies += $(KPATHSEA_DEPEND)
More information about the tlbuild
mailing list.