I think PATH variable is not properly set.
Make sure that it looks for the libraries in appropriate target directory.
If your aim is to enable cross compilation, --with-lib is not required.
>
> But if I add --with-lib="/xyz/lib" in configure then it's
> giving the error:
> --------------------------------
> $ ./configure --with-cc=/usr/local/gcc-2.96/bin/gcc
> --with-libs=/xyz/lib
> checking what to build and install... agent apps man local mibs
> using default "enterprise.net-snmp"
> using default enterprise sysOID "NET-SNMP-MIB::netSnmpAgentOIDs..."
> using default notifications "NET-SNMP-MIB::netSnmpNotifications"
> checking if I need to feed myself to ksh... no
> checking for gcc... /usr/local/gcc-2.96/bin/gcc
> checking for C compiler default output... configure: error: C
> compiler
> cannot create executables
> See `config.log' for more details.
> -----------------------------------
>
> Then I tried with --with-lib="-L/xyz/lib". But while doing
> 'make' it's
> taking the libraries as:
>
> /bin/sh ../libtool --mode=link /usr/local/gcc-2.96/bin/gcc -g -O2
> -Dlinux -o snmpd snmpd.lo libnetsnmpagent.la libnetsnmpmibs.la
> helpers/libnetsnmphelpers.la ../snmplib/libnetsnmp.la -ldl
> -lm -L/xyz/lib
>
> That means libdl.so.2 and libm.so.6 are taken from default
> lib path, not
> from /xyz/lib. Am I correct?
>
> In this context, how --enable-static="LIB" will help?
>
> Please help me. Thanks in advance.
>
> With regards,
> Sanjib.
>
>
> Hanmantrao, Suhas wrote:
> >
> >>Is there any to specify the library files while doing configure for
> >>netsnmp? Actually, we need to do the compilation for target
> >
> >
> > pass --with-lib="library", to configure.
> >
>
>
>
> Confidentiality Notice
>
> The information contained in this electronic message and any
> attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain
> confidential or privileged information. If
> you are not the intended recipient, please notify the sender
> at Wipro or Mailadmin@xxxxxxxxx immediately
> and destroy all copies of this message and any attachments.
>
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
|