Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 82553 - Portage on AMD64 doesn't install 32bit sandbox
Summary: Portage on AMD64 doesn't install 32bit sandbox
Status: RESOLVED DUPLICATE of bug 82027
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-19 03:20 UTC by Karsten Becker
Modified: 2005-07-17 13:06 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Becker 2005-02-19 03:20:33 UTC
desktop lib # emerge portage
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-apps/portage-2.0.51-r15 to /
>>> md5 src_uri ;-) portage-2.0.51-r15.tar.bz2
>>> Unpacking source...
>>> Unpacking portage-2.0.51-r15.tar.bz2 to /var/tmp/portage/portage-2.0.51-r15/work
>>> Source unpacked.
 * Found valid multilib environment.
 * Building with multilib support.
./create-localdecls
Checking truncate argument type... off_t
Checking libc version... libc.so.6
Checking glibc subversion... 2.3

x86_64-pc-linux-gnu-gcc -O1 -pipe  -m64 -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -DSB_HAVE_64BIT_ARCH -Wall -c libsandbox.c
x86_64-pc-linux-gnu-gcc -O1 -pipe  -m64 -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -DSB_HAVE_64BIT_ARCH -Wall -c sandbox_futils.c -o sandbox_futils.o
x86_64-pc-linux-gnu-gcc libsandbox.o sandbox_futils.o -shared  -m64 -fPIC -ldl -lc -nostdlib -lgcc -o libsandbox.so
x86_64-pc-linux-gnu-gcc -O1 -pipe -m32 -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -DSB_HAVE_64BIT_ARCH -Wall -c libsandbox.c -olibsandbox32.o
x86_64-pc-linux-gnu-gcc -O1 -pipe -m32 -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -DSB_HAVE_64BIT_ARCH -Wall -c sandbox_futils.c -o sandbox_futils32.o
x86_64-pc-linux-gnu-gcc libsandbox32.o sandbox_futils32.o -shared -m32 -fPIC -ldl -lc -nostdlib -lgcc -o libsandbox32.so
x86_64-pc-linux-gnu-gcc -O1 -pipe  -m64 -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -DSB_HAVE_64BIT_ARCH -Wall -c sandbox.c -o sandbox.o
x86_64-pc-linux-gnu-gcc -O1 -pipe  -m64 -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -DSB_HAVE_64BIT_ARCH -Wall sandbox.o sandbox_futils.o getcwd.c -ldl -lc -o sandbox
>>> Test phase [not enabled]: sys-apps/portage-2.0.51-r15

>>> Install portage-2.0.51-r15 into /var/tmp/portage/portage-2.0.51-r15/image/ category sys-apps
install -d -m 0755 /var/tmp/portage/portage-2.0.51-r15/image//lib
install -d -m 0755 /var/tmp/portage/portage-2.0.51-r15/image//usr/lib/portage/bin
install -d -m 0755 /var/tmp/portage/portage-2.0.51-r15/image//usr/lib/portage/lib
install -m 0755 libsandbox.so /var/tmp/portage/portage-2.0.51-r15/image//lib
install -m 0755 sandbox /var/tmp/portage/portage-2.0.51-r15/image//usr/lib/portage/bin
install -m 0644 sandbox.bashrc /var/tmp/portage/portage-2.0.51-r15/image//usr/lib/portage/lib
man:
...

Reproducible: Always
Steps to Reproduce:
1. 'emerge portage'
2. Look at the screen-messages: libsandbox32.so is build, but not installed.
3. gcc still fails, as mentioned in (in the meantime closed) Bug 82027.



Actual Results:  
On AMD64 is still no 32bit sandbox available.

Expected Results:  
It should be available.

Seems to be, that the problem is only the ebuild, not the C-code of portage
itself. Simply the installation (copying) of libsandbox32.so is missing, for
what reason ever.
Comment 1 Karsten Becker 2005-02-19 06:56:22 UTC
Workaround:

1.
Unpack a stage3-tarball, for example into /stage3.

2.
Copy '/stage3/emul/linux/x86/lib32/libsandbox.so' to /lib32, rename it to 'libsandbox32.so'.

3.
Create a symlink in '/usr/x86_64-pc-linux-gnu/lib', pointing to '/lib32/libsandbox32.so'. If '/usr/x86_64-pc-linux-gnu/lib' doesn't exist, create it.

gcc will compile.

-----

The problem is not alone that libsandbox32.so is not copied to /lib32, but also that gcc-3.4.3-r1, when it tries to build the 'libstdc++-v3'-part, doesn't look in /lib32, but in '/usr/x86_64-pc-linux-gnu/lib'. You can see it in the output of Bug 82027:

...
/var/tmp/portage/gcc-3.4.3-r1/work/build/gcc/xgcc
-B/var/tmp/portage/gcc-3.4.3-r1/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/
-B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include
-isystem /usr/x86_64-pc-linux-gnu/sys-include  -m32
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled
programs.
...

-----

So first portage must copy the libsandbox32.so to somewhere, I assume that should be /lib32. Then there are two possibilities:

Either...
...portage creates a symlink in '/usr/x86_64-pc-linux-gnu/lib/' to the libsandbox32.so...
...or...
...the config of gcc must be changed to also take a look in /lib32.
Comment 2 Karsten Becker 2005-02-19 08:25:33 UTC
Correction:

It doesn't work if you call the lib 'libsandbox32.so'. It only works with a '/lib32/libsandbox.so' and a symlink in '/usr/x86_64-pc-linux-gnu/lib', pointing to '/lib32/libsandbox.so'. The symlink itself must also be called 'libsandbox.so'.

Sorry for that.  
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2005-02-19 14:55:40 UTC

*** This bug has been marked as a duplicate of 82027 ***