From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/114704 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Keith McKay via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Setting up zint on a mac with macOS Montery Version 12.3.1 Date: Tue, 12 Apr 2022 21:04:50 +0100 Message-ID: <475d96e6-0905-7d2d-a51d-84b06d340de9@gmail.com> References: <35dfcbda-f5aa-1eeb-f8af-8f6ddba2b3dd@gmail.com> <096E2950-39C5-419D-96BC-245B9350EE71@scorecrow.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8661277638962176632==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37898"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Cc: Keith McKay To: Bruce Horrocks , mailing list for ConTeXt users , monty.luis@gmail.com Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 12 22:05:20 2022 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1neMlL-0009bP-2B for gctc-ntg-context-518@m.gmane-mx.org; Tue, 12 Apr 2022 22:05:19 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CBBC9282F03; Tue, 12 Apr 2022 22:05:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9W7nYcjlfo3d; Tue, 12 Apr 2022 22:05:00 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7FB6B289B4B; Tue, 12 Apr 2022 22:05:00 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 378192831AE for ; Tue, 12 Apr 2022 22:04:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AR4qKZYyHUrB for ; Tue, 12 Apr 2022 22:04:56 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.128.43; helo=mail-wm1-f43.google.com; envelope-from=mckaymeister@gmail.com; receiver= Original-Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id B758F282F03 for ; Tue, 12 Apr 2022 22:04:56 +0200 (CEST) Original-Received: by mail-wm1-f43.google.com with SMTP id h16so12630067wmd.0 for ; Tue, 12 Apr 2022 13:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to; bh=2zZZIXJXPIsG9JotV8Y3vh3dhrTN9HXhI1HkNJVGc/U=; b=qChHZwpXfBvZvjIK1oTNDFofqNR7FPl0vRMqU44teH+h6Fku6JOgTGdmDADBAtTkBL u/h8qG1l1GmiPPEOtYxAPqZX5KAKtGzOsvFziKGRakrPiyl7S/ZHBLHbYhSP+APOjWxg QEv4h1cMTaztjTCl4dIYM/WnAaydR6viZVk51gIxgMiCaqIeAXcTN4PJTzlgjcez1PNE oJi7qhk50DyiohjV9E5QvGiOo0GcJDhD7bypv4MyFy2mzH+1KNDZz+jJW3ZMFETe1icu 4h724M1WElcRaZQcy5aIIW78+RU0FEqu7/6NwIw2tH119AoROZPFnQdRptaApvy4Z7gu 6FoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to; bh=2zZZIXJXPIsG9JotV8Y3vh3dhrTN9HXhI1HkNJVGc/U=; b=CjNZlTrc8E05esosa8YDqW0iexuBbZ+8aOYCL/wcNxph+dIYYuyiAnV8hAqUoNJuwP CZyrrAbD+ZoRQ6gDwFEBtBdZnepDZiAhzab03mQIBFzkeNlruKDi3HD7b9GCf67qa4iV 0PX2ZFAHCv0o2bwNxSwmYNXDwcXsGf2Q0552IHSCaeQLA7U31s7Sx397j9UikSJXV/mt 0mae3jnFaEAzw+J45YHAb0JdBOeZjxlewex2/KMzjZ+xyttUFELZKuQ1vKDOw44YDQ5S nM1v5J/jkOPUwT8UiHPMzke8s52w8z1ajoyBDjTtihs7L0r6ean7MYBIMJnJkN+yagbx zEfA== X-Gm-Message-State: AOAM531otBIZWAXpnxtfG3cNhopIdMm4RcV2ryvzASa3fDbutemfgF2W vg3ZdveqVlsUmHZCo45P6bI= X-Google-Smtp-Source: ABdhPJzOxdiPum9iWEpPajqih9tUJT2IqaWxro8YxKIlnJR6AonNB6uBPd1qY+NBbD1JfHCuVEXh6w== X-Received: by 2002:a05:600c:35d5:b0:38e:3bca:716f with SMTP id r21-20020a05600c35d500b0038e3bca716fmr5461799wmq.200.1649793896253; Tue, 12 Apr 2022 13:04:56 -0700 (PDT) Original-Received: from [192.168.0.33] (cpc100594-uddi29-2-0-cust51.20-3.cable.virginm.net. [82.42.107.52]) by smtp.gmail.com with ESMTPSA id r4-20020a05600c35c400b0038cbd8c41e9sm387465wmq.12.2022.04.12.13.04.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Apr 2022 13:04:55 -0700 (PDT) Content-Language: en-GB In-Reply-To: <096E2950-39C5-419D-96BC-245B9350EE71@scorecrow.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:114704 Archived-At: This is a multi-part message in MIME format. --===============8661277638962176632== Content-Type: multipart/alternative; boundary="------------dGYOYj4oK1Bc0dF5AaA0IQMJ" Content-Language: en-GB This is a multi-part message in MIME format. --------------dGYOYj4oK1Bc0dF5AaA0IQMJ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi All I created the symbolic link as suggested by Bruce and Luis and still got the error message optional > unable to locate library 'libzint' in my text editor. I use TeXworks. However, I thought I would try running from the Terminal app and it worked. It found libzint and output the pdf with both barcodes and the qrcode. I have no idea why it works in the Terminal and not TexWorks, I'm guessing I have a path issue which I need to investigate. Notes 1) My machine is a mac-mini-M1 with macos Monterey and I'm running the latest ConTeXt version 2) Bruce noted that my Homebrew was installed in a non-standard location so I checked on the Hombrew website and it is installed in opt/homebrew for Apple Silicon i.e the M1 chip. Maybe Bruce's homebrew was installed on an earlier version. Thanks to Luis and Bruce for their suggestions. Best Wishes Keith McKay On 10/04/2022 22:26, Bruce Horrocks wrote: > Hi Keith, > >> On 10 Apr 2022, at 14:49, Keith McKay via ntg-context wrote: >> >> Hi All >> >> I have been struggling today trying to setup and use the Barcode module zint in ConTeXt and failed. I have followed the instructions on the wiki (https://wiki.contextgarden.net/Barcodes ) but with some changes as follows. Which maybe why I failed. >> >> 1) I downloaded Zint using Homebrew since I'm using macOS, and installed it according to the instructions. >> >> >> 2) Since I'm using LMTX I looked for the file libzint.dylib and found it in /opt/homebrew/Cellar/zint/2.10.0/lib . This is different from the path given on the wiki. The directory contained three files, two of which were aliases, libzint.2.10.dylib and libzint.dylib, and an exe file libzint.2.10.0.0.dylib > You have Hombrew installed in a non-standard location. Mine is in /usr/local/Cellar with the executables linked into /usr/local/bin. > > But, assuming other Homebrew commands work when run from Terminal then you might still be okay. > >> 3) I created the path $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint and copied libzint.2.10.0.0.dylib into but replaced dylib with 'so' as suggested on the wiki instructions. So I basically added lib/luametatex/zint to texmf-osx-64/bin . > "Yes" to creating the path but "no" to copying. Create a symbolic link instead. > > So, in Terminal: > > $ cd $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint > > # In my case I used the following: > $ ln -s /usr/local/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so > > # For you with Homebrew in a different location, try: > $ ln -s /opt/homebrew/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so > > Then steps 4 and 5 as below. I ran the MWE below: the ISBN worked, the ISBNX didn't, the QR code did. This is on Monterey. > >> 4) I ran mtxrun --generate to update the database. >> >> 5) I ran the MWE below but no barcode appeared. The console output shows: >> >> >> modules > using user prefixed file 'libs-imp-zint' >> modules > 'zint' is loaded >> >> however further down the output it gives: >> >> >> optional > unable to locate library 'libzint' >> >> I have tried renaming libzint2.10.0.0.so to libzint.so, but still no barcode. Is their something I am missing? Tips or hints appreciated. >> Best Wishes >> Keith McKay >> >> %%%%%%%%%%%%%% MWE %%%%%%%% >> \usemodule[zint] >> \starttext >> \barcode[alternative=isbn,text=9783865419026,width=4cm] >> \barcode[alternative=isbnx, text=9783865419026, width=4cm] >> \barcode[alternative=qrcode, text={https://wiki.contextgarden.net}, width=3cm] >> \stoptext > — > Bruce Horrocks > Hampshire, UK > --------------dGYOYj4oK1Bc0dF5AaA0IQMJ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Hi All
I created the symbolic link as suggested by Bruce and Luis and still got the error message 
optional        > unable to locate library 'libzint'

