Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Problem with cross-compiling net-snmp package 5.6.1.1 on ARM
PostPosted: Tue Dec 13, 2011 11:15 am 
Offline

Joined: Tue Dec 06, 2011 8:07 am
Posts: 2
Hi,
Actually i want to cross compile net-snmp package with version: 5.6.1.1 into our target device.

Target Device Platform Details :
Embedded H/W with Linux OS (AT91SAM9260-EK board)
Kernel Version : 2.6.27
Busy Box Version: v1.12.0
Pre-built Linux OS with file system, ARM9 CPU
Compiler: arm-linux-uclibcgnueabi-gcc


Following steps i followed for cross-compilation :

I have started cross compilation on UBUNTU with version 11.04.
I copied the script config.guess (This script found in in the root directory of Net-SNMP) to our target system and when i run on the target i got following output

# ./config.guess
armv5tejl-unknown-linux-gnueabi

Then i started configuring using following command

./configure --with-mib-modules="nstAgentModuleObject data_set nstAgentSubagentObject integerObject examples/notification examples/Digital_Inputs_Notification" --with-cc=/opt/usr/bin/arm-linux-uclibcgnueabi-gcc --host=armv5tejl-unknown-linux-gnueabi

Here this is --with-cc=/opt/usr/bin/arm-linux-uclibcgnueabi-gcc : path to cross-compiler

Finally configure script runs successfully and got following configuration

---------------------------------------------------------
Net-SNMP configuration summary:
---------------------------------------------------------

SNMP Versions Supported: 1 2c 3
Building for: linux
Net-SNMP Version: 5.6.1.1
Network transport support: Callback Unix Alias TCP UDP IPv4Base SocketBase TCPBase UDPIPv4Base UDPBase
SNMPv3 Security Modules: usm
Agent MIB code: nstAgentModuleObject data_set nstAgentSubagentObject integerObject examples/notification examples/Digital_Inputs_Notification default_modules => snmpv3mibs mibII ucd_snmp notification notification-log-mib target agent_mibs agentx disman/event disman/schedule utilities host
MYSQL Trap Logging: unavailable
Embedded Perl support: disabled
SNMP Perl modules: building -- not embeddable
SNMP Python modules: disabled
Crypto support from: internal
Authentication support: MD5 SHA1
Encryption support: DES AES

---------------------------------------------------------

After this i just run make on the command prompt but i got following error response

/opt/usr/bin/arm-linux-uclibcgnueabi-gcc -E -Iinclude -I./include -I./agent/mibgroup -I. -I. -DDONT_INC_STRUCTS -DBINDIR=/usr/local/bin -x c ./sedscript.in | egrep '^s[/#]' | sed 's/REMOVEME//g;s# */#/#g;s/ *#/#/g;s#/ *#/#g;s/# g/#g/;' > sedscript
echo 's/VERSIONINFO/5.6.1.1/g' >> sedscript
echo 's#DATADIR#/usr/local/share#g' >> sedscript
echo 's#LIBDIR#/usr/local/lib#g' >> sedscript
echo 's#BINDIR#/usr/local/bin#g' >> sedscript
echo 's#PERSISTENT_DIRECTORY#/var/net-snmp#g' >> sedscript
echo 's#SYSCONFDIR#/usr/local/etc#g' >> sedscript
/bin/sed -f sedscript ./EXAMPLE.conf.def > EXAMPLE.conf
making all in /home/prashant/Desktop/SNMP/SNMPDownloads/net-snmp/net-snmp-5.6.1.1/snmplib
make[1]: Entering directory `/home/prashant/Desktop/SNMP/SNMPDownloads/net-snmp/net-snmp-5.6.1.1/snmplib'
/bin/bash ../libtool --mode=compile /opt/usr/bin/arm-linux-uclibcgnueabi-gcc -I../include -I. -I../snmplib -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.10/CORE -c -o snmp_client.lo snmp_client.c
libtool: compile: /opt/usr/bin/arm-linux-uclibcgnueabi-gcc -I../include -I. -I../snmplib -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.10/CORE -c snmp_client.c -fPIC -DPIC -o .libs/snmp_client.o
libtool: compile: /opt/usr/bin/arm-linux-uclibcgnueabi-gcc -I../include -I. -I../snmplib -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.10/CORE -c snmp_client.c -o snmp_client.o >/dev/null 2>&1
/bin/bash ../libtool --mode=compile /opt/usr/bin/arm-linux-uclibcgnueabi-gcc -I../include -I. -I../snmplib -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.10/CORE -c -o mib.lo mib.c
libtool: compile: /opt/usr/bin/arm-linux-uclibcgnueabi-gcc -I../include -I. -I../snmplib -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.10/CORE -c mib.c -fPIC -DPIC -o .libs/mib.o
In file included from ../include/net-snmp/utilities.h:39,
from mib.c:95:
../include/net-snmp/library/system.h:81: error: conflicting types for ‘DIR’
/opt/usr/include/dirent.h:128: error: previous declaration of ‘DIR’ was here
../include/net-snmp/library/system.h:84: error: conflicting types for ‘opendir’
/opt/usr/include/dirent.h:135: error: previous declaration of ‘opendir’ was here
../include/net-snmp/library/system.h:86: error: conflicting types for ‘readdir’
/opt/usr/include/dirent.h:159: error: previous declaration of ‘readdir’ was here
../include/net-snmp/library/system.h:88: error: conflicting types for ‘closedir’
/opt/usr/include/dirent.h:142: error: previous declaration of ‘closedir’ was here
mib.c: In function ‘netsnmp_mibindex_load’:
mib.c:2777: warning: assignment from incompatible pointer type
make[1]: *** [mib.lo] Error 1
make[1]: Leaving directory `/home/prashant/Desktop/SNMP/SNMPDownloads/net-snmp/net-snmp-5.6.1.1/snmplib'
make: *** [subdirs] Error 1

How to fix this problem ? please guide me on this.

Please suggest me what are the dependencies for cross-compiling on ARM ?

Thanks in Advance
Prashant Nirni


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: