Skip to ContentSkip to Footer
Start of content
- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- General
- >
- cross compiling tcpdump
General
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Latin America
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-25-2009 12:24 PM
11-25-2009 12:24 PM
Hi there
I'm compiling tcpdump for my Linksys 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/sourcecode/toolchains/toolchains.x86.debian.sp1.tar.bz2
tar -xvf libpcap-1.0.0.tar.gz
tar -xvf tcpdump-4.0.0.tar.gz
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
I'm compiling tcpdump for my Linksys 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/sourcecode/toolchains/toolchains.x86.debian.sp1.tar.bz2
tar -xvf libpcap-1.0.0.tar.gz
tar -xvf tcpdump-4.0.0.tar.gz
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
Jesus is the King
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-25-2009 03:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-25-2009 04:54 PM
11-25-2009 04:54 PM
Re: cross compiling tcpdump
Hi
My OS is Red Hat Linux 7.2.
My target OS is a firmware for Linksys WRT54GL called DD-WRT.
I downloaded the toolchains from here: ftp://ftp.dd-wrt.com/others/sourcecode/toolchains/
And I know it works:
touch /root/hello.c
cat > ~/hello.c<< "EOF"
#include
int main ( void ) {
printf( "Hello world!\n" );
}
EOF
mipsel-linux-uclibc-gcc hello.c -o hello
Above commands work fine and the hello program works fine on my router :)
So I'm absolutely sure that it's not broken toolchains that affects me.
I know it's not linux forum but the linux forum does not have a "programming" section.
So I hope somebody will be so kind to help me here.
Can anyone check how the compilation goes on your system ?
I pretty much gave the instructions on what I'm doing in the initial post.
Regards
Peter
My OS is Red Hat Linux 7.2.
My target OS is a firmware for Linksys WRT54GL called DD-WRT.
I downloaded the toolchains from here: ftp://ftp.dd-wrt.com/others/sourcecode/toolchains/
And I know it works:
touch /root/hello.c
cat > ~/hello.c<< "EOF"
#include
int main ( void ) {
printf( "Hello world!\n" );
}
EOF
mipsel-linux-uclibc-gcc hello.c -o hello
Above commands work fine and the hello program works fine on my router :)
So I'm absolutely sure that it's not broken toolchains that affects me.
I know it's not linux forum but the linux forum does not have a "programming" section.
So I hope somebody will be so kind to help me here.
Can anyone check how the compilation goes on your system ?
I pretty much gave the instructions on what I'm doing in the initial post.
Regards
Peter
Jesus is the King
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-30-2009 09:31 AM
11-30-2009 09:31 AM
Re: cross compiling tcpdump
Willingness or no of folks watching this forum to help notwithstanding, you may have better luck going straight to the tcpdump-workers mailing list: tcpdump-workers@lists.tcpdump.org
I cannot recall if one needs to be subscribed first, but I suspect that there will be links off of www.tcpdump.org with that information.
I cannot recall if one needs to be subscribed first, but I suspect that there will be links off of www.tcpdump.org with that information.
there is no rest for the wicked yet the virtuous have no pillows
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
End of content
United States
Hewlett Packard Enterprise International
Communities
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP