Jordan,
You need to use the makefile properly configured for the target.
This script builds the 5.4.1agent only for an arm target, tweak to suit
your requirements and version.
cd net-snmp-5.4.1/
#1 single find command and xargs chokes due to bash line limitation, process
sequentially
find -name "*.o" -exec rm -f {} \;
find -name "*.lo" -exec rm -f {} \;
find -name "*.so" -exec rm -f {} \;
find -name "*.la" -exec rm -f {} \;
find -name "*.a" -exec rm -f {} \;
# path passed for openssl must be absolute
# modify --sys-contact, --sys-location and --with-mib-modules as required
export PATH=
$PATH:/opt/crosstool/arm-2007q1/bin;CFLAGS="-I/home/colin/code/CVS/STX/openssl/include"
./configure --with-cflags="-I/home/colin/code/CVS/STX/openssl/include"
--target=arm-linux --host=arm --build=i686 --with-cc=arm-none-linux-gnueabi-gcc
--with-ar=arm-none-linux-gnueabi-ar --with-ranlib=arm-none-linux-gnueabi-ranlib
--with-endianness=little --disable-applications --disable-manuals
--disable-scripts --enable-mini-agent --host=arm-none-linux-gnueabi
--with-mib-modules=anyspecialmibs --disable-embedded-perl
--without-perl-modules --with-default-snmp-version=3
--with-openssl="/home/colin/code/CVS/STX/openssl"
--without-opaque-special-types --with-sys-contact="[email protected]"
--with-sys-location="XXX" --with-logfile="/var/log/snmpd.log"
--with-persistent-directory="/var/net-snmp" --with-ldflags="-lpthread"
--enable-des=yes --enable-privacy=yes --enable-md5=yes
make
export DDIR=/mnt/ARM # Copy files to embedded nfs root
# .so.X.X version may need changed according to net-snmp revision being built
rm $DDIR/libnetsnmpagent.so.15
rm $DDIR/libnetsnmpmibs.so.15
rm $DDIR/libnetsnmp.so.15
rm $DDIR/libnetsnmphelpers.so.15
cp ./agent/.libs/libnetsnmpagent.so.15.1.0 $DDIR
ln -s $DDIR/libnetsnmpagent.so.15.1.0 $DDIR/libnetsnmpagent.so.15
cp ./agent/.libs/libnetsnmpmibs.so.15.1.0 $DDIR
ln -s $DDIR/libnetsnmpmibs.so.15.1.0 $DDIR/libnetsnmpmibs.so.15
cp ./snmplib/.libs/libnetsnmp.so.15.1.0 $DDIR
ln -s $DDIR/libnetsnmp.so.15.1.0 $DDIR/libnetsnmp.so.15
cp ./agent/helpers/.libs/libnetsnmphelpers.so.15.1.0 $DDIR
ln -s $DDIR/libnetsnmphelpers.so.15.1.0 $DDIR/libnetsnmphelpers.so.15
cp agent/.libs/snmpd $DDIR
Cheers
Colin
Jordan Kagan wrote:
> If I was going to use a cross compiler on net-snmp, how would I do this?
>
> I used a gcc compiler for an Arm processor on smpd.c, but it returned
> a bunch of errors because it couldn't find the includes.
>
> Thanks,
>
> Jordan
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> ------------------------------------------------------------------------
>
> _______________________________________________
> Net-snmp-coders mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders