[tex-live] dvisvgm with libgs on mac os x

Mojca Miklavec mojca.miklavec.lists at gmail.com
Mon Mar 12 00:26:16 CET 2018


On 12 March 2018 at 00:02, jfbu wrote:
> hi,
>
> asking for help on how to compile dvisvgm from TeXLive sources
> so that it can locate the libgs library on my mac which is at
> /opt/local/lib
>
> (/opt/local/lib/libgs.dylib is a symlink to libgs.9.22.dylib)
>
> With the vanilla ./Build produced dvisvgm, I need to pass --libgs option
> to dvisvgm binary when using it like this
>
> $ dvisvgm --libgs="/opt/local/lib/libgs.dylib" temp.dvi
>
> and it does work fine (temp.dvi contains 18 postscript specials)

I would try with
    export LDFLAGS="-L/opt/local/lib"
    export CXXFLAGS="-I/opt/local/include"

But keep in mind that when ghostscript gets updated, you might need to
recompile the binary. Why don't you use
    sudo port install dvisvgm
instead?

I tried to update it just now (the latest version is not in the repo
yet). Two tests fail:
FAIL: DVIReaderTest
FAIL: FontManagerTest
but I'm not sure about how the situation was before.

> I tried to play with the configure options listed at
>
> http://tug.org/texlive/doc/tlbuild.html#Configure-options-for-texk_002fdvisvgm
>
> my last attempt did
>
> Work$ ../configure --disable-all-pkgs --disable-native-texlive-build --enable-multiplatform --prefix="/opt/local" --disable-cxx-runtime-hack --enable-dvisvgm --with-system-libgs --with-libgs-includes="/opt/local/include/ghostscript" --with-libgs-libdir="/opt/local/lib/"
>
> but it did not seem to succeed.
>
> Is there something wrong in my environment variables

No. But when neither pkg-config nor cmake know where to find the
binaries, you need to provide explicit hints.

> (I noticed /opt/local/lib is not in my PATH, I have no idea if that matters)

It should not be.

> I googled a bit for location of dylib's on the mac, and found no
> immediately usable answer

They are spread all over the place. The dylibs in /opt/local/lib
(usually) come from MacPorts, but that's by far not the only place
where you can find them. Usually each .app bundle ships its own copy
of libraries.

Mojca



More information about the tex-live mailing list