Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 224251 - net-analyzer/net-snmp-5.4.1-r3 fails to configure with --as-needed
Summary: net-analyzer/net-snmp-5.4.1-r3 fails to configure with --as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL: https://sourceforge.net/tracker/index...
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2008-05-30 18:09 UTC by Holger Hoffstätte
Modified: 2008-06-08 06:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
log for failed configuration (config.log,188.49 KB, text/plain)
2008-06-07 13:56 UTC, Holger Hoffstätte
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hoffstätte 2008-05-30 18:09:08 UTC
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.
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-06-07 13:01:53 UTC
Please post the generated config.log, that should tell what the problem is exactly.
Comment 2 Holger Hoffstätte 2008-06-07 13:56:02 UTC
Created attachment 155829 [details]
log for failed configuration
Comment 3 Holger Hoffstätte 2008-06-07 13:59:35 UTC
(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.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-06-07 14:10:22 UTC
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.
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-06-07 14:39:08 UTC
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.
Comment 6 Rafał Mużyło 2008-06-07 16:03:08 UTC
Just to make my point, look at bug 145960#c8, noticed anything interesting ?
'checked upstream tracker' you say...
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-06-07 16:13:15 UTC
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 :)
Comment 8 Holger Hoffstätte 2008-06-07 19:20:47 UTC
Fix confirmed. Thanks guys, we all love you. =)
Comment 9 Peter Volkov (RETIRED) gentoo-dev 2008-06-08 06:58:43 UTC
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.