mgieseki / dvisvgm

A fast DVI, EPS, and PDF to SVG converter
https://dvisvgm.de
GNU General Public License v3.0
295 stars 28 forks source link

dvisvgm fails to build against ghostscript-10.00.0 #195

Closed pierre-labastie closed 1 year ago

pierre-labastie commented 1 year ago

With ghostscript-10.00.0, I get:

libtool: link: g++ -Wall -Wnon-virtual-dtor -I../libs/clipper -I../libs/variant/include -I/opt/texlive/2022/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 -I../libs/xxHash -g -O2 -Wno-mismatched-tags -o dvisvgm dvisvgm.o  -L/opt/texlive/2022/lib ./.libs/libdvisvgm.a ../libs/clipper/libclipper.a -lfreetype ../libs/xxHash/libxxhash.a ../libs/ff-woff/libfontforge.a -lwoff2enc -lbrotlienc -lcrypto -lz -lpotrace -lgs -lkpathsea
/usr/bin/ld: ./.libs/libdvisvgm.a(Ghostscript.o): in function `Ghostscript::error_name(int)':
/sources/dvisvgm/dvisvgm-2.14/src/Ghostscript.cpp:382: undefined reference to `gs_error_names'
collect2: error: ld returned 1 exit status

I think the reason is that ghostscript now has -fvisibility-hidden, and gs_error_names is private. I guess the solution here is to always use error_names, as in the win32 case.

mgieseki commented 1 year ago

Thank you for pointing this out. Using error_names for all builds indeed seems to be the easiest way to fix it. I'll commit a patch that removes gs_error_names.