in my text editor. I use TeXworks. However, I thought I would try running from the Terminal app and it worked. It found libzint and output the pdf with both barcodes and the qrcode. I have no idea why it works in the Terminal and not TexWorks, I'm guessing I have a path issue which I need to investigate.

Notes
1) My machine is a mac-mini-M1 with macos Monterey and I'm running the latest ConTeXt version
2) Bruce noted that my Homebrew was installed in a non-standard location so I checked on the Hombrew website and it is installed in opt/homebrew for Apple Silicon i.e the M1 chip. Maybe Bruce's homebrew was installed on an earlier version.

Thanks to Luis and Bruce for their suggestions.
Best Wishes
Keith McKay
On 10/04/2022 22:26, Bruce Horrocks wrote:
Hi Keith,

On 10 Apr 2022, at 14:49, Keith McKay via ntg-context <ntg-context@ntg.nl> wrote:

Hi All

I have been struggling today trying to setup and use the Barcode module zint in ConTeXt and failed. I have followed the instructions on the wiki ( https://wiki.contextgarden.net/Barcodes ) but with some changes as follows. Which maybe why I failed.

1) I downloaded Zint using Homebrew since I'm using macOS, and installed it according to the instructions.


2) Since I'm using LMTX I looked for the file libzint.dylib and found it in /opt/homebrew/Cellar/zint/2.10.0/lib . This is different from the path given on the wiki. The directory contained three files, two of which were aliases,  libzint.2.10.dylib and libzint.dylib, and an exe file libzint.2.10.0.0.dylib
You have Hombrew installed in a non-standard location. Mine is in /usr/local/Cellar with the executables linked into /usr/local/bin.

