Re: Multiarch support (was Moving 32-bit libraries to (/usr)/lib32on amd64)
Andreas Jochens a écrit :
On 06-Feb-24 12:06, Aurelien Jarno wrote:
Andreas Jochens a écrit :
I suggest the following setup for 32-bit libraries on amd64:
1. The ia32-libs package continues to install the 32-bit libraries in
/emul/ia32-linux/usr/lib but it stops to provide the 32-bit libc6(-dev)
packages.
2. The ia32-libs package does no longer provide a symlink from
/usr/lib32 to /emul/ia32-linux/usr/lib.
Removing this link render the ia32-libs-dev package unusable as
/emul/ia32-linux/usr/lib is not a search path when linking libraries.
/emul/ia32-linux/usr/lib _is_ in the search path of the dynamic linker
When I say linking, I don't speak about the dynamic linking, but the
linking that occurs when building a package with gcc.
because /emul/ia32-linux/usr/lib is added to /etc/ld.so.conf by
ia32-libs.postinst. Consequently, the symlink to /usr/lib32 is not
necessary to run 32-bit binaries that use libraries from ia32-libs.
Agreed that part works. Note that I spoke about ia32-libs-dev.
As far as I remember, the /usr/lib32 symlink was introduced in ia32-libs
because without it 'gcc -m32' did not work correctly because it expects
its own 32-bit libraries (e.g. libgcc*) to be in /usr/lib32. This
problem with gcc will no occur in my suggested setup because of:
It expects _all_ libraires to be there or (in /lib), not only the gcc ones:
root@bode:/# echo 'main() {}' > test.c
root@bode:/# gcc -m32 -o test test.c -ljpeg
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.0.3/../../../libjpeg.so when searching
for -ljpeg
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.0.3/../../../libjpeg.a when searching
for -ljpeg
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libjpeg.so when
searching for -ljpeg
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libjpeg.a when
searching for -ljpeg
/usr/bin/ld: skipping incompatible /usr/lib/libjpeg.so when searching
for -ljpeg
/usr/bin/ld: skipping incompatible /usr/lib/libjpeg.a when searching for
-ljpeg
/usr/bin/ld: cannot find -ljpeg
collect2: ld returned 1 exit status
root@bode:/# ls /emul/ia32-linux/usr/lib/libjpe*
/emul/ia32-linux/usr/lib/libjpeg.so.62
/emul/ia32-linux/usr/lib/libjpeg.so.62.0.0
So that does not work.
Aurelien
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
Reply to: