Bug 91509 - libelf requirement for build from source
libelf requirement for build from source
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: net-snmp (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-23 11:54 EDT by Hrunting Johnson
Modified: 2015-03-04 20:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-05 08:56:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hrunting Johnson 2003-05-23 11:54:08 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b)
Gecko/20030516 Mozilla Firebird/0.6

Description of problem:
When trying to build net-snmp from stock sources on a RH9 box, the build fails
at the end because -lelf is attempted to be linked in (despite the fix back in
2002).  It looks like it's a problem with libtool, potentially, but it's onlyl
with the net-snmp build that it becomes a problem.  I do not have libelf or
libelf-devel installed.

Here is the particular command that's failing (in net-snmp-5.0.6/agent):
# /bin/sh ../libtool  --mode=link gcc -I/usr/include/rpm -DINET6 -O2 -g -pipe
-march=i386 -mcpu=i686 -Dlinux -I/usr/include/rpm -o snmpd snmpd.lo  
libnetsnmpagent.la libnetsnmpmibs.la helpers/libnetsnmphelpers.la -L/usr/lib/lib
-lwrap ../snmplib/libnetsnmp.la -ldl -lrpm -lrpmio -lpopt  -lbz2 -lz -lcrypto -lm
gcc -I/usr/include/rpm -DINET6 -O2 -g -pipe -march=i386 -mcpu=i686 -Dlinux
-I/usr/include/rpm -o .libs/snmpd snmpd.o  ./.libs/libnetsnmpagent.so
./.libs/libnetsnmpmibs.so helpers/.libs/libnetsnmphelpers.so -L/usr/lib/lib
-lwrap ../snmplib/.libs/libnetsnmp.so -ldl /usr/lib/librpm.so
/usr/lib/librpmdb.so -L/usr/src/build/229501-i386/BUILD/rpm-4.2/zlib
-L/usr/local/lib -lelf /usr/lib/librpmio.so -lrt -lpthread /usr/lib/libpopt.so
-lbz2 -lz -lcrypto -lm 
/usr/bin/ld: cannot find -lelf
collect2: ld returned 1 exit status


Here are the last few lines from the RPM build log:
rm -f .libs/snmpd.lo
gcc -I/usr/include/rpm -DINET6 -O2 -g -pipe -march=i386 -mcpu=i686 -Dlinux
-I/usr/include/rpm -I../include -I../include -I.. -I./.. -I./../snmplib -I. -I.
-I./mibgroup -Imibgroup -I/usr/lib/include -c snmpd.c  -fPIC -DPIC -o .libs/snmpd.lo
gcc -I/usr/include/rpm -DINET6 -O2 -g -pipe -march=i386 -mcpu=i686 -Dlinux
-I/usr/include/rpm -I../include -I../include -I.. -I./.. -I./../snmplib -I. -I.
-I./mibgroup -Imibgroup -I/usr/lib/include -c snmpd.c -o snmpd.o >/dev/null 2>&1
mv -f .libs/snmpd.lo snmpd.lo
/bin/sh ../libtool  --mode=link gcc -I/usr/include/rpm -DINET6 -O2 -g -pipe
-march=i386 -mcpu=i686 -Dlinux -I/usr/include/rpm -o snmpd snmpd.lo  
libnetsnmpagent.la libnetsnmpmibs.la helpers/libnetsnmphelpers.la -L/usr/lib/lib
-lwrap ../snmplib/libnetsnmp.la -ldl -lrpm -lrpmio -lpopt  -lbz2 -lz -lcrypto -lm
gcc -I/usr/include/rpm -DINET6 -O2 -g -pipe -march=i386 -mcpu=i686 -Dlinux
-I/usr/include/rpm -o .libs/snmpd snmpd.o  ./.libs/libnetsnmpagent.so
./.libs/libnetsnmpmibs.so helpers/.libs/libnetsnmphelpers.so -L/usr/lib/lib
-lwrap ../snmplib/.libs/libnetsnmp.so -ldl /usr/lib/librpm.so
/usr/lib/librpmdb.so -L/usr/src/build/229501-i386/BUILD/rpm-4.2/zlib
-L/usr/local/lib -lelf /usr/lib/librpmio.so -lrt -lpthread /usr/lib/libpopt.so
-lbz2 -lz -lcrypto -lm
/usr/bin/ld: cannot find -lelf
collect2: ld returned 1 exit status
make[1]: *** [snmpd] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/net-snmp-5.0.6/agent'
make: *** [subdirs] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.82340 (%build)

Version-Release number of selected component (if applicable):
net-snmp-5.0.6-17

How reproducible:
Always

Steps to Reproduce:
1.build net-snmp-5.0.6-17 from source rpm
2.
3.
    

Actual Results:  build fails (see description)

Expected Results:  build succeeds

Additional info:

Wasn't this fixed?  It actually looks like a libtool thing, like libtool thinks
it needs to stick -lelf in there.
Comment 1 Vitaliy Fuks 2003-08-02 21:33:37 EDT
Installing elfutils-devel lets the build complete successfully.
Comment 2 Phil Knirsch 2003-08-05 08:56:09 EDT
We've seen this as well, and this seems to be a libtool problem that seems to
drag in libelf for net-snmp for some unknow reason.

It's fixed for newer versions (using a new libtool).

Read ya, Phil

Note You need to log in before you can comment on or make changes to this bug.