Hello Hraban, On Sun Sep 5, 2021 at 4:15 PM CEST, Henning Hraban Ramm via ntg-context wrote:
Hi again,
the LMTX zint module uses libzint, while MkIV calls the zint binary. The latter works for me, the first not.
On MacOS, the library is "/opt/local/lib/libzint.dylib"*. I changed that in the source and the file appears to be found. Could you add that, Hans?
From libraries-mkiv:
It is best to keep libraries in a place where you can keep an eye on them being updated, like c:/data/tex-context/tex/texmf-win64/bin/lib/luametatex/foo/libfoo.dll You could of course use the ones provided by the system or maybe use symbolic links so that you still keep en eye on changes. On Linux I get: resolvers > libraries > library 'libzint' resolved via 'tds lib' path to '/home/michal/src/context/tex/texmf-linux-64/bin/lib/luametatex/zint/libzint.so' where the file is a copy of the system library. You probably need a similar setup (but you should prefer symlink), also with a ".so" extension as that's what ConTeXt uses on non Windows systems.
*) Previously, zint for MacOS was only available via HomeBrew; I don’t know where that would install libzint, probably in /usr/local/lib/ like on Linux. Yesterday a MacPorts port was added that I used; MacPorts install everything under /opt/.
In libs-ini.lua essentially three ways are tried: 1) TDS search, thats what I used above 2) PATH search (but this will try paths like "/usr/local/bin" not "/usr/local/lib"). 3) Current directory Copying the library file as I did is probably not the best idea in general, since the library can have dependencies (zint requires libpng which in turn needs zlib) and those get loaded from the system paths anyways: 28099: file=/home/michal/src/context/tex/texmf-linux-64/bin/lib/luametatex/zint/libzint.so [0]; dynamically loaded by /home/michal/src/context/tex/texmf-linux-64/bin/luametatex [0] 28099: file=libpng16.so.16 [0]; needed by /home/michal/src/context/tex/texmf-linux-64/bin/lib/luametatex/zint/libzint.so [0] 28099: file=libz.so.1 [0]; needed by /usr/lib/libpng16.so.16 [0] and one would want to ensure ABI compatibility. But then again, same issue applies to the luametatex -> optional library ABI.
But then still zintlib.execute returns nothing.
I can confirm this as well.
I wonder if this works on Windows? The API docs don’t mention an "execute" function. https://www.zint.org.uk/manual/chapter/5
"execute" should be a function defined in LuaMetaTeX, that internally calls zint functions. Michal