[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-users
Subject:    Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin
From:       Leo Lin <hayashi_leo () yahoo ! com>
Date:       2010-09-30 20:44:44
Message-ID: 616282.61793.qm () web33105 ! mail ! mud ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks Bart,
 
I ran two tests, one compiling to run for cygwin and the other for my embedded \
system.  
for embedded system, I used the following ./configure option
 
./configure \
--host=i686-pc-cygwin \
--target=arm-linux \
--with-cc=arm-unknown-linux-gnu-gcc \
--with-cflags="-Wall -s -static -O2 -Dlinux -mcpu=arm9" \
--with-endianness=little \
--with-ldflags=-Bstatic \
--disable-scripts \
--disable-applications \
--enable-mini-agent \
--with-out-mib-modules=snmpv3mib, mibII/vacm \
--disable-privacy \
--disable-md5 \
--without-openssl \
--with-mib-modules="llc_snmpagent" \
--without-perl-modules \
--disable-embedded-perl \
--disable-shared \
--with-default-snmp-version="1" \
--with-sys-contact="root" \
--with-sys-location="unknown" --with-logfile="/var/log/snmpd.log" \
--with-persistent-directory="/var/net-snmp" \
--disable-manuals
 
this is the output I got from
 
$grep LIBS config.log
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
netsnmp_cv_func_dlopen_LMIBLIBS=-ldl
netsnmp_cv_func_kstat_lookup_LNETSNMPLIBS=no
netsnmp_cv_func_kvm_getprocs_LMIBLIBS=no
netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS=no
netsnmp_cv_func_kvm_openfiles_LAGENTLIBS=no
netsnmp_cv_func_kvm_read_LAGENTLIBS=no
netsnmp_cv_func_nl_connect_LMIBLIBS=no
netsnmp_cv_func_pthread_create_LMIBLIBS=-lpthread
AGENTLIBS=''
DLLIBS=''
LAGENTLIBS=''
LIBS=''
LMIBLIBS='-ldl -lpthread '
LNETSNMPLIBS=''
MYSQL_LIBS=''
NETSNMP_HAVE_AGENTX_LIBS_FALSE=''
NETSNMP_HAVE_AGENTX_LIBS_TRUE='#'
PERLLDOPTS_FOR_LIBS=''
TRAPLIBS='$(TRAPDWITHAGENT)'
USETRAPLIBS='$(USEAGENTLIBS)'
 
this is the ./configure I use when compiling for cygwin
 
./configure \
--with-mib-modules="llc_snmpagent" \
--without-perl-modules \
--disable-embedded-perl \
--disable-shared \
--with-default-snmp-version="1" \
--with-sys-contact="root" \
--with-sys-location="unknown" --with-logfile="/var/log/snmpd.log" \
--with-persistent-directory="/var/net-snmp" \
--disable-manuals
 
and $grep LIBS config.log
 
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
netsnmp_cv_func_dlopen_LMIBLIBS="none required"
netsnmp_cv_func_kstat_lookup_LNETSNMPLIBS=no
netsnmp_cv_func_kvm_get_procs_LMIBLIBS=no
netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS=no
netsnmp_cv_func_openfiles_LAGENTLIBS=no
netsnmp_cv_func_kvm_read_LAGENTLIBS=no
AGENTLIBS="-liphlpapi -lsnmpapi"
DLLIBS=''
LAGENTLIBS=''
LIBS='-liphlpapi -lsnmpapi'
LMIBLIBS=''
LNETSNMPLIBS='-lcrypto'
MYSQL_LIBS=''
NETSNMP_HAVE_AGENTX_LIBS_FALSE='#'
NETSNMP_HAVE_AGENTX_LIBS_TRUE=''
PERLLDOPTS_FOR_LIBS=''
TRAPLIBS='$(TRAPDWITHAGENT)'
USETRAPLIBS='$(USEAGENTLIBS)'
 
I grep my whole file-system for pThreads, and I cannot find it on my native compiler, \
pThread is under my cross-toolchain.  I'm assuming that since I specify ./configure \
to use my cross-toolchain, it uses the pThread since it is there.  
I'll ask my embedded system provider about the consecuences of not having pthread in \
the cross-toolchain, so I can delete (rm) them.  Then ./configure will no longer use \
it.  
thanks!!
 
Leo;

--- On Thu, 9/30/10, Bart Van Assche <bvanassche@acm.org> wrote:


From: Bart Van Assche <bvanassche@acm.org>
Subject: Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin
To: "Leo Lin" <hayashi_leo@yahoo.com>
Cc: "Net-snmp-users" <net-snmp-users@lists.sourceforge.net>
Date: Thursday, September 30, 2010, 8:12 AM



On Wed, Sep 29, 2010 at 10:47 PM, Leo Lin <hayashi_leo@yahoo.com> wrote:







And copied the snmpd binary to my target gives me the`libpthread.so.0` error when \
ran.  So, I'm back to square one.  
I've seen the net-snmp-5.6.rc3 on sourceforge, do you know if it contains the patch \
for pthread? The first you should do now is to find where that libpthread dependency \
comes from. You can find out whether that dependency has been introduced while \
building Net-SNMP by inspecting the output of the following command (which should not \
contain -lpthread):

$ grep LIBS config.status

Bart.



      


[Attachment #5 (text/html)]

<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: \
inherit;"><DIV>Thanks Bart,</DIV> <DIV>&nbsp;</DIV>
<DIV>I ran two tests, one compiling to run for cygwin and the other for my embedded \
system.</DIV> <DIV>&nbsp;</DIV>
<DIV>for embedded system, I used the following ./configure option</DIV>
<DIV>&nbsp;</DIV>
<DIV>./configure \</DIV>
<DIV>--host=i686-pc-cygwin \</DIV>
<DIV>--target=arm-linux \</DIV>
<DIV>--with-cc=arm-unknown-linux-gnu-gcc \</DIV>
<DIV>--with-cflags="-Wall -s -static -O2 -Dlinux -mcpu=arm9" \</DIV>
<DIV>--with-endianness=little \</DIV>
<DIV>--with-ldflags=-Bstatic \</DIV>
<DIV>--disable-scripts \</DIV>
<DIV>--disable-applications \</DIV>
<DIV>--enable-mini-agent \</DIV>
<DIV>--with-out-mib-modules=snmpv3mib, mibII/vacm \</DIV>
<DIV>--disable-privacy \</DIV>
<DIV>--disable-md5 \</DIV>
<DIV>--without-openssl \</DIV>
<DIV>--with-mib-modules="llc_snmpagent" \</DIV>
<DIV>--without-perl-modules \</DIV>
<DIV>--disable-embedded-perl \</DIV>
<DIV>--disable-shared \</DIV>
<DIV>--with-default-snmp-version="1" \</DIV>
<DIV>--with-sys-contact="root" \</DIV>
<DIV>--with-sys-location="unknown" --with-logfile="/var/log/snmpd.log" \</DIV>
<DIV>--with-persistent-directory="/var/net-snmp" \</DIV>
<DIV>--disable-manuals</DIV>
<DIV>&nbsp;</DIV>
<DIV>this is the output I got from</DIV>
<DIV>&nbsp;</DIV>
<DIV>$grep LIBS config.log</DIV>
<DIV>ac_cv_env_LIBS_set=</DIV>
<DIV>ac_cv_env_LIBS_value=</DIV>
<DIV>netsnmp_cv_func_dlopen_LMIBLIBS=-ldl</DIV>
<DIV>netsnmp_cv_func_kstat_lookup_LNETSNMPLIBS=no</DIV>
<DIV>netsnmp_cv_func_kvm_getprocs_LMIBLIBS=no</DIV>
<DIV>netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS=no</DIV>
<DIV>netsnmp_cv_func_kvm_openfiles_LAGENTLIBS=no</DIV>
<DIV>netsnmp_cv_func_kvm_read_LAGENTLIBS=no</DIV>
<DIV>netsnmp_cv_func_nl_connect_LMIBLIBS=no</DIV>
<DIV>netsnmp_cv_func_pthread_create_LMIBLIBS=-lpthread</DIV>
<DIV>AGENTLIBS=''</DIV>
<DIV>DLLIBS=''</DIV>
<DIV>LAGENTLIBS=''</DIV>
<DIV>LIBS=''</DIV>
<DIV>LMIBLIBS='-ldl -lpthread '</DIV>
<DIV>LNETSNMPLIBS=''</DIV>
<DIV>MYSQL_LIBS=''</DIV>
<DIV>NETSNMP_HAVE_AGENTX_LIBS_FALSE=''</DIV>
<DIV>NETSNMP_HAVE_AGENTX_LIBS_TRUE='#'</DIV>
<DIV>PERLLDOPTS_FOR_LIBS=''</DIV>
<DIV>TRAPLIBS='$(TRAPDWITHAGENT)'</DIV>
<DIV>USETRAPLIBS='$(USEAGENTLIBS)'</DIV>
<DIV>&nbsp;</DIV>
<DIV>this is the ./configure I use when compiling for cygwin</DIV>
<DIV>&nbsp;</DIV>
<DIV>./configure \</DIV>
<DIV>--with-mib-modules="llc_snmpagent" \</DIV>
<DIV>--without-perl-modules \</DIV>
<DIV>--disable-embedded-perl \</DIV>
<DIV>--disable-shared \</DIV>
<DIV>--with-default-snmp-version="1" \</DIV>
<DIV>--with-sys-contact="root" \</DIV>
<DIV>--with-sys-location="unknown" --with-logfile="/var/log/snmpd.log" \</DIV>
<DIV>--with-persistent-directory="/var/net-snmp" \</DIV>
<DIV>--disable-manuals</DIV>
<DIV>&nbsp;</DIV>
<DIV>and $grep LIBS config.log</DIV>
<DIV>&nbsp;</DIV>
<DIV>ac_cv_env_LIBS_set=</DIV>
<DIV>ac_cv_env_LIBS_value=</DIV>
<DIV>netsnmp_cv_func_dlopen_LMIBLIBS="none required"</DIV>
<DIV>netsnmp_cv_func_kstat_lookup_LNETSNMPLIBS=no</DIV>
<DIV>netsnmp_cv_func_kvm_get_procs_LMIBLIBS=no</DIV>
<DIV>netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS=no</DIV>
<DIV>netsnmp_cv_func_openfiles_LAGENTLIBS=no</DIV>
<DIV>netsnmp_cv_func_kvm_read_LAGENTLIBS=no</DIV>
<DIV>AGENTLIBS="-liphlpapi -lsnmpapi"</DIV>
<DIV>DLLIBS=''</DIV>
<DIV>LAGENTLIBS=''</DIV>
<DIV>LIBS='-liphlpapi -lsnmpapi'</DIV>
<DIV>LMIBLIBS=''</DIV>
<DIV>LNETSNMPLIBS='-lcrypto'</DIV>
<DIV>MYSQL_LIBS=''</DIV>
<DIV>NETSNMP_HAVE_AGENTX_LIBS_FALSE='#'</DIV>
<DIV>NETSNMP_HAVE_AGENTX_LIBS_TRUE=''</DIV>
<DIV>PERLLDOPTS_FOR_LIBS=''</DIV>
<DIV>TRAPLIBS='$(TRAPDWITHAGENT)'</DIV>
<DIV>USETRAPLIBS='$(USEAGENTLIBS)'</DIV>
<DIV>&nbsp;</DIV>
<DIV>I grep my whole file-system for pThreads, and I cannot find it on my native \
compiler, pThread is under my cross-toolchain.&nbsp; I'm assuming that since I \
specify ./configure to use my cross-toolchain, it uses the pThread since it is \
there.</DIV> <DIV>&nbsp;</DIV>
<DIV>I'll ask my embedded system provider about the consecuences of not having \
pthread in the cross-toolchain, so I can delete (rm) them.&nbsp; Then ./configure \
will no longer use it.</DIV> <DIV>&nbsp;</DIV>
<DIV>thanks!!</DIV>
<DIV>&nbsp;</DIV>
<DIV>Leo;<BR><BR>--- On <B>Thu, 9/30/10, Bart Van Assche \
<I>&lt;bvanassche@acm.org&gt;</I></B> wrote:<BR></DIV> <BLOCKQUOTE \
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px \
solid"><BR>From: Bart Van Assche &lt;bvanassche@acm.org&gt;<BR>Subject: Re: \
Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin<BR>To: "Leo Lin" \
&lt;hayashi_leo@yahoo.com&gt;<BR>Cc: "Net-snmp-users" \
&lt;net-snmp-users@lists.sourceforge.net&gt;<BR>Date: Thursday, September 30, 2010, \
8:12 AM<BR><BR> <DIV id=yiv401290715>
<DIV class=yiv401290715gmail_quote><FONT size=2>On Wed, Sep 29, 2010 at 10:47 PM, Leo \
Lin <SPAN dir=ltr>&lt;<A \
href="http://us.mc331.mail.yahoo.com/mc/compose?to=hayashi_leo@yahoo.com" \
target=_blank rel=nofollow \
ymailto="mailto:hayashi_leo@yahoo.com">hayashi_leo@yahoo.com</A>&gt;</SPAN> \
wrote:<BR></FONT> <BLOCKQUOTE class=yiv401290715gmail_quote style="PADDING-LEFT: 1ex; \
MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"> <TABLE \
cellSpacing=0 cellPadding=0 border=0> <TBODY>
<TR>
<TD style="FONT-FAMILY: inherit; font-size-adjust: inherit; font-stretch: inherit" \
vAlign=top><FONT size=2><BR></FONT> <DIV><FONT size=2>And copied the snmpd binary to \
my target gives me the`libpthread.so.0` error when ran.&nbsp; So, I'm back to square \
one.</FONT></DIV> <DIV><FONT size=2>&nbsp;</FONT></DIV>
<DIV><FONT size=2>I've seen the net-snmp-5.6.rc3 on&nbsp;sourceforge, do you know if \
it contains the patch for \
pthread?</FONT></DIV></TD></TR></TBODY></TABLE></BLOCKQUOTE></DIV><FONT \
size=2><BR>The first you should do now is to find where that libpthread dependency \
comes from. You can find out whether that dependency has been introduced while \
building Net-SNMP by inspecting the output of the following command (which should not \
contain -lpthread):<BR><BR>$ grep LIBS \
config.status<BR><BR>Bart.<BR></FONT></DIV></BLOCKQUOTE></td></tr></table><br>

      



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev

_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic