just tried emerge procmail .. it died the following way: >>> Source unpacked. patching file src/authenticate.c /bin/sh ./initmake /bin/sh "/bin/sh" "/bin/rm -f" "mv -f" "ln" \ "-lm -ldir -lx -lsocket -lnet -linet -lnsl_s -lnsl_i -lnsl -lsun -lgen -lsockdns -ldl" \ "/lib /usr/lib /usr/local/lib" \ /dev/null "make" o \ "gcc" "-mcpu=ultrasparc -O3 -pipe -fno-inline-functions " "-s " "procmail lockfile formail mailstat" \ "procmail formail lockfile" \ "procmailrc procmailsc procmailex" "src man" \ "/usr/bin" \ "strip" gcc seems to work fine, using that as the C-compiler ...scanning for 13 libraries... ...scanning for 12 libraries... ...scanning for 11 libraries... ...scanning for 10 libraries... ...scanning for 9 libraries... ...scanning for 8 libraries... ...scanning for 7 libraries... ...scanning for 6 libraries... ...scanning for 5 libraries... ...scanning for 4 libraries... Added LDFLAGS= -lm -lnsl -ldl -lc cd src; make ../autoconf.h make[1]: Entering directory `/var/tmp/portage/procmail-3.22-r6/work/procmail-3.22/src' /bin/sh ./autoconf /bin/sh "/bin/rm -f" "mv -f" /dev/null \ "grep -F" "make" o "/tmp . " \ "/usr/bin" ../autoconf.h Using the following directories for the LOCKINGTESTs: /tmp . Initiating fcntl()/kernel-locking-support tests Proceeding with kernel-locking-support tests in the background Testing for const ./autoconf: line 743: 31889 Segmentation fault grepfor const '#define NO_const' Testing for volatile Testing for prototypes Testing for enum Checking for POSIX and ANSI/ISO system include files Checking for network/comsat/biff support Testing for void*, size_t, off_t, pid_t, time_t, mode_t, uid_t & gid_t Checking realloc implementation Testing for WIFEXITED(), WIFSTOPPED(), WEXITSTATUS() & WSIGTERM() ./autoconf: line 1011: 32012 Segmentation fault grepfor struct '#define WMACROS_NON_POSIX' ./autoconf: line 1011: 32013 Segmentation fault grepfor union '#define WMACROS_NON_POSIX' Testing for various struct passwd members ./autoconf: line 1024: 32032 Segmentation fault grepfor pw_passwd '#define NOpw_passwd' ./autoconf: line 1025: 32033 Segmentation fault grepfor pw_class '#define NOpw_class' ./autoconf: line 1026: 32034 Segmentation fault grepfor pw_gecos '#define NOpw_gecos' Testing for memmove, strchr, strpbrk, strcspn, strtol, strstr, rename, setrgid, setegid, pow, opendir, mkdir, waitpid, fsync, ftruncate, strtod, strncasecmp, strerror, strlcat, memset, bzero, and _exit ./autoconf: line 1081: 32062 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32063 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32064 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32065 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32066 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32067 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32068 Bus error grepfor $func "#define NO$func" ./autoconf: line 1081: 32070 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32071 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32072 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32073 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32074 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32075 Bus error grepfor $func "#define NO$func" ./autoconf: line 1081: 32076 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32077 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32078 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1081: 32079 Segmentation fault grepfor $func "#define NO$func" ./autoconf: line 1084: 32080 Segmentation fault grepfor strerror "#define NOstrerror" ./autoconf: line 1090: 32081 Segmentation fault grepfor opendir " #define NOopendir /* the readdir library does not seem to be available this will slightly affect the way a filenumber is selected in MH-folders by procmail */ " ./autoconf: line 1092: 32082 Segmentation fault grepfor setrgid '#define NOsetrgid' ./autoconf: line 1097: 32083 Segmentation fault grepfor setegid '#define NOsetegid' ./autoconf: line 1098: 32084 Segmentation fault grepfor strchr '#define strchr(s,c) index(s,c)' ./autoconf: line 1101: 32085 Segmentation fault grepfor uname "#define NOuname /* <sys/utsname.h> defines it, the libraries don't */" ./autoconf: line 1102: 32086 Segmentation fault grepfor endpwent '#define endpwent()' ./autoconf: line 1103: 32087 Segmentation fault grepfor endgrent '#define endgrent()' ./autoconf: line 1112: 32088 Segmentation fault grepfor gethostbyname '#define NO_COMSAT' ./autoconf: line 1112: 32089 Segmentation fault grepfor getprotobyname '#define UDP_protocolno 17' ./autoconf: line 1112: 32090 Segmentation fault grepfor endhostent '#define endhostent()' ./autoconf: line 1112: 32091 Segmentation fault grepfor endservent '#define endservent()' ./autoconf: line 1112: 32092 Segmentation fault grepfor endprotoent '#define endprotoent()' ./autoconf: line 1114: 32093 Segmentation fault grepfor strstr '#define SLOWstrstr' ./autoconf: line 1114: 32094 Segmentation fault grepfor clock '#define SLOWstrstr' ./autoconf: line 1179: 32095 Segmentation fault grepfor memmove '#define NOmemmove' Determining the maximum number of 16 byte arguments execv() takes Whoeaaa! This actually can't happen. You have a look and see if you detect anything uncanny: ******************************************************* _autotst.o(.text+0x684): In function `main': : undefined reference to `setrgid' _autotst.o(.text+0x754): In function `main': : undefined reference to `setrgid' collect2: ld returned 1 exit status make[2]: *** [_autotst] Error 1 ******************************************************* I suggest you take a look at the definition of LDFLAGS* in the Makefile before you try make again. make[1]: *** [../autoconf.h] Error 1 I find that rather harsh ... anyway, it's sparced (not even ~sparced) so I was pretty surprised ..
hrm, worksforme, so... emerge info please?
yeah yeah ciaran, i know. sorry, i keep forgetting that .. coming right up .. Portage 2.0.50-r3 (default-sparc64-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.6.4) ================================================================= System uname: 2.6.4 sparc64 sun4u Gentoo Base System version 1.4.3.10p1 ccache version 2.2 [enabled] Autoconf: sys-devel/autoconf-2.59 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="sparc ~sparc" AUTOCLEAN="yes" CFLAGS="-mcpu=ultrasparc -O3 -pipe" CHOST="sparc-unknown-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-mcpu=ultrasparc -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache sandbox userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.inode.at http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X aalib avi berkdb cdr client crypt cups encode fbcon fftw foomaticdb gdbm gif gpm gtk imlib jpeg kde libwww mad mikmod motif mpeg ncurses nls oggvorbis oss pam pdflib perl png python qt readline samba sdl server slang sparc spell ssl tcltk tcpd tetex tiff truetype xml2 xmms xv zlib" there ya go
-O3 seems a little aggressive doesnt it ?
I can replicate on sparc using either sparc or ~sparc. Can reproduce with ~x86 too, so re-assigning to net-mail
I don't know if this helps but as I've got this problem on my x86 box too I thought I'd have a little play and I've managed to track it down to the kernel-locking tests it does... they don't seem to like being run in a sandbox... remove all sandboxing items from FEATURES and it compiles fine.
confirmed .. turned off sandboxing and it installed just fine. So .. is this a security thing? I mean sandboxing not working is IMHO a problematic issue ..
I have the same problem on selinux. # uname -a Linux dao 2.4.24-selinux-r2 #1 SMP Mon Apr 5 16:59:18 EEST 2004 i686 Celeron (Mendocino) GenuineIntel GNU/Linux # id uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video) context=root:staff_r:staff_t # cat /selinux/enforce 0 #cat /etc/make.conf CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer" CHOST="i386-pc-linux-gnu" USE="mmx" CXXFLAGS="${CFLAGS}" FEATURES="loadpolicy" btw, I can compile the package by hand. It works fine.
As posted in: http://forums.gentoo.org/viewtopic.php?p=1018096 I am also having this problem on an x86 platform. Is there any info I should be providing from my local machine to help with the diagnosis?
I also get this on my desktop machine (~x86). Oddly, it emerge'd fine on my local mail server though (also ~x86). If it helps here are the emerge info's for the two of them: the one that doesn't work (desktop): Portage 2.0.50-r3 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.4-mm2) ================================================================= System uname: 2.6.4-mm2 i686 AMD Athlon(TM) XP 2100+ Gentoo Base System version 1.4.3.13p1 distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox sfperms strict" GENTOO_MIRRORS="ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/" MAKEOPTS="-j7" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X alsa avi berkdb bonobo crypt cups curl esd fam fbcon foomaticdb gd gdbm gif gnome gtk gtk2 gtkhtml imlib java jpeg mad maildir mmx mozilla mpeg ncurses nptl opengl oss pam pdflib perl png ppds python readline samba slang spell sse ssl svga tcpd tiff truetype usb videos x86 xml2 xmms xv zlib" the one that does work (mail server): Portage 2.0.50-r3 (hardened-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.4-hardened-r3) ================================================================= System uname: 2.6.4-hardened-r3 i686 Celeron (Mendocino) Gentoo Base System version 1.4.3.13p1 distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium2 -fomit-frame-pointer -fstack-protector -fPIC -fforce-addr -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" 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/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium2 -fomit-frame-pointer -fstack-protector -fPIC -fforce-addr -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox sfperms strict" GENTOO_MIRRORS="http://192.168.1.3/gentoo/ ftp://mirror.iawnet.sandia.gov/pub/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://192.168.1.3/gentoo-portage/" USE="acl apache2 berkdb crypt fastcgi gdbm hardened imap maildir mmx ncurses nptl pam perl png prelude python readline sasl ssl tcpd x86 zlib"
I'm having the same problem with procmail, but I also get seg faults in mgetty and a couple others. Putting FEATURES="-sandbox" fixes this error, but I don't know what impact that would have. Have this on 2 servers, one running 2.6.3 the other 2.6.4. This is my working emerge info (with the FEATURES=-sandbox) Portage 2.0.50-r3 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.4) ================================================================= System uname: 2.6.4 i686 Intel(R) Pentium(R) III CPU family 1133MHz Gentoo Base System version 1.4.3.13 Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -mcpu=i686 -funroll-loops -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" 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/terminfo /etc/env.d" CXXFLAGS="-O3 -mcpu=i686 -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="adns apache1 apm berkdb crypt cups curl doc encode fam fbcon firebird flash foomaticdb freetds gd gdbm gif gtk2 imagemagick imap imlib innodb java jikes jpeg kerberos ldap libg++ libwww mad maildir mcal mikmod mpeg mysql ncurses nls odbc oggvorbis oss pam pdflib perl png postgres ppds python quicktime readline samba sasl sdl slang snmp spell sqlite ssl svga tetex tiff truetype x86 xml xml2 xmms zlib"
to prevent this error emerge procmail like this: # FEATURES="-sandbox" emerge procmail
look at comment #5, this has already been mentioned. This is not a fix, though. packages should work with sandboxing.
I just updated my portage from 2.0.50-r3 to the new 2.0.50-r5, which seems to have fixed something in libsandbox.so - procmail-3.22-r6 just emerged perfectly!
true, works also on sparc with new portage ...
Sorry for all the CC's guys, but can you comment on this and note if it's fixed now. I'd really like to close this bug. Looks like it was libsandbox all along. Thanks!
Well... While it now compiles in a sandbox it comes up with the following error if you have "usersandbox" and "userpriv" in FEATURES... ------------------------------------------------------------------------------------- make[1]: Leaving directory `/var/tmp/portage/procmail-3.22-r6/work/procmail-3.22/src' If you would like to inspect the results before running make install: All installable files can be found in the new/ subdirectory. >>> Test phase [not enabled]: mail-filter/procmail-3.22-r6 touch: cannot touch `.tested': Permission denied !!! ERROR: mail-filter/procmail-3.22-r6 failed. !!! Function dyn_test, Line 894, Exitcode 1 !!! Failed to 'touch .tested' in /var/tmp/portage/procmail-3.22-r6 !!! If you need support, post the topmost build error, NOT this status message. ------------------------------------------------------------------------------------- I don't know if this is normal for this package but thought I'd just point it out.
Forgot to mention I'm using Portage 2.0.51_pre12 (just in case that makes a difference)
Nevermind, found out what was causing it. If you've previously built it without usersandbox and userpriv enabled and then try to do it with them it fails because the file ".tested" is left behind and owned by root with the following perms -rw-r--r--. I don't know what the significance of this file is... is it needed after the build? could it be owned by the portage user like the temp directory which is also left behind?
Resolving as this appears to be fixed. If anyone feels it isn't, feel free to re-open.