FS#33757 - [net-snmp] mib2c doesn't work
Attached to Project:
Arch Linux
Opened by Andreas Baumann (andreas_baumann) - Thursday, 07 February 2013, 19:26 GMT
Last edited by Eric Belanger (Snowman) - Sunday, 14 April 2013, 04:22 GMT
Opened by Andreas Baumann (andreas_baumann) - Thursday, 07 February 2013, 19:26 GMT
Last edited by Eric Belanger (Snowman) - Sunday, 14 April 2013, 04:22 GMT
|
Details
Description:
Calling 'mib2c' results in: ERROR: You don't have the SNMP perl module installed. Please obtain this by getting the latest source release of the net-snmp toolkit from http://www.net-snmp.org/download/ . Once you download the source and unpack it, the perl module is contained in the perl/SNMP directory. See the README file there for instructions. Additional info: * net-snmp 5.7.2-1 Steps to reproduce: A small 'test.pl': #!/usr/bin/perl -w use SNMP; results in: Can't load '/usr/lib/perl5/vendor_perl/auto/SNMP/SNMP.so' for module SNMP: /usr/lib/perl5/vendor_perl/auto/SNMP/SNMP.so: undefined symbol: usmAESPrivProtocol at /usr/lib/perl5/core_perl/DynaLoader.pm line 190. The net-snmp documentation says: "PERL Module link error undefined symbol: usmAESPrivProtocol at /usr/lib/perl5/5.8.3/ppc-linux-thread-multi/DynaLoader.pm This error indicates that the Net-SNMP libraries are not in sync with the perl libraries. This often happens when you install from source, and a packaged version of Net-SNMP (like a RPM) is already installed. Remove the packaged version and re-install the source version." I'm not sure, how this can happen because surely the package was built in one step. |
This task depends upon
Closed by Eric Belanger (Snowman)
Sunday, 14 April 2013, 04:22 GMT
Reason for closing: Fixed
Additional comments about closing: net-snmp-5.7.2-4
Sunday, 14 April 2013, 04:22 GMT
Reason for closing: Fixed
Additional comments about closing: net-snmp-5.7.2-4
pacman -R -dd net-snmp
mkdir -p packages/net-snmp
cd packages/net-snmp
git init
git remote add -t packages/net-snmp -f origin git://projects.archlinux.org/svntogit/packages.git
git checkout packages/net-snmp
cd trunk
sed -i 's/74a9848b95f63378eb1753fc309d2b74de5afb0f/b1b6c760a05c41b1d0a357b5732d98186db3e525/' ./PKGBUILD
makepkg -i
sudo pacman -U ./net-snmp-5.7.2-2-x86_64.pkg.tar.xz
If you try: perl -e 'require SNMP;' you get:
Can't load '/usr/lib/perl5/vendor_perl/auto/SNMP/SNMP.so' for module SNMP: /usr/lib/perl5/vendor_perl/auto/SNMP/SNMP.so: undefined symbol: usmAESPrivProtocol at /usr/lib/perl5/core_perl/DynaLoader.pm line 190.
ldd /usr/lib/perl5/vendor_perl/auto/SNMP/SNMP.so
linux-vdso.so.1 (0x00007fff7ff2f000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fb058dce000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007fb05939a000)
after rebuilding, I get
ldd /usr/lib/perl5/vendor_perl/auto/SNMP/SNMP.so
linux-vdso.so.1 (0x00007fff0cbff000)
libnetsnmp.so.30 => /usr/lib/libnetsnmp.so.30 (0x00007f9803f9e000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f9803bf1000)
libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007f98037e7000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f980449e000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f98035e2000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f98033cc000)
So the binary on the repository is flawed. It does not link libraries properly. The maintainer likely built it with a different environment. (e.g. LDFLAGS set tos something wrong). It needs to be rebuilt and re-released to the repository.