Skip to contentSkip to conversation

Problem using net-snmp and Buildroot

Buildroot Luca Altobelli 4 participants 7 messages Nov 24, 2009 – Nov 26, 2009 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Dear Sirs
I'm using buildroot-2009.08 and I need net-snmp (currently I'm using
version 5.4.2.1) installed on my target system. When compiling no problem encountered but, if I try to launch /snmpd/ on my target system, it gives the message "cannot find libc.so.6". I have libc.so.6 on my host system, no trace of it on the target.
Attached is my Buildroot configuration.

Yours sincerely
Altobelli Luca.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20091124/3fb95d96/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: .config
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20091124/3fb95d96/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LUCA_ALTOBELLI.vcf
Type: text/x-vcard
Size: 344 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20091124/3fb95d96/attachment.vcf>

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Luca" == Luca Altobelli <[email protected]> writes:

Luca> Dear Sirs
Luca> ??? I'm using buildroot-2009.08 and I need net-snmp (currently I'm using Luca> version 5.4.2.1) installed on my target system. When compiling no problem Luca> encountered but,? if I try to launch snmpd on my target system, it gives the Luca> message "cannot find libc.so.6". I have libc.so.6 on my host system, no trace

I cannot reproduce it here with x86-64 (same as my host) or i386 with 2009.11-rc1. We did update the netsnmp package after 2009.08, could you give 2009.11-rc1 a test?

Signature · 1 line
Bye, Peter Korsgaard

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Luca" == Luca Altobelli <[email protected]> writes:

Hi,

Luca> I tried 2009.11-rc1 and net-snmp 5.5 with same results. It only Luca> works with old versions (net-snmp 5.1.2 works).

Odd, it works here:

mkdir /tmp/blah
sudo mount -o loop,rw /tmp/br/images/rootfs.i686.ext2 /tmp/blah sudo chroot /tmp/blah /bin/sh

/ # snmpd -v

NET-SNMP version:  5.5
Web:               http://www.net-snmp.org/
Email:             net-snmp-coders at lists.sourceforge.net

/ #

Do you have any libsnmp (development-) packages installed on your host? On my system there's:

dpkg -l \*snmp\*|grep ii

ii  libsnmp-base   5.4.1~dfsg-12  SNMP (Simple Network Management Protocol) MI
ii  libsnmp15      5.4.1~dfsg-12  SNMP (Simple Network Management Protocol) li

So no -dev packages. I'll retry with your exact config in a moment.

Signature · 1 line
Bye, Peter Korsgaard

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Luca" == Luca Altobelli <[email protected]> writes:

Hi,

Luca> Dear Peter,
Luca> following your istructions:
Luca> dpkg -l \*snmp\*|grep ii
Luca> ii libsnmp-base 5.4.1~dfsg-12ubuntu3
Luca> SNMP (Simple Network Management Protocol) MI
Luca> ii libsnmp15 5.4.1~dfsg-12ubuntu3
Luca> SNMP (Simple Network Management Protocol) li

Luca> mounting the rootfs.i486.ext2 (used 2009.11-rc1 and net-snmp 5.5):
Luca> # snmpd -v
Luca> snmpd: can't load library 'libcrypto.so.0.9.8'
Luca> that I found in the host-lib directory , while in the target-lib I Luca> have libcrypt-0.9.30.1.so.

You should also have a libcrypto on the target. E.G. with the config you posted I have:

file /tmp/br/target/usr/lib/libcrypto.so.0.9.8 ~
/tmp/br/target/usr/lib/libcrypto.so.0.9.8: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

If not, it sounds like something goes wrong with the openssl compilation and something gets confused about host/target.

I haven't been able to reproduce it with your config, but I'm on a x86-64 host, so that might be why - Sorry, I don't have any 32bit PCs any more.

sudo mount -o loop,rw /tmp/br/images/rootfs.i486.ext2 /tmp/blah sudo chroot /tmp/blah /bin/sh
/ # snmpd -v

NET-SNMP version:  5.5
Web:               http://www.net-snmp.org/
Email:             net-snmp-coders at lists.sourceforge.net

Luca> I also asked in the uclibc mailing list and Carmelo Amoroso Luca> replied: "[..]it seems that you are not using uClibc, instead you Luca> are linking against glibc".

