problem(s) with extractbb and extractbb.lua recently introduced
Bruno Voisin
bvoisin at icloud.com
Tue Jul 16 23:26:26 CEST 2024
Having installed MacTeX-2024 on an Intel Mac (from 2013) with macOS 10.15 Catalina, then updated all the packages with TeX Live Utility, I could test the two configurations (macOS 10.15 Intel, macOS 15 ARM, MacTeX-2024 on both) in parallel.
Unfortunately I don't have a current Intel Mac at hand, on which the latest macOS could be installed so the comparison would be more relevant.
With the current script, in which the lines
if (script_dir ~= interpreter_dir) and (script_path ~= resolved_script_path) then
error("The script is in an incorrect location: " .. script_dir)
end
commented out by Karl, have been uncommented, I get the same on both ARM and Intel:
% extractbb --version
! ERROR (extractbb.lua): The script is in an incorrect location: /Library/TeX/texbin
stack traceback:
/Library/TeX/texbin/extractbb:191: in main chunk
Taking Max's updated script, I get on ARM
% extractbb --version
The ffi module is available for:
archictures : ARCH_X86 and ARCH_X64,
operating systems : OS_CE, OS_WIN, OS_LINUX, OS_BSD and OS_POSIX
The ARM processor is currently not supported. There are subtle
differences between this module and the one in luajitTeX and we hope to be in sync around TeXLive 2022.
Different OS can have different interfaces,
for instance OS_WIN has not 'complex.h'. If you want portable
code, stick to the most common concepts.
! extractbb ERROR: The script is in an incorrect location.
Technical Details:
exec_script_name: (string) extractbb
exec_script_path: (string) /Library/TeX/texbin/extractbb
os_type: (string) unix
resolve_script_path: (string) /Library/TeX/texbin/extractbb
resolve_interpreter_dir: (string) /usr/local/texlive/2024/bin/universal-darwin
resolve_script_name: (string) extractbb
exec_interpreter_name: (string) texlua
exec_script_dir: (string) /Library/TeX/texbin
resolve_interpreter_name: (string) texlua
exec_interpreter_dir: (string) /usr/local/texlive/2024/bin/universal-darwin
resolve_script_dir: (string) /Library/TeX/texbin
kpse_script_path: (string) /usr/local/texlive/2024/texmf-dist/scripts/texlive/extractbb.lua
stack traceback:
/Library/TeX/texbin/extractbb:320: in main chunk
and on Intel
% extractbb --version
(Wrapped by extractbb.lua $Revision: $.)
This is extractbb Version 20240407
Copyright (C) 2008-2024 by Jin-Hwan Cho and Matthias Franz
This is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Finally, using extractbb to actually do its work, based on Reinhard's test from yesterday (with <https://www.gust.org.pl/bachotex/bachotex-promo/bachotex-site-color.png>, which downloads to file name final-color.png):
- On ARM Mac:
% extractbb -O final-color.png
The ffi module is available for:
archictures : ARCH_X86 and ARCH_X64,
operating systems : OS_CE, OS_WIN, OS_LINUX, OS_BSD and OS_POSIX
The ARM processor is currently not supported. There are subtle
differences between this module and the one in luajitTeX and we hope to be in sync around TeXLive 2022.
Different OS can have different interfaces,
for instance OS_WIN has not 'complex.h'. If you want portable
code, stick to the most common concepts.
! extractbb ERROR: The script is in an incorrect location.
Technical Details:
os_type: (string) unix
resolve_interpreter_name: (string) texlua
resolve_interpreter_dir: (string) /usr/local/texlive/2024/bin/universal-darwin
exec_interpreter_dir: (string) /usr/local/texlive/2024/bin/universal-darwin
resolve_script_dir: (string) /Library/TeX/texbin
resolve_script_path: (string) /Library/TeX/texbin/extractbb
exec_script_name: (string) extractbb
exec_script_path: (string) /Library/TeX/texbin/extractbb
exec_interpreter_name: (string) texlua
kpse_script_path: (string) /usr/local/texlive/2024/texmf-dist/scripts/texlive/extractbb.lua
resolve_script_name: (string) extractbb
exec_script_dir: (string) /Library/TeX/texbin
stack traceback:
/Library/TeX/texbin/extractbb:320: in main chunk
- On Intel Mac:
% extractbb -O final-color.png
%%Title: final-color.png
%%Creator: extractbb 20240407
%%BoundingBox: 0 0 754 571
%%HiResBoundingBox: 0.000000 0.000000 754.201508 570.841142
%%CreationDate: Tue Jul 16 23:21:23 2024
What's a bit worrying, apart from the problem with extractbb itself, is that this reveals luatex is built with the library luaffi
https://tug.org/svn/texlive/trunk/Build/source/texk/web2c/luatexdir/luaffi/
from
https://github.com/facebookarchive/luaffifb
This library (1) doesn't support ARM processors and (2) has been archived on 13 January 2022 and is now unmaintained.
Bruno
More information about the tex-live
mailing list.