From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830 Description of problem: Softlink for /usr/lib/libelf.so is missing after installing RPM libelf-0.8.2-2 with RH 8.0. This causes problems when building products with rpmbuild - such as net-snmp-5.0.1-6. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.Rebuild net-snmp-5.0.1-6 with rpmbuild 2. 3. Actual Results: Link Edit fails when -lelf used and softlink libelf.so does not point to the real "so" (libelf.so.0.8.2). Expected Results: After the following commands - everything works: cd /usr/lib ln -s libelf.so.0.8.2 libelf.so Additional info: /usr/bin/ld: cannot find -lelf collect2: ld returned 1 exit status make[1]: *** [snmpd] Error 1
The symlink is there, you just forgot to install libelf-devel.
Or, you may mean that net-snmp-5.0.1-6 (others ?) needs a "BuildPrereq" change to indicate a requirement that seems to be missing - for libelf-devel !!!
Spec missing Buildreq of libelf-devel. Install libelf-devel from the CDROM, rpmfind.net or redhat.com. After I installed that and added libelf-devel to the Buildreq in my spec file, this popped up just before the packages were rolled into rpms: Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/net-snmp-root error: Installed (but unpackaged) file(s) found: /usr/bin/snmpcheck /usr/bin/tkmib /usr/share/man/man1/mib2c.1.gz /usr/share/man/man1/snmpconf.1.gz RPM build errors: Installed (but unpackaged) file(s) found: /usr/bin/snmpcheck /usr/bin/tkmib /usr/share/man/man1/mib2c.1.gz /usr/share/man/man1/snmpconf.1.gz I'm adding these files to the utils filelist in my spec and I'll let you know how that turns out after recompile.
Yep, that worked. Here's a diff for your spec. Have fun: --- net-snmp.spec 2002-08-31 17:00:04.000000000 -0500 +++ net-snmp.spec.good 2002-10-25 16:44:31.000000000 -0500 @@ -1,7 +1,7 @@ Summary: A collection of SNMP protocol tools and libraries. Name: net-snmp Version: 5.0.1 -Release: 6 +Release: 7 License: BSDish Group: System Environment/Daemons Source0: ftp://net-snmp.sourceforge.net/net-snmp-%{version}.tar.gz @@ -23,7 +23,7 @@ Prereq: /sbin/chkconfig Obsoletes: ucd-snmp BuildRoot: %{_tmppath}/%{name}-root -BuildPrereq: tcp_wrappers, openssl-devel +BuildPrereq: tcp_wrappers, openssl-devel, libelf-devel %define __libtoolize /bin/true @@ -184,6 +184,7 @@ %{_bindir}/snmpbulkget %{_bindir}/snmpbulkwalk %{_bindir}/snmpconf +%{_bindir}/snmpcheck %{_bindir}/snmpdelta %{_bindir}/snmpdf %{_bindir}/snmpget @@ -199,10 +200,13 @@ %{_bindir}/snmpusm %{_bindir}/snmpwalk %{_bindir}/snmpvacm +%{_bindir}/tkmib %{_bindir}/traptoemail +%attr(0644,root,root) %{_mandir}/man1/mib2c.1* %attr(0644,root,root) %{_mandir}/man1/snmpbulkwalk.1* %attr(0644,root,root) %{_mandir}/man1/snmpbulkget.1* %attr(0644,root,root) %{_mandir}/man1/snmpcmd.1* +%attr(0644,root,root) %{_mandir}/man1/snmpconf.1* %attr(0644,root,root) %{_mandir}/man1/snmpdelta.1* %attr(0644,root,root) %{_mandir}/man1/snmpdf.1* %attr(0644,root,root) %{_mandir}/man1/snmpget.1* @@ -230,6 +234,11 @@ %attr(0644,root,root) %{_mandir}/man3/*
bzip2-devel is also required, and should be added to BuildPrereq.
Fixed in net-snmp-5.0.6-9 rawhide build.