Control: clone -1 -2
Control: retitle -2 tcl8.6 must not be marked Multi-Arch: foreign
Control: reassign -2 tcl8.6
Control: found -2 8.6.11+dfsg-1

Hi Sergei,

On Mon, Oct 26, 2026 at 10:53:47AM +0300, Sergei Golovan wrote:
> Can you be a bit more specific? lua5.5 ships only a Lua interpreter
> (and compiler), so, for
> example lua5.5 i386 can be used to run Lua scripts on amd64.

This is all right. What lua can also do is load the zlib (lua-zlib)
library.

| $ mmdebstrap unstable /dev/null --variant=essential 
--architectures=amd64,i386 --include=lua5.5,lua-zlib:i386 
--chrooted-customize-hook="lua5.5 -e 'require(\"zlib\")'"
| ...
| lua5.5: (command line):1: module 'zlib' not found:
|         no field package.preload['zlib']
|         no file '/usr/local/share/lua/5.5/zlib.lua'
|         no file '/usr/local/share/lua/5.5/zlib/init.lua'
|         no file '/usr/local/lib/lua/5.5/zlib.lua'
|         no file '/usr/local/lib/lua/5.5/zlib/init.lua'
|         no file '/usr/share/lua/5.5/zlib.lua'
|         no file '/usr/share/lua/5.5/zlib/init.lua'
|         no file './zlib.lua'
|         no file './zlib/init.lua'
|         no file '/usr/local/lib/lua/5.5/zlib.so'
|         no file '/usr/lib/x86_64-linux-gnu/lua/5.5/zlib.so'
|         no file '/usr/lib/lua/5.5/zlib.so'
|         no file '/usr/local/lib/lua/5.5/loadall.so'
|         no file './zlib.so'
| stack traceback:
|         [C]: in global 'require'
|         (command line):1: in main chunk
|         [C]: in ?
| $

> May be multi-arch allowed would be better than foreign, but at least
> some other packages
> with interpreters are multi-arch foreign: tcl8.6 (and tcl9.0), bash.
> perl and python are
> multi-arch allowed though.

Those interpreters are not all the same. The key distinction is whether
they're extensible with shared libraries. For Perl and Python there are
a ton of such packaged extensions. Even GNU make can be extended in such
a way (though it is very uncommon). When it comes to tcl8.6, I think the
story is the same as for lua. Loading a foreign tcl-trf into tcl8.6
would fail in the very same way as above.

For bash the story is less obvious. Searching its source code reveals
that it does use dlopen and this is a strong clue. The "enable -f
filename functionname" syntax appears to provide a similar feature, but
I'm not sure it is practically relevant as it is with lua-zlib and
tcl-trf. For instance, there is
https://sources.debian.org/src/lm-sensors/1:3.6.2-2/prog/daemon/healthd.sh?hl=27#L27
but I could not find a matching sleep.so and the relevant file is
installed as an example.

Helmut

Reply via email to