Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin

Leo Lin <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Thanks Bart,
 
I apologize for my poor knowledge of linux, snmpd.exe.stackdump is created when I ran snmpd.exe with seg core fault.
 
after several tries, I was able to have the net-snmp-5.6.rc1 working for i686-pc-cygwin.
 
I experimented with many configure options, and try it to verify if they work on cygwin first.  I found out that `--enable-static` option won't work on my system.
 
once I minimized the snmpd.exe footprint and have it working for cygwin, I proceeded to crosscompile it for arm-linux
 
crosscompilation went well as expected, here is the ./configure options 
 
./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="my_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
 
I've read from net-snmp org FAQs, that when crosscompiling, snmpd might be built with some share libraries, and it is not simply to copy the snmpd binary to my target.  I have explicitly set the build as -static.
 
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?
 
Thanks!!
 
Leo; 

 


--- On Wed, 9/29/10, Bart Van Assche <[email protected]> wrote:


From: Bart Van Assche <[email protected]>
Subject: Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin
To: "Leo Lin" <[email protected]>
Cc: "Net-snmp-users" <[email protected]>
Date: Wednesday, September 29, 2010, 3:35 AM



On Tue, Sep 28, 2010 at 6:34 PM, Leo Lin <[email protected]> wrote:






I tried to revert to previous net-snmp-5.6.rc1 setup, by performing
 
make uninstall
 
also, decompress the downloaded .tar.gz again, 
 
and ran `autoreconf -i`
 
I have to run `configure` `make` `make install` several times so it installs it without errors.  after that, it creates
 
snmpd.exe
snmpd.exe.stackdump
snmptrapd.exe
 
only snmptrapd.exe works on my i686-pc-cygwin, but snmpd.exe gave me a `segmentation fault (core dumped)` error.

That's strange.

When I run autoreconf -iv && ./configure ... && make -s && make -s test, compilation proceeds normally and most regression tests pass. snmpd.exe is started and stopped many times during these regression tests.

The output you can expect from make -s test under Cygwin can be found here:
https://sourceforge.net/tracker/index.php?func=detail&aid=2993522&group_id=12694&atid=112694

Bart.

------------------------------------------------------------------------------
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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.