Hi,

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
../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.

Jan
diff --git a/agent/Makefile.in b/agent/Makefile.in
index 128eeca..696ba72 100644
--- a/agent/Makefile.in
+++ b/agent/Makefile.in
@@ -299,7 +299,7 @@ libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION):    ${LLIBAGENTOBJS} $(USELIBS)
 	$(RANLIB) $(AGENTLIB)
 
 libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(AGENTLIB) $(USELIBS)
-	$(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) ${LMIBLIBS} $(LIB_LD_LIBS) @AGENTLIBS@
+	$(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) ${LMIBLIBS} $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@
 	$(RANLIB) $(MIBLIB)
 
 agentlib: $(AGENTLIB)
------------------------------------------------------------------------------
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