Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32963 - Portage needs a 64-bit and 32-bit libsandbox.so
Summary: Portage needs a 64-bit and 32-bit libsandbox.so
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords: Inclusion
: 31507 34385 (view as bug list)
Depends on:
Blocks: 33360 33509
  Show dependency tree
 
Reported: 2003-11-07 12:17 UTC by Kris Kersey (RETIRED)
Modified: 2004-05-24 09:50 UTC (History)
6 users (show)

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


Attachments
Patch for portage 2.0.49-r15. The latest non-masked. (portage-2.0.49-r15-amd64.patch,2.40 KB, patch)
2003-11-07 12:19 UTC, Kris Kersey (RETIRED)
Details | Diff
Ebuild to apply the patch and build and install the 32-bit lib. (portage-2.0.49-r15.ebuild,10.21 KB, text/plain)
2003-11-07 12:21 UTC, Kris Kersey (RETIRED)
Details
Diff from original r15 to my new r15 for you convenience. (portage-2.0.49-r15.ebuild.diff,1.07 KB, patch)
2003-11-07 12:44 UTC, Kris Kersey (RETIRED)
Details | Diff
sandbox-amd64-fixes.patch (sandbox-amd64-fixes.patch,2.32 KB, patch)
2003-11-09 12:26 UTC, Martin Schlemmer (RETIRED)
Details | Diff
sandbox-amd64-fixes-2.patch (sandbox-amd64-fixes-2.patch,2.30 KB, patch)
2003-11-11 16:16 UTC, Martin Schlemmer (RETIRED)
Details | Diff
this patch works (portage.patch,2.19 KB, patch)
2003-11-11 16:24 UTC, Brad House
Details | Diff
sandbox-amd64-fixes-3.patch (sandbox-amd64-fixes-3.patch,4.05 KB, patch)
2003-11-11 17:17 UTC, Martin Schlemmer (RETIRED)
Details | Diff
sandbox-amd64-fixes-4.patch (sandbox-amd64-fixes-4.patch,3.66 KB, patch)
2003-11-12 09:30 UTC, Martin Schlemmer (RETIRED)
Details | Diff
portage-2.0.49-r18_ebuild.patch (portage-2.0.49-r18_ebuild.patch,1.24 KB, patch)
2003-12-14 12:54 UTC, Martin Schlemmer (RETIRED)
Details | Diff
working libsandbox 32/64 patch (sandbox-amd64.patch,4.05 KB, patch)
2004-01-28 21:27 UTC, Brad House
Details | Diff
patch for portage-2.0.50_pre20 ebuild for convenience (portage-2.0.50_pre20.ebuild.patch,1.24 KB, patch)
2004-01-28 21:28 UTC, Brad House
Details | Diff
Patch against sys-apps/portage-2.0.50-r6 to allow using a 32bit libsandbox.so (portage-2.0.50-r6.patch,1.43 KB, patch)
2004-05-20 03:29 UTC, Danny van Dyk (RETIRED)
Details | Diff
fix for 2.0.51_pre7 ebuild (portage-2.0.51_pre7-multilib-fix.patch,1.31 KB, patch)
2004-05-23 03:13 UTC, Travis Tilley (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kris Kersey (RETIRED) gentoo-dev 2003-11-07 12:17:32 UTC
Attached is a patch and a new ebuild to enable building of a 32-bit as well as a 64-bit libsandbox.so.  This is needed when emerging a package that uses a 32-bit binary.  An example of this is the current requirement of using a 32-bit implementation of java.  This is one way of doing it, although, the developer may have a better idea.
Comment 1 Kris Kersey (RETIRED) gentoo-dev 2003-11-07 12:19:15 UTC
Created attachment 20394 [details, diff]
Patch for portage 2.0.49-r15.  The latest non-masked.

The patch here involves a new target to build a 32-bit libsandbox.so and
a
target to install it.
Comment 2 Kris Kersey (RETIRED) gentoo-dev 2003-11-07 12:20:07 UTC
Comment on attachment 20394 [details, diff]
Patch for portage 2.0.49-r15.  The latest non-masked.

Also, the path to libsandbox.so does not need to be fixed to /lib.  Let the
linker find it.
Comment 3 Kris Kersey (RETIRED) gentoo-dev 2003-11-07 12:21:01 UTC
Created attachment 20395 [details]
Ebuild to apply the patch and build and install the 32-bit lib.
Comment 4 Brad House 2003-11-07 12:32:38 UTC
Looks good, could use a diff instead of an entire ebuild replacement.

This is probably the only way we're going to be able to allow
java to coexist nicely on gentoo for amd64 until we get a native
amd64 java 64bit port.

Also, one other suggestion, I'd add the dep of emul-linux-x86-baselibs-1.0
and also, perhaps spit out a warning that gcc must have been compiled
with multilib support if you're emerging portage with 'multilib'.  Or
perhaps even write a check routine that would auto-determine this.

-Brad
Comment 5 Kris Kersey (RETIRED) gentoo-dev 2003-11-07 12:44:41 UTC
Created attachment 20396 [details, diff]
Diff from original r15 to my new r15 for you convenience.
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-09 12:26:12 UTC
Created attachment 20480 [details, diff]
sandbox-amd64-fixes.patch

I like this patch to sandbox better.  It does some autodetection, and non
to no
changes to portage.ebuild at all.
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-10 22:13:59 UTC
Brad?
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-11 16:16:34 UTC
Created attachment 20620 [details, diff]
sandbox-amd64-fixes-2.patch

Ok, this fixes a small bug where the 32bit libs was not build ...
Comment 9 Brad House 2003-11-11 16:24:04 UTC
Created attachment 20621 [details, diff]
this patch works
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-11 17:17:49 UTC
Created attachment 20625 [details, diff]
sandbox-amd64-fixes-3.patch

Ok, this should detect if gcc supports both -m32 and -m64. Some other fluff,
sorry.
Comment 11 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-12 09:30:44 UTC
Created attachment 20646 [details, diff]
sandbox-amd64-fixes-4.patch

Ok, seems we cannot rely on auto detection.  This
removes it, and we can have a single call to make
with:

  # make HAVE_64BIT_ARCH=1 all

or to install:

  # make HAVE_64BIT_ARCH=1 install
Comment 12 Kris Kersey (RETIRED) gentoo-dev 2003-11-13 21:33:35 UTC
Martin,

Do you have a new ebuild for patch 4 or do I just apply it myself to the portage source tree?
Comment 13 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-14 06:12:14 UTC
Just apply yourself.  If you want to add a patch against latest ebuild, feel
free.
Comment 14 Brad House 2003-11-16 12:38:37 UTC
*** Bug 31507 has been marked as a duplicate of this bug. ***
Comment 15 Brad House 2003-11-16 18:45:22 UTC
I had a problem with the latest patch, augustus (Kris), can you
verify if you have a problem with it, since you posted the
original??

-Brad
Comment 16 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-16 23:59:48 UTC
Brad, can you elaborate ?
Comment 17 Kris Kersey (RETIRED) gentoo-dev 2003-11-17 19:43:13 UTC
The patch doesn't apply to the standard tar.bz2 or the latest portage with -p0 or -p1.  From looking at the patch it's a CVS diff.  Can that be used on the normal tree with a flag or something?
Comment 18 Kris Kersey (RETIRED) gentoo-dev 2003-11-19 07:42:12 UTC
Added an epatch line to the portage-2.0.49-r15 ebuild to patch src/sandbox-1.1 with sandbox-amd64-fixes-4.patch.  It worked great for me.
Comment 19 Brad House 2003-11-26 06:01:44 UTC
*** Bug 34385 has been marked as a duplicate of this bug. ***
Comment 20 Darryl Bleau 2003-12-08 11:45:12 UTC
This sounds exciting, hope it can work. I might have done something wrong, but I can seem to get sun-jdk installed still.

I manually patched all the required files, (Makefile, sandbox.c and sandbox_futils.c) and set HAVE_64BIT_ARCH to 1, ran through ebuild compile/install/qmerge, verified that it installed libsandbox.so and libsandbox32.so, then tried to emerge sun-jdk. This is what I get (which is different than before):

Calculating dependencies ...done!
>>> emerge (1 of 1) dev-java/sun-jdk-1.4.2.02 to /
>>> md5 src_uri ;-) j2sdk-1_4_2_02-linux-i586.bin
Could not open the sandbox library at 'libsandbox.so'.
Comment 21 Martin Schlemmer (RETIRED) gentoo-dev 2003-12-14 01:22:16 UTC
Ill commit it to cvs - any objections ?  If none, then Nick can add the portage
side changes.

