Wireshark-dev: Re: [Wireshark-dev] how to cross-compile tshark and tools

From: George Nychis <gnychis@xxxxxxxxx>
Date: Wed, 13 Apr 2011 11:00:17 -0400
BTW, it appears that this has come up before in the past (2009):
https://$1.wireshark.org/lists/wireshark-users/200910/msg00123.html

but it doesn't seem like a resolution was made.. but this post has a short-term workaround:
http://seclists.org/wireshark/2009/Oct/286

I am going to try this out, the original poster never got back with whether this worked or not.

On Wed, Apr 13, 2011 at 10:32 AM, George Nychis <gnychis@xxxxxxxxx> wrote:
Hi all,

I am trying to cross-compile tshark for an arm system, but I am hitting an issue I am not sure how to overcome.

I have added my gcc cross-compiler to my path, and configured my system as:
./configure -host=arm-eabi --disable-wireshark --with-pcap=no

I succeed in building several of the components, but whenever it comes down to building the "epan" related components I hit the error that:
make[3]: Entering directory `/home/gnychis/Documents/wireshark/epan/dfilter'
../../tools/lemon/lemon t=./../../tools/lemon/lempar.c ./grammar.lemon || \
                (rm -f grammar.c grammar.h ; false)
/bin/bash: ../../tools/lemon/lemon: cannot execute binary file

Well, this is expected since lemon was built using my cross-compiler.

But, I am not sure what to do at this point.  I cannot use lemon since it is not built for the host, but I could build lemon specifically for the host... but would that create issues for when the target is on arm?

I'd greatly appreciate any feedback.

Thanks!
George