Someone know which libraries needs pthread?
Thanks!
--- On Wed, 9/22/10, Leo Lin <hayashi_...@yahoo.com> wrote:
From: Leo Lin <hayashi_...@yahoo.com>
Subject: Re: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin
To: "Net-snmp-users" <net-snmp-users@lists.sourceforge.net>
Date: Wednesday, September 22, 2010, 5:18 PM
Hi,
Following up with my previous email, I've changed my script to
./configure \
--host=i686-pc-cygwin --target=arm-linux --with-cc=arm-unknown-linux-gnu-gcc \
--with-cflags="-s -static -O2 -Dlinux -mcpu=arm9" --with-endianness=little \
--enable-mini-agent --disable-applications --disable-scripts \
--disable-manuals --with-default-snmp-version="1" \
--with-mib-modules="llc_snmpagent" \
--disable-mibs \
--enable-static --disable-shared \
--disable-debugging \
--with-sys-contact=hayashi_...@yahoo.com --with-sys-location="art" \
--with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp"
echo
echo "Make ..."
echo
make && echo "Cross-compilation Completed!!!" || exit $?
echo
echo "Make Install..."
echo
make install && echo "Installation Completed!!!" || exit $?
and I noticed 2 things:
1. I need to delete /usr/local/sbin/snmpd.exe previously compiled for Cygwin,
so the binary snmpd can be created for my target board.
2. I cannot run `snmpd` on my host, but it runs with the following error on my
target
`error while loading shared libraries: libpthread.so.0: cannot open share
object file: No such file or directory`. Notice that I tried to compile the
agent statically, but still asking for share libraries.
Should I modify the agent Makefile?
Thanks!
Leo;
--- On Tue, 9/21/10, Leo Lin <hayashi_...@yahoo.com> wrote:
From: Leo Lin <hayashi_...@yahoo.com>
Subject: Crosscompiling Netsnmp-5.6.rc1 for arm-unknown-linux under Cgywin
To: "Net-snmp-users" <net-snmp-users@lists.sourceforge.net>
Date: Tuesday, September 21, 2010, 12:19 PM
Hi,
I've installed Netsnmp-5.6.rc1 on my PC runing Cgywin. I was also be able to
extend the agent with my own mib (LLC-MIB.txt), with source file
`llc_snmpagent.c` and `llc_snmpagent.h`.
Everthing works fine on my PC, snmpget, snmpset, and trap generation. Now, I
am trying to cross-compile it for a embedded board with a ARM9 core runing
Linux 2.4. I already tested the cross-tool-chain from the board provider with
some simple programs. And it works fine.
I use the following script to crosscompile netsnmp under Cgywin for my target
board (ARM9):
echo "Cleaning Make ..."
echo
make clean
echo
echo "Cleaning Configure ..."
echo
make distclean
echo
echo "Configuring ..."
echo
./configure \
--host=arm-unknown-linux --target=arm-unknown-linux
--with-cc=arm-unknown-linux-gnu-gcc \
--with-cflags="-g -O2 -Dlinux -mcpu=arm9" --with-endianness=little \
--enable-mini-agent --disable-applications --disable-scripts \
--disable-manuals --with-default-snmp-version="1" \
--with-mib-modules="llc_snmpagent" \
--with-sys-contact="leo....@commscope.com" --with-sys-location="art" \
--with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp"
echo
echo "Make ..."
echo
make && echo "Cross-compilation Completed!!!" || exit $?
make install && echo "Installation Completed!!!" || exit $?
The script runs fine without errors, however, when I checked the agent `snmpd`,
it is compiled to run under Cgywin, not ARM9. I found out by runing the
`snmpd` on Cgywin and it works, plus the file as .exe suffix `snmpd.exe`.
I logged the output of configure script, and it seems that is uses the
cross-tool chain, but it compiles to i686-Cygwin.
checking for arm-unknown-linux-gcc... arm-unknown-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-unknown-linux-gnu-gcc accepts -g... yes
checking for arm-unknown-linux-gnu-gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... arm-unknown-linux-gnu-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking build system type... i686-pc-cygwin
checking host system type... arm-unknown-linux-gnu
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by arm-unknown-linux-gnu-gcc...
/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/bin/ld.exe
checking if the linker
(/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/bin/ld.exe)
is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for arm-unknown-linux-dumpbin... no
checking for arm-unknown-linux-link... no
checking for dumpbin... no
checking for link... link -dump -symbols
checking the name lister (link -dump -symbols) interface... BSD nm
checking the maximum length of command line arguments... 8192
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for
/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/bin/ld.exe
option to reload object files... -r
checking for arm-unknown-linux-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for arm-unknown-linux-ar... no
checking for ar... ar
checking for arm-unknown-linux-strip... no
checking for strip... strip
checking for arm-unknown-linux-ranlib... no
checking for ranlib... ranlib
checking command to parse link -dump -symbols output from
arm-unknown-linux-gnu-gcc object... failed
checking for dlfcn.h... yes
checking for objdir... .libs
checking if arm-unknown-linux-gnu-gcc supports -fno-rtti -fno-exceptions... no
checking for arm-unknown-linux-gnu-gcc option to produce PIC... -fPIC -DPIC
checking if arm-unknown-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes
checking if arm-unknown-linux-gnu-gcc static flag -static works... yes
checking if arm-unknown-linux-gnu-gcc supports -c -o file.o... yes
checking if arm-unknown-linux-gnu-gcc supports -c -o file.o... (cached) yes
checking whether the arm-unknown-linux-gnu-gcc linker
(/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/bin/ld.exe)
supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for developer gcc flags...
checking target system type... arm-unknown-linux-gnu
checking whether to un-define target system token (before redefining)... yes
checking for system include file... net-snmp/system/linux.h
checking for machine-type include file... net-snmp/machine/generic.h
checking for additional cpp flags... -x c
checking for arm-unknown-linux-gnu-gcc...
/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/bin//arm-unknown-linux-gnu-gcc
checking for ANSI C header files... (cached) yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for sys/wait.h that is POSIX.1 compatible... yes
I also tried by specifying --host=arm-unknown-linux, and I get the same
results.
Thanks in advance for your help,
Leo;
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
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