title: Tcpdump cross-compilation for MIPS
body: <p>I have developed a basic "Hello World" cross-compilation for MIPS architecture. I have used CodeSourcery toolchain and compile it with the next command:</p>
  
  <pre><code>mips-linux-gnu-gcc -muclibc -mips32 -EB -static hallo.c
  </code></pre>
  
  <p>And it works, compile well and the target MIPS shows the "Hello World" sencence.</p>
  
  <p>However, I want to compile tcpdump for MIPS architecture as well. The steps are:</p>
  
  <pre><code>Download and decompress libpcap
  export LDFLAGS="-static"
  CC=mips-linux-gnu-gcc ac_cv_linux_vers=2 ./configure --host=mips-linux-gnu --with-pcap=linux
  make
  
  Download and decompress tcpdump
  CC=mips-linux-gnu-gcc ac_cv_linux_vers=2 ./configure --host=mips-linux-gnu --includedir=/to/the/path/libpcap --disable-ipv6
  make
  </code></pre>
  
  <p>Both, libpcap and tcpump, compile well without any error. However, when I run tcpdump in the target MIPS -> no output, nothing, it doesn't work.</p>
  
  <p>The file type of tcpdump binary is:</p>
  
  <pre><code>ELF 32-bit MSB  executable, MIPS, MIPS32 rel2 version 1, statically linked, for GNU/Linux 2.6.12, not stripped
  </code></pre>
  
  <p>Although the target MIPS has a Linux version 2.6.8.1, I think the main difference between "Hello World" and tcpdump is the uClibc library, I don't know if it is necessary for compiling tcpdump, and I don't know how to include it.</p>
  
  <p>Any idea?</p>
  
  <p>Thanks, best regards.</p>