[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Multiarch support (was Moving 32-bit libraries to (/usr)/lib32on amd64)


On 06-Feb-24 14:04, Aurelien Jarno wrote:
> Andreas Jochens a écrit :
> 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.

The current ia32-libs-dev package contains basically only the 32-bit 
files from the i386 libc6-dev package, i.e. it will be completely 
replaced by the new libc6-dev-i386 package.

> >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:

Yes, you are right. However, the current ia32-libs-dev package does not 
contain any development libraries besides libc6-dev anyway, so no 
functionality will be lost by removing the symlink from ia32-libs, 
provided that all other _amd64.deb packages install their 32-bit 
development libraries in /usr/lib32.

> root@bode:/# echo 'main() {}' > test.c
> root@bode:/# gcc -m32 -o test test.c -ljpeg
> /usr/bin/ld: cannot find -ljpeg

You will get the same result with or without the symlink, simply because
ia32-libs-dev does not contain the necessary libjpeg.so at all.

In any case, there are other reasons why the ia32-libs-dev package 
setup does not allow for any serious 32-bit development (e.g. problems 
with architecture specific include files). 32-bit development in the 
sense of package building will require either an i386 chroot environment
or maybe in the future a full multiarch environment.

Andreas Jochens

P.S. Thank you for all your recent work on the glibc package and 
especially for the recent upload of version 2.3.6-2. This new version
will make many things a lot easier, especially for amd64, 
regardless which of the discussed directory setups will be chosen 

Reply to: