# Error emerging procmail-3.22-r6

## quill18

Trying to move my mailserver from redhat to a gentoo machine, but getting the following error while trying to emerge procmail:

```

gentoo vacman # emerge procmail -Uv

>>> --upgradeonly implies --update... adding --update to options.

Calculating dependencies ...done!

>>> emerge (1 of 1) net-mail/procmail-3.22-r6 to /

>>> md5 src_uri ;-) procmail-3.22.tar.gz

>>> Unpacking source...

>>> Unpacking procmail-3.22.tar.gz to /var/tmp/portage/procmail-3.22-r6/work

>>> 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" "-O3 -march=i686 -funroll-loops -pipe -fomit-frame-pointer -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'

echo Housekeeping file >config.check

/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:  7906 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:  7999 Segmentation fault      grepfor struct '#define WMACROS_NON_POSIX'

./autoconf: line 1011:  8001 Segmentation fault      grepfor union '#define WMACROS_NON_POSIX'

Testing for various struct passwd members

./autoconf: line 1024:  8009 Segmentation fault      grepfor pw_passwd '#define NOpw_passwd'

./autoconf: line 1025:  8010 Segmentation fault      grepfor pw_class '#define NOpw_class'

./autoconf: line 1026:  8011 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:  8032 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8033 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8034 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8035 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8036 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8038 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8039 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8040 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8041 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8042 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8043 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8044 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8045 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8046 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8053 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8057 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1081:  8058 Segmentation fault      grepfor $func "#define NO$func"

./autoconf: line 1084:  8059 Segmentation fault      grepfor strerror "#define NOstrerror"

./autoconf: line 1090:  8060 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:  8061 Segmentation fault      grepfor setrgid '#define NOsetrgid'

./autoconf: line 1097:  8062 Segmentation fault      grepfor setegid '#define NOsetegid'

./autoconf: line 1098:  8063 Segmentation fault      grepfor strchr '#define strchr(s,c) index(s,c)'

./autoconf: line 1101:  8064 Segmentation fault      grepfor uname "#define NOuname               /* <sys/utsname.h> defines it, the libraries don't */"

./autoconf: line 1102:  8066 Segmentation fault      grepfor endpwent '#define endpwent()'

./autoconf: line 1103:  8067 Segmentation fault      grepfor endgrent '#define endgrent()'

./autoconf: line 1112:  8068 Segmentation fault      grepfor gethostbyname '#define NO_COMSAT'

./autoconf: line 1112:  8069 Segmentation fault      grepfor getprotobyname '#define UDP_protocolno 17'

./autoconf: line 1112:  8070 Segmentation fault      grepfor endhostent '#define endhostent()'

./autoconf: line 1112:  8071 Segmentation fault      grepfor endservent '#define endservent()'

./autoconf: line 1112:  8072 Segmentation fault      grepfor endprotoent '#define endprotoent()'

./autoconf: line 1114:  8073 Segmentation fault      grepfor strstr '#define SLOWstrstr'

./autoconf: line 1114:  8074 Segmentation fault      grepfor clock '#define SLOWstrstr'

./autoconf: line 1179:  8081 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+0x6a4): In function `main':

: undefined reference to `setrgid'

_autotst.o(.text+0x74f): 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

make[1]: Leaving directory `/var/tmp/portage/procmail-3.22-r6/work/procmail-3.22/src'

make: *** [autoconf.h] Error 2

!!! ERROR: net-mail/procmail-3.22-r6 failed.

!!! Function src_compile, Line 41, Exitcode 2

!!! (no error message)

```

Anyone got a tip, or do I need to submit a bug report somewhere?

----------

## Pardok

Getting the same error.  

I was able to install procmail a couple days ago, but now, after emerge sync, I'm getting this error.

Perhaps a bad ebuild?

----------

## quill18

Certainly seems so.

----------

## quill18

A bug is open for this problem at:

https://bugs.gentoo.org/show_bug.cgi?id=46891

----------

## balou

i have exaclty the same problem :/

----------

## peterkim

It looks like autoconf problem?

try to downgrade automake/autoconf version, and re emerge it. 

or you can learn me  :Razz: 

emerge procmail

cd /var/tmp/portage/procmail-3.22-r6/work/procmail-3.22/

make

cp /usr/portage/net-mail/procmail/procmail-3.22-r6.ebuild /usr/portage/net-mail/procmail/procmail-3.22-r6.ebuild.bak

vi /usr/portage/net-mail/procmail/procmail-3.22-r6.ebuild

find these parameters in src_compile() section:

"emake || die"

delete them and return to shell.

typing:

emerge procmail

I tested it ok,and maybe you can try the same way.

----------

## echo6

 *peterkim wrote:*   

> find these parameters in src_compile() section:
> 
> "emake || die"

 

Excellent,  I had exactly the same problem here,  this fixed it.

----------

## Mostly Mark

peterkim,

This worked for me too. Thanks for the fix!

----------

## Gushy

Nice tip, thanks.  :Smile: 

----------

## LowFuel

This didnt work for me. I mean, I dont get any errors now, but no procmail app ends up in /usr/bin as it should.

I never had procmail installed before, perhaps you were all just upgrading?

Anyway, if anyone else has a tip for me I'd appreciate it.

----------

## subzero_dk

Hey,

Remove all sandbox-related features in your make.conf file and it'll work.

----------

## pivertd

The mod of the ebuild didn't work for me... procmail have been emerged EXCEPT the /usr/bin/procmail executable... (new install of procmail, not an upgrade)

----------

## pivertd

Thanks Subzero...

I just put

FEATURES="-sandbox"

in my /etc/make.conf

And procmail compiled correctly...

Bye

----------

## linux_girl

 *pivertd wrote:*   

> Thanks Subzero...
> 
> I just put
> 
> FEATURES="-sandbox"
> ...

 

yeah nice.

it solved the probleme.

i was thinking that 

FEATURES="" #in /etc/make.conf will be engouth to disable sandbox

 :Surprised: 

 :Embarassed:   :Laughing: 

----------

## Wi1d

Thanks for the fix peterkim. Worked like a charm and I saved from pulling some hair.

----------

## drumkilla

adding FEATURES="-sandbox" fixed the problem for me!   :Very Happy: 

Thanks so much for the fix.  That was much easier than the fix I was trying to come up with ...

----------

## Guest

Worked like a charm, thanks.

----------