Comment 22 Brad House 2003-12-14 06:42:09 UTC
I need to test this again, when I first tested it it couldn't seem
to find libsandbox properly, and the patch you made didn't correctly
do the multilib detection. I'll do that today, and let you know.

-Brad
Comment 23 Darryl Bleau 2003-12-14 10:52:04 UTC
I just tried this again, still get the same error. Maybe I'm doing something wrong with the patches.
Comment 24 Martin Schlemmer (RETIRED) gentoo-dev 2003-12-14 12:54:39 UTC
Created attachment 22217 [details, diff]
portage-2.0.49-r18_ebuild.patch

Ok, just to make sure we are all on the same grounds, cp
sandbox-amd64-fixes-4.patch to /usr/portage/sys-apps/portage/files,
and then apply this patch to portage-2.0.49-r18.ebuild
Comment 25 Martin Schlemmer (RETIRED) gentoo-dev 2003-12-16 10:23:04 UTC
And?
Comment 26 Brad House 2003-12-16 10:25:12 UTC
didn't work for me, still debugging it though
Comment 27 Brad House 2004-01-28 21:27:18 UTC
Created attachment 24576 [details, diff]
working libsandbox 32/64 patch

missed a spot in sandbox.c that did a sanity check which would cause
the whole shebang to fail.  Fixed.
Comment 28 Brad House 2004-01-28 21:28:16 UTC
Created attachment 24577 [details, diff]
patch for portage-2.0.50_pre20 ebuild for convenience

