app-sci/calc-2.11.9.3 fails to emerge. The problem is in make chk which is the last step in src_compile(). ebuild /usr/portage/app-sci/calc/calc-2.11.9.3.ebuild compile fails with CALCPATH=./cal ./calc -d -q read regress 2>&1 | awk -f check.awk make: *** [chk] Error 1 !!! ERROR: app-sci/calc-2.11.9.3 failed. !!! Function src_compile, Line 28, Exitcode 2 !!! (no error message) However executing CALCPATH=./cal ./calc -d -q read regress 2>&1 | awk -f check.awk manually works well. This made me turn to the sandbox. So I tried with sandboxshell and without the awk-script that hides what really happens. Reproducible: Always Steps to Reproduce: 1. ebuild /usr/portage/app-sci/calc/calc-2.11.9.3.ebuild compile (this of course failes but leaves the compiles calc in /var/tmp/portage) 2. cd /var/tmp/portage/app-sci/calc-2.11.9.3/work/calc-2.11.9.3 3. sandboxshell 4. CALCPATH=./cal ./calc -d -q read regress 2>&1 Actual Results: . [a bunch of other tests] . . 4242: x == a && y == b 4243: !iserror(freopen(f, "w+")) 4244: L = "Landon\n" 4245: C = " Curt\n" 4246: N = "\t\tNoll\n" Segmentation fault Expected Results: . [a bunch of other tests] . . 9997: passed all tests /\../\ 9998: freeglobals() 9999: Ending regression tests I'm using portage-2.0.50-r9 on a gentoo-dev-sources-2.6.7-r10. I just confirmed the bugs on a second machine using portage-2.0.50-r9 on a gentoo-sources-2.4.22- r7.
Created attachment 40706 [details] Test program for sandbox The attached test program shows the core of the problem: freopen in sandbox results in an invalid file handle. Looks like this kind of problem should have been fixed since glibc-2.2.5-r6 - no idea why it happens again. Trying to find some experts for this.
Additional info: works with glibc-2.3.2-r9 - fails with glibc-2.3.3.20040420-r1.
Maybe the toolchain team can tell me more about comment #1?
Mike - since you seem to maintain sandboxshell, perhaps you have an idea?
Can't reproduce this with either of the versions in portage when using the latest sandbox.