On 10/04/2011 08:09 PM, Bart Van Assche wrote:
> On Tue, Oct 4, 2011 at 4:12 PM, Jan Safranek <jsafr...@redhat.com
> <mailto:jsafr...@redhat.com>> wrote:
> 
>     when I compile net-snmp-5.7 on Linux with embedded perl, I get missing
>     rpath in libnetsnmpmibs.so to perl:
> 
>     ldd -r libnetsnmpmibs.so.30
>            ...
>            libperl.so => not found
> 
>     The link command in agent/Makefile.in is (nearly) the same as in
>     net-snmp-5.5, yet the 5.5 brach compiles libnetsnmpmibs with rpath to
>     /usr/lib64/perl5/CORE/, which makes ldd (and prelink) happy.
>     net-snmp-5.5 comes with older version of libtool.
> 
>     Therefore I think it's libtool to blame. In addition, the newer libtool
>     spits some error messages when linking:
> 
>     /bin/sh ../libtool  --mode=link gcc <...> libnetsnmpagent.la
>     <http://libnetsnmpagent.la>
>     ../libtool: line 8480: func_apped: command not found
> 
>     Attached patch fixes the problems to me (it adds additional perl options
>     to linker), but is it the right way to go? I admit my libtool knowledge
>     is quite limited.
> 
> 
> Apparently fixing the libtool spelling error is sufficient. This is what
> I got (on Linux) after fixing that spelling error and after having
> rebuilt Net-SNMP (with --prefix=/usr/local/net-snmp-master):
> 
> $ ldd ./agent/.libs/snmpd|grep perl
>         libperl.so =>
> /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
> (0x00007f4309482000)
> 
> $ readelf -a ./agent/.libs/snmpd|grep perl
>  0x0000000000000001 (NEEDED)             Shared library: [libperl.so]
>  0x000000000000000f (RPATH)              Library rpath:
> [/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE:/usr/local/net-snmp-master/lib]
>  0x000000000000001d (RUNPATH)            Library runpath:
> [/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE:/usr/local/net-snmp-master/lib]

That doesn't work for me, with clean compile environment (Fedora's mock,
i.e. gcc in chroot), I still get the same error. Only my Makefile
changes make it working :(.

Jan

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to