When trying to emerge efence-2.4.11, I got an error about epatch not being found, and later in the ebuild make dumped core. I patched the ebuild to inherit eutils and efence emerged fine after that. Reproducible: Always Steps to Reproduce: 1. emerge -pv '=efence-2.4.11' 2. 3. Actual Results: Coredump during emerge. Expected Results: efence should have emerged. >>> emerge (1 of 1) dev-util/efence-2.4.11 to / >>> md5 src_uri ;-) efence_2_4_11.zip >>> Unpacking source... >>> Unpacking efence_2_4_11.zip to /var/tmp/portage/efence-2.4.11/work /usr/lib/portage/bin/ebuild.sh: line 24: epatch: command not found >>> Source unpacked. i686-pc-linux-gnu-gcc -g -fPIC -g -fPIC -c createconf.c -o createconf.o rm -f createconf i686-pc-linux-gnu-gcc -g -fPIC createconf.o -o createconf ./createconf >efence_config.h g++ -g -fPIC -c efencepp.cpp -o efencepp.o i686-pc-linux-gnu-gcc -g -fPIC -g -fPIC -c efence.c -o efence.o rm -f libefence.a ar crv libefence.a efencepp.o efence.o a - efencepp.o a - efence.o g++ -g -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \ efencepp.o efence.o -lpthread -lc i686-pc-linux-gnu-gcc -g -fPIC -g -fPIC -c tstheap.c -o tstheap.o rm -f tstheap i686-pc-linux-gnu-gcc -g -fPIC tstheap.o libefence.a -o tstheap -lpthread i686-pc-linux-gnu-gcc -g -fPIC -g -fPIC -c eftest.c -o eftest.o rm -f eftest i686-pc-linux-gnu-gcc -g -fPIC eftest.o libefence.a -o eftest -lpthread g++ -g -fPIC -c eftestpp.cpp -o eftestpp.o rm -f eftestpp g++ -g -fPIC -g -fPIC eftestpp.o libefence.a -o eftestpp -lpthread Testing Electric Fence. After the last test, it should print that the test has PASSED. ./eftest Electric Fence 2.4.11 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com> Copyright (C) 2002-2005 Hayati Ayguen <h_ayguen@web.de>, Procitec GmbH Electric Fence: ptr=0x401b7ff0 size=16 alloced from UNKNOWN (use #include "efence.h")(0) not freed Electric Fence: ptr=0x401b9f80 size=128 alloced from UNKNOWN (use #include "efence.h")(0) not freed ElectricFence Aborting: Electric Fence: EF_delFrame(): Found non free'd pointers. make: *** [all] Illegal instruction (core dumped) !!! ERROR: dev-util/efence-2.4.11 failed. !!! Function src_compile, Line 28, Exitcode 2 !!! emake failed !!! If you need support, post the topmost build error, NOT this status message. # emerge info Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.4.27 i686) ================================================================= System uname: 2.4.27 i686 AMD Athlon(tm) XP 2800+ Gentoo Base System version 1.4.16 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux-headers-2.4.21 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon-xp -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://mirror.tucdemonic.org/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.easynet.nl/mirror/gentoo/ ftp://ftp.easynet.nl/mirror/gentoo/ http://mirrors.tds.net/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowex X X509 aac aalib acpi aim alsa audiofile avi berkdb bitmap-fonts bonobo cap cdparanoia cdr chroot cjk crypt cscope cups curl dga directfb doc dv dvd edl encode ethereal extensions f77 faad fam fbcon fbdev flac font-server foomaticdb fortran gcj gdbm ggi gif ginac gmail gmp gmtfull gmthigh gmtsuppl gmttria gnome gpg gpm graphviz gstreamer gtk gtk2 gtkhtml guile hardened icq imagemagick imlib ipv6 jabber jack java javascript jbig jpeg ladcaa lcms libcaca libg++ libwww live lzo lzw-tiff mad maildir mailwrapper md5sum mikmod mime mmx mmx2 mng motif mozilla mpeg msn ncurses network nntp nodrm oggvorbis opengl pam pcre pdflib perl pic plotutils png ppds python qhull quicktime readline real rtc sasl sdl silc skey slang sndfile snmp socks5 spell sse ssl svg svga tcltk tcpd tetex tga theora tiff truetype truetype-fonts type1-fonts unicode usb uudeview vim-with-x wmf wxwindows x86 xanim xgetdefault xine xml xml2 xmms xv xvid xvmc yahoo zlib video_cards_radeon"
Ok, the missing inherit is fixed. As far as the segfault goes during 'make check' your guess is as good as mine. There are a couple apps whose 'make check' works fine when run manually, but segfault when portage runs it (app-text/vilistextum does this for me as well). If you unzip the efence source, run 'make all check', it'll pass. Unfortunately, I haven't been able to figure out what's causing it to fail when portage runs it.
Looks like the bug w/ FEATURES="test" is a sandbox bug. At least, emerge no longer fails if I run it w/ FEATURES="test -sandbox".
For me it always fails, sandbox or no, run as portage or root, even if I manually extract the tarball and compile it as a normal user. I suppose it would help if the reporter could check if it succeeds for him without the sandbox. Then we'd know if my problem is a new one.
this isn't a portage bug. telling efence not to put malloc/free in the global namespace works wonders: e.g.: ; make gcc -g -fPIC -c createconf.c -o createconf.o rm -f createconf gcc -g -fPIC createconf.o -o createconf ./createconf >efence_config.h g++ -g -fPIC -c efencepp.cpp -o efencepp.o gcc -g -fPIC -c efence.c -o efence.o rm -f libefence.a ar crv libefence.a efencepp.o efence.o a - efencepp.o a - efence.o g++ -g -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \ efencepp.o efence.o -lpthread -lc gcc -g -fPIC -c tstheap.c -o tstheap.o rm -f tstheap gcc -g -fPIC tstheap.o libefence.a -o tstheap -lpthread gcc -g -fPIC -c eftest.c -o eftest.o rm -f eftest gcc -g -fPIC eftest.o libefence.a -o eftest -lpthread g++ -g -fPIC -c eftestpp.cpp -o eftestpp.o rm -f eftestpp g++ -g -fPIC eftestpp.o libefence.a -o eftestpp -lpthread Testing Electric Fence. After the last test, it should print that the test has PASSED. ./eftest make: *** [all] Segmentation fault (core dumped) ; gdb eftest core GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". Core was generated by `./eftest'. Program terminated with signal 11, Segmentation fault. warning: current_sos: Can't read pathname for load map: Input/output error Reading symbols from /lib/libpthread.so.0...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib/libc.so.6...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 #0 0xb7f955c3 in pthread_self () from /lib/libpthread.so.0 (gdb) r Starting program: /home/quanstro/src/efence/eftest [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 9922)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 9922)] 0xb7f955c3 in pthread_self () from /lib/libpthread.so.0 (gdb) where #0 0xb7f955c3 in pthread_self () from /lib/libpthread.so.0 #1 0x08049563 in EF_get_sem () at sem_inc.h:137 #2 0x08049d87 in _eff_init () at efence.c:367 #3 0x0804ab9c in _eff_calloc (nelem=1, elsize=520, filename=0x804b900 "UNKNOWN (use #include \"efence.h\")", lineno=0) at efence.c:984 #4 0x0804af1e in calloc (nelem=1, elsize=520) at efence.c:1061 #5 0xb7ff9011 in _dl_tls_setup () from /lib/ld-linux.so.2 #6 0xb7f94963 in __pthread_initialize_minimal () from /lib/libpthread.so.0 #7 0xb7f912e5 in call_initialize_minimal () from /lib/libpthread.so.0 #8 0xb7f90ccc in _init () from /lib/libpthread.so.0 #9 0xb7ff6bbe in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2 #10 0xb7ff6d4b in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2 #11 0xb7feb805 in ?? () from /lib/ld-linux.so.2 (gdb) quit The program is running. Exit anyway? (y or n) y ; make 'EF_OPTIONS=-DEF_NO_GLOBAL_MALLOC_FREE' gcc -g -fPIC -DEF_NO_GLOBAL_MALLOC_FREE -c createconf.c -o createconf.o rm -f createconf gcc -g -fPIC -DEF_NO_GLOBAL_MALLOC_FREE createconf.o -o createconf ./createconf >efence_config.h g++ -g -fPIC -DEF_NO_GLOBAL_MALLOC_FREE -c efencepp.cpp -o efencepp.o gcc -g -fPIC -DEF_NO_GLOBAL_MALLOC_FREE -c efence.c -o efence.o rm -f libefence.a ar crv libefence.a efencepp.o efence.o a - efencepp.o a - efence.o g++ -g -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \ efencepp.o efence.o -lpthread -lc gcc -g -fPIC -DEF_NO_GLOBAL_MALLOC_FREE -c tstheap.c -o tstheap.o rm -f tstheap gcc -g -fPIC -DEF_NO_GLOBAL_MALLOC_FREE tstheap.o libefence.a -o tstheap - lpthread gcc -g -fPIC -DEF_NO_GLOBAL_MALLOC_FREE -c eftest.c -o eftest.o rm -f eftest gcc -g -fPIC -DEF_NO_GLOBAL_MALLOC_FREE eftest.o libefence.a -o eftest -lpthread g++ -g -fPIC -DEF_NO_GLOBAL_MALLOC_FREE -c eftestpp.cpp -o eftestpp.o rm -f eftestpp g++ -g -fPIC -DEF_NO_GLOBAL_MALLOC_FREE eftestpp.o libefence.a -o eftestpp - lpthread Testing Electric Fence. After the last test, it should print that the test has PASSED. ./eftest ./tstheap 3072 Electric Fence confidence test PASSED. bash-2.05b# emerge info Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4. 20041102-r1, 2.6.11-gentoo-r8ewq i686) ================================================================= System uname: 2.6.11-gentoo-r8ewq i686 Pentium III (Coppermine) Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Apr 29 2005, 10:26:12)] distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] dev-lang/python: 2.3.5 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/ share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb / usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/ share/texmf/xdvi/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distcc distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/ distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X acpi adns alsa apm arts avi berkdb bitmap-fonts blas bzlib cdparanoia cdr crypt cups curl divx4linux dts dvd dvdr dvdread emboss encode esd fam foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imlib ipv6 jpeg kde lapack libcaca libg++ libwww mad mhash mikmod mmap mmx motif mp3 mpeg ncurses nls nvidia offensive ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime readline real rtc sdl spell sse ssl svga tcltk tetex theora tiff truetype truetype-fonts type1-fonts unicode usb vorbis xanim xml xml2 xmms xpm xv xvid xvmc zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY bash-2.05b#
same problem on AMD64 Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r7 x86_64) ================================================================= System uname: 2.6.11-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.6.12 Python: dev-lang/python-2.3.5 [2.3.5 (#1, May 30 2005, 19:34:17)] dev-lang/python: 2.3.5 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.8.5-r3, 1.6.3, 1.5, 1.7.9-r1, 1.4_p6, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.8.1-r4 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /usr/X11R6/bin/startx /etc/env.d" CXXFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig candy ccache distlocks sandbox severe sfperms strict test" GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/" LANG="de_DE@euro" LC_ALL="de_DE@euro" LINGUAS="de_DE@euro" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="X aac acpi alsa amd64 avi berkdb bitmap-fonts bzlib cdr crypt cups curl dga directfb dlloader dts dvd dvdr dvdread eds emacs encode esd exif fam fbcon ffmpeg font-server foomaticdb fortran gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 hal hardened howl imagemagick imlib ipv6 ithreads javascript jp2 jpeg lcms libwww lzo lzw lzw-tiff mad matroska memlimit mikmod mmap mng mozdevelop mozsvg mp3 mpeg ncurses nls nptl nvidia ogg oggvorbis openal opengl oss pam pda pdflib perl png ppds python quicktime readline real sdl slang ssl svg tcltk tcpd test tetex tga threads tidy tiff truetype truetype-fonts type1-fonts unicode usb userlocales videos vorbis wmf xine xml2 xmms xpm xprint xrandr xv xvid xvmc zlib linguas_de_DE@euro userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LDFLAGS, PORTDIR_OVERLAY
Definite a sandbox conflict: -- works with FEATURES="maketest -sandbox" -- fails with FEATURES="maketest sandbox" -- works when run manually -- fails when run manually with LD_PRELOAD=/usr/lib64/libsandbox.so.0 I added RESTRICT=test to the 2.4.13-r1 ebuild
Err... how can you state it's definitely a sandbox bug when griffon26 states otherwise, as does another user? RESTRICT="test" might make it work for a few, but are people commenting that it's failing regardless...