patch for ebuild
Comment 29 Brad House 2004-01-28 21:33:25 UTC
Azarah, please commit.  I'd like to get this rolled into
portage asap, as it needs to be part of 2004.0 ... I never
meant to delay this much getting this fixed, got too busy
with other crap.
Comment 30 Kris Kersey (RETIRED) gentoo-dev 2004-01-28 21:44:47 UTC
azarah,

Works good for Brad and I.  I'd go for it as ~amd64.
Comment 31 Jason Huebel (RETIRED) gentoo-dev 2004-03-11 23:25:08 UTC
Status?
Comment 32 Kris Kersey (RETIRED) gentoo-dev 2004-03-16 08:37:20 UTC
Someone really needs to get on top of this before the AMD64team has to commit this ourselves.  Important packages such as OpenOffice-bin depend on this for us.
Comment 33 Nicholas Jones (RETIRED) gentoo-dev 2004-03-20 19:19:55 UTC
The patch is fine... and I've included it for testing in portage-2.0.50-r2,
but I really don't like how the ebuild looks. Figure out something cleaner
or give me a good explanation of what needs to get done.
Comment 34 Nicholas Jones (RETIRED) gentoo-dev 2004-04-04 23:39:05 UTC
This is also in portage-2.0.50-r3 (50-r1 + sandbox security fixes).
Comment 35 Danny van Dyk (RETIRED) gentoo-dev 2004-05-20 03:29:27 UTC
Created attachment 31753 [details, diff]
Patch against sys-apps/portage-2.0.50-r6 to allow using a 32bit libsandbox.so

What about using this patch instead ? Works fine for me and doesn't include the
sed  thingie...
Comment 36 Travis Tilley (RETIRED) gentoo-dev 2004-05-21 08:22:30 UTC
that patch manages to break portage for all amd64 users who dont have multilib... like myself.

gcc libsandbox32.o sandbox_futils32.o -shared -m32 -fPIC -ldl -lc -nostdlib -lgcc -o libsandbox32.so
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../lib/libdl.so when searching for -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../lib/libdl.a when searching for -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../libdl.so when searching for -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../libdl.a when searching for -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/libdl.so when searching for -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/libdl.a when searching for -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ldl
collect2: ld returned 1 exit status
make: *** [libsandbox32.so] Error 1
 
!!! ERROR: sys-apps/portage-2.0.50-r6 failed.
!!! Function src_install, Line 124, Exitcode 2
!!! Failed to compile sandbox
Comment 37 Danny van Dyk (RETIRED) gentoo-dev 2004-05-21 10:55:54 UTC
"use multilib" wasn't enough... I added a check_multilib() function that gets called instead and exports MULTILIB, which gets used by make/make install.
I think this is fixed now - *finally*.
Comment 38 Travis Tilley (RETIRED) gentoo-dev 2004-05-23 03:11:35 UTC
2.0.51_pre still broken
Comment 39 Travis Tilley (RETIRED) gentoo-dev 2004-05-23 03:12:40 UTC
re-assigning to carpaski and marking as critical like he suggests
Comment 40 Travis Tilley (RETIRED) gentoo-dev 2004-05-23 03:13:53 UTC
Created attachment 31881 [details, diff]
fix for 2.0.51_pre7 ebuild
Comment 41 Travis Tilley (RETIRED) gentoo-dev 2004-05-24 09:50:45 UTC
nevermind, i'll apply it myself.