But, assuming other Homebrew commands work when run from Terminal then you might still be okay.

3) I created the path $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint and copied libzint.2.10.0.0.dylib into but replaced dylib with 'so' as suggested on the wiki instructions. So I basically added  lib/luametatex/zint to texmf-osx-64/bin .
"Yes" to creating the path but "no" to copying. Create a symbolic link instead.

So, in Terminal:

  $ cd $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint

  # In my case I used the following:
  $ ln -s /usr/local/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so

  # For you with Homebrew in a different location, try:
  $ ln -s /opt/homebrew/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so

Then steps 4 and 5 as below. I ran the MWE below: the ISBN worked, the ISBNX didn't, the QR code did. This is on Monterey.

4) I ran mtxrun --generate to update the database.

5) I ran the MWE below but no barcode appeared. The console output shows:
 

modules         > using user prefixed file 'libs-imp-zint'
modules         > 'zint' is loaded

 however further down the output it gives:


optional        > unable to locate library 'libzint'

I have tried renaming libzint2.10.0.0.so to libzint.so, but still no barcode. Is their something I am missing? Tips or hints appreciated.
Best Wishes
Keith McKay

%%%%%%%%%%%%%% MWE %%%%%%%%
\usemodule[zint]
\starttext
\barcode[alternative=isbn,text=9783865419026,width=4cm]
\barcode[alternative=isbnx, text=9783865419026, width=4cm]
\barcode[alternative=qrcode, text={https://wiki.contextgarden.net}, width=3cm]
\stoptext
—
Bruce Horrocks
Hampshire, UK

--------------dGYOYj4oK1Bc0dF5AaA0IQMJ-- --===============8661277638962176632== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============8661277638962176632==--