[tlbuild] Unable to compile dvisvgm (linux x86_64, system libs)

Ken Moffat zarniwhoop at ntlworld.com
Wed Mar 7 12:31:36 CET 2018


I'm trying to compile r46857 on current linuxfromscratch (gcc-7.3,
glibc-2.27, ghostscript-9.22) for early testing with system
libraries.  But after working around a system poppler C++ error by
disabling that and xpdf (will try other workarounds when I can
complete the build, I believe g++-7.3 defaults to c++14 ?) dvisvgm.o
fails to link :

libtool: link: g++ -Wimplicit -Wreturn-type -Wnon-virtual-dtor -I../../../../../texk/dvisvgm/dvisvgm-src/libs/clipper -I../../../../../texk/dvisvgm/dvisvgm-src/libs/variant/include -I../../../../../texk/dvisvgm/dvisvgm-src/libs/xxHash -I../../../../../texk/dvisvgm/dvisvgm-src/libs/brotli/include -I../../../../../texk/dvisvgm/dvisvgm-src/libs/woff2/include -I/scratch/working/texlive-2018r46857-source/texlive-build/texk -I/scratch/working/texlive-2018r46857-source/texk -I/scratch/working/texlive-2018r46857-source/texlive-build/libs/potrace/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -march=native -o .libs/dvisvgm dvisvgm.o  libdvisvgm.a ../libs/clipper/libclipper.a ../libs/xxHash/libxxhash.a ../libs/ff-woff/libfontforge.a ../libs/woff2/libwoff2.a ../libs/brotli/libbrotli.a /scratch/working/texlive-2018r46857-source/texlive-build/texk/kpathsea/.libs/libkpathsea.so /scratch/working/texlive-2018r46857-source/texlive-build/libs/potrace/libpotrace.a -lfreetype -lz -ldl
libdvisvgm.a(Ghostscript.o): In function `Ghostscript::~Ghostscript()':
Ghostscript.cpp:(.text+0xd0): undefined reference to `gsapi_exit'

Note that the system libs are -lfreetype -lz -ldl.

On the exact same system, I built and installed the 20170524 source
with one or two patches, and there the corresponding link command
was

libtool: link: g++ -Wimplicit -Wreturn-type -Wnon-virtual-dtor -I../../../../../texk/dvisvgm/dvisvgm-src/libs/clipper -I../../../../../texk/dvisvgm/dvisvgm-src/libs/xxHash -I../../../../../texk/dvisvgm/dvisvgm-src/libs/woff2/brotli/enc -I../../../../../texk/dvisvgm/dvisvgm-src/libs/woff2/src -I/scratch/working/texlive-20170524-source/texlive-build/texk -I/scratch/working/texlive-20170524-source/texk -I/scratch/working/texlive-20170524-source/texlive-build/libs/potrace/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -march=native -o .libs/dvisvgm dvisvgm.o  libdvisvgm.a ../libs/clipper/libclipper.a ../libs/xxHash/libxxhash.a ../libs/ff-woff/libfontforge.a ../libs/woff2/libwoff2.a ../libs/woff2/brotli/libbrotli.a /scratch/working/texlive-20170524-source/texlive-build/texk/kpathsea/.libs/libkpathsea.so /scratch/working/texlive-20170524-source/texlive-build/libs/potrace/libpotrace.a -lfreetype -lz -lgs

with system libs of -lfreetype -lz -lgs

So the current source decides to use -ldl instead of -lgs.  Clearly
I do have libgs.so, but it is not found when using this approach.

ĸen
-- 
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
                                     - Unseen Academicals



More information about the tlbuild mailing list