ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Michal Vlasák via ntg-context" <ntg-context@ntg.nl>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Cc: "Michal Vlasák" <lahcim8@gmail.com>
Subject: Re: zint barcode module on LMTX/MacOS
Date: Sun, 05 Sep 2021 17:51:38 +0200	[thread overview]
Message-ID: <CE22LC1BNJB1.39SN8WB6FOLUW@phobos> (raw)
In-Reply-To: <13A3234C-7EEC-44AD-BBA1-B17C5A34E077@fiee.net>

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2021-09-05 15:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-05 14:15 Henning Hraban Ramm via ntg-context
2021-09-05 15:51 ` Michal Vlasák via ntg-context [this message]
2021-09-05 16:30   ` Henning Hraban Ramm via ntg-context
2021-09-05 17:00     ` Michal Vlasák via ntg-context
2021-09-05 17:37   ` Hans Hagen via ntg-context
2021-09-05 17:53     ` Michal Vlasák via ntg-context
2021-09-05 19:01       ` Henning Hraban Ramm via ntg-context
2021-09-05 23:13       ` Hans Hagen via ntg-context
2021-09-06  8:34         ` Henning Hraban Ramm via ntg-context
2021-09-06 11:08           ` Hans Hagen via ntg-context
2021-09-07 19:03             ` Henning Hraban Ramm via ntg-context
2021-09-08  7:05               ` Axel Kielhorn via ntg-context
     [not found]               ` <08952543-f2cb-8c11-d8ab-436cddbc3189@klankschap.nl>
2021-09-08 17:08                 ` Henning Hraban Ramm via ntg-context
2021-09-08 18:49                   ` Floris van Manen via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CE22LC1BNJB1.39SN8WB6FOLUW@phobos \
    --to=ntg-context@ntg.nl \
    --cc=lahcim8@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).