After adding some USE-flags for net-snmp I tried to remerge an already working 5.4.1-r3, only to be greeted with a perl-related failure during autoconf. Turns out that I also had added --as-needed to my LDFLAGS after the last merge; removing --as-needed and re-merging immediately works fine. Reproducible: Always Steps to Reproduce: 1. add --as-needed to LDFLAGS 2. emerge \=net-snmp-5.4.1-r3 3. fail! Actual Results: .. checking whether i686-pc-linux-gnu-gcc is a GNU C compiler... yes checking for Perl CFLAGS... -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib/perl5/5.8.8/i686-linux/CORE checking for Perl LDFLAGS... -rdynamic -L/usr/local/lib /usr/lib/perl5/5.8.8/i686-linux/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.8.8/i686-linux/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc checking for Perl CCDLFLAGS... -rdynamic checking for eval_pv... no checking for perl_eval_pv... no checking for Perl_eval_pv... no configure: error: Could not find the eval_pv, perl_eval_pv or Perl_eval_pv functions needed for embedded Perl support. Either set the environment variable PERLPROG to a different perl binary or use --disable-embedded-perl to turn off embedded Perl functionality altogether. .. Expected Results: clean build I was not sure if maybe my libperl/per were screwed up so I remerged them; that didn't help, which suggests that the problem is indeed in net-snmp. No other perl-related packages have problems either.
Please post the generated config.log, that should tell what the problem is exactly.
Created attachment 155829 [details] log for failed configuration
(In reply to comment #1) > Please post the generated config.log, that should tell what the problem is > exactly. Done, see line 3666 for the link failure. Shouldn't the LDFLAGS come after the source file, not before? In any case thanks for looking into this.
Okay, I can confirm it's a problem with net-snmp's configure.in, sigh, that project made me cry already quite some times :( At any rate, here it is the problem, I'll see if it doesn't make me cry further if I try to fix it later: if test "x$embed_perl" != "xno" ; then OLDLDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $netsnmp_perlldopts" [snip] the ldopts are reported by perl through ExtUtils::Embed: netsnmp_perlldopts=`$myperl -MExtUtils::Embed -e ldopts` What perl reports is _mostly_ libraries, with the exception of -rdynamic -- which is correct to be passed _just_ for the following .a -- so it should be passed to LIBS rather than LDFLAGS. The patch should be pretty trivial if there are no further issues.
I should have checked upstream tracker first, the patch was there, not like it took me more than two minutes to prepare, took more time to actually build net-snmp ;) Patch added to 5.4.1-r3.
Just to make my point, look at bug 145960#c8, noticed anything interesting ? 'checked upstream tracker' you say...
Err okay I did NOT notice that because I didn't see any other open bug. I hate when people close bugs when they aren't fixed yet (and filtering is not fixing). Thanks for the patch anyway :)
Fix confirmed. Thanks guys, we all love you. =)
Thank you Diego. I agree that filtering of --as-needed is not a solution. Just wanted to add that this is FIXED in net-snmp-5.4.1-r4, not -r3.