LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-27-2009, 01:08 PM   #1
nagileon
LQ Newbie
 
Registered: Nov 2009
Posts: 8

Rep: Reputation: 0
cross compile tcpdump


Hi there

I'm compiling tcpdump for my Linksys WRT54GL router.
libcap compiles fine but compiling tcpdump gives me a bunch of errors.

I'm dooing this:

wget http://www.tcpdump.org/release/libpcap-1.0.0.tar.gz

wget http://www.tcpdump.org/release/tcpdump-4.0.0.tar.gz

wget ftp://ftp.dd-wrt.com/others/sourceco...an.sp1.tar.bz2

tar -xvf libpcap-1.0.0.tar.gz

tar -xvf tcpdump-4.0.0.tar.gz

tar -xvf toolchains.x86.debian.sp1.tar.bz2

apt-get install flex

apt-get install bison

export PATH=~/toolchains/4.1.0-uclibc-0.9.28/bin:$PATH

cd /root/libpcap-1.0.0

CC=mipsel-linux-uclibc-gcc ac_cv_linux_vers=2 ./configure --host=mipsel-linux --with-pcap=linux

make

cd ../tcpdump-4.0.0

CC=mipsel-linux-uclibc-gcc ac_cv_linux_vers=2 ./configure --host=mipsel-linux --with-pcap=linux

make


...
./../libpcap-1.0.0/libpcap.a(pcap.o): In function `pcap_datalink_name_to_val':
pcap.c:(.text+0x1b8): multiple definition of `pcap_datalink_name_to_val'
dlnames.o:dlnames.c:(.text+0xe8): first defined here
./../libpcap-1.0.0/libpcap.a(pcap.o): In function `pcap_datalink_val_to_name':
pcap.c:(.text+0x26c): multiple definition of `pcap_datalink_val_to_name'
dlnames.o:dlnames.c:(.text+0x0): first defined here
./../libpcap-1.0.0/libpcap.a(pcap.o): In function `pcap_datalink_val_to_description':
pcap.c:(.text+0x2d4): multiple definition of `pcap_datalink_val_to_description'
dlnames.o:dlnames.c:(.text+0x68): first defined here
./../libpcap-1.0.0/libpcap.a(pcap.o): In function `pcap_list_datalinks':
pcap.c:(.text+0xfbc): multiple definition of `pcap_list_datalinks'
datalinks.o:datalinks.c:(.text+0x0): first defined here
./../libpcap-1.0.0/libpcap.a(savefile.o): In function `pcap_dump_ftell':
savefile.c:(.text+0xd8): multiple definition of `pcap_dump_ftell'
pcap_dump_ftell.o:pcap_dump_ftell.c:(.text+0x0): first defined here
print-enc.o: In function `enc_if_print':
print-enc.c:(.text+0x1e0): undefined reference to `ip6_print'
./../libpcap-1.0.0/libpcap.a(grammar.o): In function `pcap_parse':
grammar.c:(.text+0x5e0): undefined reference to `pcap_lex'
collect2: ld returned 1 exit status
make: *** [tcpdump] Error 1


Anyone knows how to sort it out ?

Regards

Peter
 
Old 11-28-2009, 09:26 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
A mipsel package 'tcpdump-3.9.5' is here
http://packages.debian.org/etch/tcpdump
The oldest will have best chances to fit.
'libpcap' :
http://packages.debian.org/etch/libpcap0.8
Development files "libpcap0.8-dev" :
http://packages.debian.org/etch/libpcap0.8-dev
.....
'tcpdump-4.0.0'
http://packages.debian.org/squeeze/tcpdump
> > "Links for tcpdump" :
[tcpdump_4.0.0.orig.tar.gz], [tcpdump_4.0.0-5.debian.tar.gz]
The options used for compiling :
Unpack the "patch" tcpdump_4.0.0-5.debian.tar.gz
and have a look into the file tcpdump-4.0.0/debian/rules
.. and may be use the patches tcpdump-4.0.0/debian/patches
.....

Last edited by knudfl; 11-28-2009 at 09:27 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to cross compile? jiyun0121 Linux - General 3 09-01-2005 06:15 PM
Qt Cross Compile werewolfolondon Linux - Software 2 02-25-2005 01:01 PM
cross compile zaicheke Linux - Software 7 01-20-2005 08:23 PM
Cross Compile Kernel. zaicheke Linux - General 1 01-10-2005 11:39 PM
How to cross-compile? karfei00 Linux - Laptop and Netbook 2 06-03-2004 09:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration