dvisvgm needs rebuild to support ghostscript 10

Bruno Voisin bvoisin at icloud.com
Wed Nov 30 16:33:26 CET 2022


Uwe Siart wrote:

> Bruno Voisin via tex-live <tex-live at tug.org> writes:
> 
>> I agree with karl though: there's no need for a binary rebuild before
>> TL 2023, the problem is easily taken care of using --libgs or
>> exporting LIBGS.
> 
> TL22 reverted back to GS 9.56.1. Is this not necessary then and TL could
> get back to GS 10?

Not sure what you mean by either (revert back to GS 9.56.1 or get back to GS 10).

MacTeX 2022 <https://www.tug.org/mactex/mactex-download.html> includes GS 9.55, and separate packages for GS 9.56.1 and 10.00 are available from Dick Koch's page <https://pages.uoregon.edu/koch/> (Dick being the person who builds MacTeX).

Using GS 9.55 or 9.56.1 solves the issue of TL22's dvisvgm requiring GS 9.

But the other issue, specific to macOS 13 Ventura and the latest versions of macOS 12 Monterey (I don't know when exactly dlopen changed its behaviour, the man page describing the new behaviour is dated January 20, 2022), is not a matter of GS 9 vs. 10. It's a matter of /usr/local/lib no longer being in the default search path for libgs (when the dvisvgm runtime is hardened, as is required for distribution inside a package such as MacTeX).

You need to use either of

dvisvgm --libgs=/usr/local/lib/libgs.dylib
env LIBGS=/usr/local/lib/libgs.dylib dvisvgm

(or put an "export LIBGS=/usr/local/lib/libgs.dylib" in your ~/.zprofile).

I just tested on my setup (MacTeX 2022, Ghostscript 10.00, Ventura 13.1 Beta), to be sure. Without:

% dvisvgm -V1
dvisvgm 2.13.3
--------------
brotli:    1.0.9
clipper:   6.2.1
fontforge: 20160721
freetype:  2.11.1
kpathsea:  6.3.4
potrace:   1.16
xxhash:    0.8.1
zlib:      1.2.11

% dvisvgm -l
bgcolor    background color special
color      complete support of color specials
dvisvgm    special set for embedding raw SVG snippets
em         line drawing statements of the emTeX special set
html       hyperref specials
papersize  special to set the page size
pdf        PDF hyperlink, font map, and pagesize specials
tpic       TPIC specials

With:

% dvisvgm --libgs=/usr/local/lib/libgs.dylib -V1
dvisvgm 2.13.3
--------------
brotli:      1.0.9
clipper:     6.2.1
fontforge:   20160721
freetype:    2.11.1
Ghostscript: 10.0.0
kpathsea:    6.3.4
potrace:     1.16
xxhash:      0.8.1
zlib:        1.2.11

% dvisvgm --libgs=/usr/local/lib/libgs.dylib -l
bgcolor    background color special
color      complete support of color specials
dvisvgm    special set for embedding raw SVG snippets
em         line drawing statements of the emTeX special set
html       hyperref specials
papersize  special to set the page size
pdf        PDF hyperlink, font map, and pagesize specials
ps         dvips PostScript specials
tpic       TPIC specials

This doesn't solve, though, the third issue mentioned by Martin Gieseking, about the GS changes regarding the visibility of some symbols. For these, it's likely you need to rebuild. As Karl wrote in a message, this is reasonably simple. On the Mac, you need Xcode or the Command Line Tools (installed with "xcode-select --install").

What I did is based on the instructions at <https://tug.org/texlive/doc/tlbuild.html#Build-one-package> with one change (rsync is blocked by my university's firewall, and macOS no longer includes svn):

- Get the TeX Live 2022 sources (68 MB) from one of the mirrors listed at <https://tug.org/historic/>, for example

https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2022/texlive-20220321-source.tar.xz

- Unpack, apply the three patches

https://github.com/mgieseki/dvisvgm/commit/9bf81fd0b6e7876e5079e917ed7e12163b9e7f7f
https://github.com/mgieseki/dvisvgm/commit/46b11c02a46883309a824e3fc798f8093041daec
https://github.com/mgieseki/dvisvgm/commit/91fc7f5bec8d734d0d40443627f30ebeb8824269

to texk/dvisvgm/dvisvgm-src/src/Ghostscript.cpp.

- cd to texlive-20220321-source. Then

   mkdir Work && cd Work

   ../configure --disable-all-pkgs --enable-dvisvgm -C CFLAGS=-g CXXFLAGS=-g

   make

   cd texk/dvisvgm && make check

That's it, your ready-to-use patched dvisvgm is at Work/texk/dvisvgm/dvisvgm-src/src/dvisvgm.

Bruno Voisin

PS If you answer this message please add me as cc, I'm not subscribed to the list.




More information about the tex-live mailing list.