[texshop] Error which I don't understand

Bruno Voisin bvoisin at icloud.com
Thu Sep 29 19:31:21 CEST 2022


> On 29 Sep 2022, at 15:57, Ulrich Groh via texshop <texshop at tug.org> wrote:
> 
> Hi, thanks for the information I got. Indeed, it has been a Biber issue. After deinstalling Xcode, updating TeXlive und reinstalling Xcode I got
> 
> ~ % biber --version
> biber version: 2.18
> ~ %  
> 
> Maybe the Xcode staff was not necessary, but .. 
> 
> Sorry for the late answer but I have been out for some days.


Hi Ulrich,

The following to be taken with a grain of salt, as I'm not a biber user myself (the following is the first time I ever ran biber).

Recalling the problem for readers who didn't see the earlier thread: on macOS, calling beamer in TeXShop calls biber, which surprisingly leads to several error messages in TeXShop's Console about lipo and Xcode components either being absent or not defining required symbols. This all ends with

sh: line 1:  5967 Abort trap: 6        /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find lipo 2> /dev/null

and the appearance of a window telling "lipo" requires the Command Line Tools and offering to install these.

Making a long story short:


(1) Biber is a Perl application provided as a stand-alone binary using the Perl PAR::Packer module. On first run, it is unpacked to a cache situated on the Mac at

	/var/folders/*/*/*/par-<hex_encoded_username>/cache-<hash>

See §4 "Binaries" of the biber doc.


(2) On my setup there are two such caches. One of them contains a single folder, /thin/biber, and the biber there is a thinned, architecture-specific version of the universal binary shipped with MacTeX (in my case this thinned binary is ARM-specific):

% file /usr/local/texlive/2022/bin/universal-darwin/biber 
/usr/local/texlive/2022/bin/universal-darwin/biber: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64]
/usr/local/texlive/2022/bin/universal-darwin/biber (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/local/texlive/2022/bin/universal-darwin/biber (for architecture arm64): Mach-O 64-bit executable arm64

% file /private/var/folders/[...]/thin/biber
/private/var/folders/[...]/thin/biber: Mach-O 64-bit executable arm64


(3) This is caused by the way PAR::Packer works. See the macOS-specific code starting at

https://metacpan.org/release/RSCHUPP/PAR-Packer-1.056/source/myldr/boot.c#L255

Indeed, PAR::Packer does all this on the Mac: on first run of the binary (ie biber), it checks whether this binary is universal (ie "fat"), and if so uses lipo (or, if this isn't present, offers you to install the Command Line Tools to get it) to create a thinned version of the binary.

I assume this thinned version is used to compute the hash that is then compared to the hash in the cache directory name, as described in the biber doc.


The problem hence is because lipo isn't part of macOS. Instead, lipo requires either Xcode or the Command Line Tools to be installed.

This seems to mean PAR::Packer on one hand, and the way the texlive binaries are provided in MacTeX (as universal binaries not requiring either Xcode nor the Command Line Tools to run) on the other hand, are incompatible.

Until this problem is solved, I think the easiest remedy for you is to download the binary specific to your architecture from

https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/current/binaries/MacOS/

and replace the MacTeX binary /usr/local/texlive/2022/bin/universal-darwin/biber with it (§4.3 of biber's documentation gives more details on the procedure).

Again, the above is a tentative analysis which would require confirmation by Dick Koch or Philip Kime (the biber author).

Also, if the problem is indeed as above, I'm surprised it hasn't been reported before. I don't remember whether MacTeX 2022 is the first release to ship universal binaries (Intel + ARM), or whether MacTeX 2021 already did.

Cheers,

Bruno




More information about the texshop mailing list.