Indeed.

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw
Quoted 24 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Luca" == Luca Altobelli <[email protected]> writes:

Hi,

Luca> Dear Peter,
Luca> following your istructions:
Luca> dpkg -l \*snmp\*|grep ii
Luca> ii libsnmp-base 5.4.1~dfsg-12ubuntu3
Luca> SNMP (Simple Network Management Protocol) MI
Luca> ii libsnmp15 5.4.1~dfsg-12ubuntu3
Luca> SNMP (Simple Network Management Protocol) li

Luca> mounting the rootfs.i486.ext2 (used 2009.11-rc1 and net-snmp 5.5):
Luca> # snmpd -v
Luca> snmpd: can't load library 'libcrypto.so.0.9.8'
Luca> that I found in the host-lib directory , while in the target-lib I Luca> have libcrypt-0.9.30.1.so.

You should also have a libcrypto on the target. E.G. with the config you posted I have:

file /tmp/br/target/usr/lib/libcrypto.so.0.9.8 ~
/tmp/br/target/usr/lib/libcrypto.so.0.9.8: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

Quoted 7 lines

If not, it sounds like something goes wrong with the openssl compilation and something gets confused about host/target.

I haven't been able to reproduce it with your config, but I'm on a x86-64 host, so that might be why - Sorry, I don't have any 32bit PCs any more.

Sure you do, it is hidden inside of your x86_64 box. ;)

Install the Linux-Vserver patch, set the option to emulate 32bit in your kernel config, build and boot kernel, install your choice of 32bit distributions in an ARCH=x86 guest context.

I currently run Gentoo-32bit, Debian-32bit, Ubuntu-32bit on my x86-64 box (all at the same time). It is a Core2Quad box. Ah, yes, I also run the same threesum in 64bit also at the same time.

Bottom of the page: http://linux-vserver.org/Welcome_to_Linux-VServer.org
That project's idea of "Experimental" puts other project's idea of "Stable" to shame. ;)

Mike

Quoted 14 lines

sudo mount -o loop,rw /tmp/br/images/rootfs.i486.ext2 /tmp/blah sudo chroot /tmp/blah /bin/sh
/ # snmpd -v

NET-SNMP version:  5.5
Web:               http://www.net-snmp.org/
Email:             net-snmp-coders at lists.sourceforge.net

Luca> I also asked in the uclibc mailing list and Carmelo Amoroso Luca> replied: "[..]it seems that you are not using uClibc, instead you Luca> are linking against glibc".

Indeed.

#7 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Michael" == Michael S Zick <[email protected]> writes:

Hi,

Quoted 6 lines
Quoted 6 lines

If not, it sounds like something goes wrong with the openssl compilation and something gets confused about host/target.

I haven't been able to reproduce it with your config, but I'm on a x86-64 host, so that might be why - Sorry, I don't have any 32bit PCs any more.

Michael> Sure you do, it is hidden inside of your x86_64 box. ;)

Michael> Install the Linux-Vserver patch, set the option to emulate 32bit Michael> in your kernel config, build and boot kernel, install your choice Michael> of 32bit distributions in an ARCH=x86 guest context.

Michael> I currently run Gentoo-32bit, Debian-32bit, Ubuntu-32bit on my Michael> x86-64 box (all at the same time). It is a Core2Quad box. Michael> Ah, yes, I also run the same threesum in 64bit also at the same time.

Sure, or just powering up a kvm instance. I'm not saying it cannot be done, it will just take me longer than the spare time I have today to do a 32bit install with the dependencies and do a rebuild.

Signature · 1 line
Bye, Peter Korsgaard

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Michael" == Michael S Zick <[email protected]> writes:

Hi,

Michael> Oh, I missed that translation of your post, I thought you said:
Michael> "do not have the equipment"
Michael> not that you said:
Michael> "do not have the time"

Michael> I guess I will have to start using google translate for this list. ;)

;)

Could you give Luca's .config a try on your 32bit setup and see if you can reproduce the problem?

http://lists.busybox.net/pipermail/buildroot/attachments/20091124/3fb95d96/attachment.diff

(change the uclibc + busybox configs to their default values, E.G. BR2_UCLIBC_CONFIG="toolchain/uClibc/uClibc-0.9.30.config" BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.13.x.config")

Thanks.

Signature · 1 line
Bye, Peter Korsgaard