Error message follows: creating src/xstat/Makefile creating src/config/afsconfig.h mkdir -p /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include mkdir -p /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs mkdir -p /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib make build make[1]: Entering directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6' make finale DEST=/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/i386_linux24/dest COMPILE_PART2B=all DESTDIR= make[2]: Entering directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6' cd src; cd config ; make all make[3]: Entering directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/config' rm -f Makefile.version if [ -r SRC/../CML/state ] ; \ then cp Makefile.version-CML Makefile.version ; \ else cp Makefile.version-NOCML Makefile.version ; \ fi make -f Makefile.version AFS_component_version_number.c make[4]: Entering directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/config' echo 'char cml_version_number[]="@(#) OpenAFS 1.2.6 built ' `date +"%Y-%m-%d"` '";' >AFS_component_version_number.c echo 'char* AFSVersion = "openafs 1.2.6"; ' >>AFS_component_version_number.c make[4]: Leaving directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/config' cc -g -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include -O2 -c -o config.o config.c cc -g -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include -O2 -c -o mc.o mc.c cc -g -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include -O2 -o config config.o mc.o cc -g -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include -O2 -o mkvers mkvers.c mkdir -p ../libuafs/afs mkdir -p ../libuafs/rx mkdir -p ../libuafs/afsint mkdir -p ../libuafs/config rm -f ../libuafs/afs/param.h; cp param.i386_linux24_usr.h ../libuafs/afs/param.h rm -f ../libuafs/afs/stds.h; cp stds.h ../libuafs/afs/stds.h rm -f ../libuafs/afs/afs_sysnames.h; cp afs_sysnames.h ../libuafs/afs/afs_sysnames.h rm -f ../libuafs/config/Makefile.i386_linux24; cp Makefile.i386_linux24 ../libuafs/config/Makefile.i386_linux24 rm -f ../libuafs/afs/afs_args.h; cp afs_args.h ../libuafs/afs/afs_args.h rm -f ../libuafs/afs/icl.h; cp icl.h ../libuafs/afs/icl.h rm -f ../libuafs/afs/venus.h; cp venus.h ../libuafs/afs/venus.h rm -f ../libuafs/afs/AFS_component_version_number.c; cp AFS_component_version_number.c ../libuafs/afs/AFS_component_version_number.c mkdir -p ../libafs/afs mkdir -p ../libafs/rx mkdir -p ../libafs/afsint mkdir -p ../libafs/config rm -f ../libafs/afs/param.h; cp param.i386_linux24.h ../libafs/afs/param.h rm -f ../libafs/afs/stds.h; cp stds.h ../libafs/afs/stds.h rm -f ../libafs/afs/afs_sysnames.h; cp afs_sysnames.h ../libafs/afs/afs_sysnames.h rm -f ../libafs/config/Makefile.i386_linux24; cp Makefile.i386_linux24 ../libafs/config/Makefile.i386_linux24 rm -f ../libafs/afs/afs_args.h; cp afs_args.h ../libafs/afs/afs_args.h rm -f ../libafs/afs/icl.h; cp icl.h ../libafs/afs/icl.h rm -f ../libafs/afs/AFS_component_version_number.c; cp AFS_component_version_number.c ../libafs/afs/AFS_component_version_number.c rm -f /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/param.h; cp param.i386_linux24.h /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/param.h rm -f /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/stds.h; cp stds.h /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/stds.h rm -f /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/afs_sysnames.h; cp afs_sysnames.h /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/afs_sysnames.h rm -f /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/afs_args.h; cp afs_args.h /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/afs_args.h rm -f /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/icl.h; cp icl.h /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/icl.h rm -f /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/venus.h; cp venus.h /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/venus.h rm -f /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/debug.h; cp debug.h /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include/afs/debug.h make[3]: Leaving directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/config' cd src; cd pinstall ; make all make[3]: Entering directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/pinstall' echo 'char cml_version_number[]="@(#) OpenAFS 1.2.6 built ' `date +"%Y-%m-%d"` '";' >AFS_component_version_number.c echo 'char* AFSVersion = "openafs 1.2.6"; ' >>AFS_component_version_number.c case i386_linux24 in \ sgi_64 | sgi_65) \ cc -O2 -g -I. -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/config -O2 install.c -o pinstall -lresolv ;; \ sgi_* ) \ cc -O2 -g -I. -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/config -O2 install.c -o pinstall -lresolv -lmld ;; \ *) \ cc -O2 -g -I. -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/config -O2 install.c -o pinstall -lresolv ;; \ esac make[3]: Leaving directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/pinstall' cd src; cd procmgmt ; make all make[3]: Entering directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/procmgmt' cc -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/config -O2 -c -o procmgmt_unix.o procmgmt_unix.c echo 'char cml_version_number[]="@(#) OpenAFS 1.2.6 built ' `date +"%Y-%m-%d"` '";' >AFS_component_version_number.c echo 'char* AFSVersion = "openafs 1.2.6"; ' >>AFS_component_version_number.c cc -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/config -O2 -c -o AFS_component_version_number.o AFS_component_version_number.c rm -f libprocmgmt.a ar crv libprocmgmt.a procmgmt_unix.o AFS_component_version_number.o a - procmgmt_unix.o a - AFS_component_version_number.o ranlib libprocmgmt.a /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/pinstall/pinstall libprocmgmt.a /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a Bad exit code from /bin/cp: 11 Could not open output temp file ``/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a.picasso.cchem.berkeley.edu'': No such file or directory make[3]: *** [/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a] Error 1 make[3]: Leaving directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/procmgmt' make[2]: *** [procmgmt] Error 2 make[2]: Leaving directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6' make[1]: *** [build] Error 2 make[1]: Leaving directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6' make: *** [all] Error 2 !!! ERROR: The ebuild did not complete successfully. !!! Function src_compile, Line 4, Exitcode 2 !!! (no error message)
compiler, use flags, portage version?
I can reproduce this... will take a look
*** Bug 7925 has been marked as a duplicate of this bug. ***
*** Bug 7828 has been marked as a duplicate of this bug. ***
As stated in #7828, removing the keyword "sandbox" from the FEATURES tag in /etc/make.globals makes openafs merge cleanly.
committed
its back ...
*** Bug 8012 has been marked as a duplicate of this bug. ***
The problem in the ebuild appears to be the custom install program that is used... Look for pinstall, and install.c in makefiles and the source tree. Any help finding the bug within the program would be appreciated.
When actually running the command before the error it works. So running: cd /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/procmgmt /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/pinstall/pinstall libprocmgmt.a /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a I get no error. Leads me to believe it is sandbox bug/feature.
Well...i've found the piece of code where the error occurs. I added some debug statements to try and pinpoint what the problem is exactly. The edits i made start on line 183 - here is a clip from my lines 180-207: case 0: /* child */ copy[1] = iname; copy[2] = oname; fprintf(stderr,"DEBUG: %s, %s\n\n",copy[1],copy[2]); execve("/bin/cp", copy, (char **)0); perror("/bin/cp"); exit(1); default: /* parent */ if (waitpid(pid, &status, 0) != pid) { perror("waitpid"); return -1; } } if (status != 0) { fprintf(stderr, "Bad exit code from /bin/cp: %d\n", status); fprintf(stderr," Return value: %d\n", pid); fprintf(stderr," Status: %d\n", status); fprintf(stderr," WIFSTOPPED: %d\n", WIFSTOPPED(status)); fprintf(stderr," WIFSIGNALED: %d\n", WIFSIGNALED(status)); fprintf(stderr," WIFEXITED: %d\n", WIFEXITED(status)); fprintf(stderr," WEXITSTATUS: %d\n", WEXITSTATUS(status)); fprintf(stderr," WTERMSIG: %d\n", WTERMSIG(status)); fprintf(stderr," WSTOPSIG: %d\n", WSTOPSIG(status)); return -1; } And heres the relivant snippet of what printed out. ranlib libprocmgmt.a /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/pinstall/pinstall libprocmgmt.a /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a DEBUG: libprocmgmt.a, /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a.lain Bad exit code from /bin/cp: 11 Return value: 9422 Status: 11 WIFSTOPPED: 0 WIFSIGNALED: 1 WIFEXITED: 0 WEXITSTATUS: 0 WTERMSIG: 11 WSTOPSIG: 0 Could not open output temp file ``/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a.lain'': No such file or directory make[3]: *** [/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a] Error 1 make[3]: Leaving directory `/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/procmgmt' make[2]: *** [procmgmt] Error 2 So this isn't just a return code like i thought, but /bin/cp is actually segfaulting for some reason.
Created attachment 4342 [details, diff] Patch to fix segfault on execve when building Here is a patch that works on my system. I'm not sure if its an optimization thing, but the (char **)0 for the array just wasn't cutting it (it could also be a gcc 3.2 issue - are others who are having this problem using 3.2?). This patch fixes it by creating an emtpy array with 1 null element. I've fixed both places that run /bin/cp, but i'm not sure if the AIX
Created attachment 4343 [details, diff] Patch to fix segfault on execve when building Here is a patch to openafs-1.2.6 that works on my system. I'm not sure if its an optimization thing, but the (char **)0 for the array just wasn't cutting it (it could also be a gcc 3.2 issue - are others who are having this problem using 3.2?). This patch fixes it by creating an emtpy array with 1 null element. I've fixed both places that run /bin/cp, but i'm not sure if the AIX one works or is even broken... It is currently working on my system, building properly as i type this. How i applied this patch: start emerge - ctrl-Z when configuring cd <dir/with/install.c>; cat ~/openafs-1.2.6.patch | patch -p0 cd; fg Let me know if it works
Works fine on my end. Good patch. I'd say we look into what causes this. Perhaps email the GCC mailing list to see if this is a problem with GCC or not. Other than that, let's commit the patch, put it into the ebuild, and notify upstream authors. Huzzah!
Committed the patch... Leaving this open so I can contact the devels.