Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-users: Re: [Wireshark-users] T-Shark Cross Compilation issue

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Fri, 16 Oct 2009 16:34:35 -0400
Clint Thomas wrote:
Salutations,

I�ve been making an attempt to cross compile TShark (and dumpcap) for my PPC 8541 platform, overcoming the slight hurdles that keep presenting themselves (missing libraries, etc.) My first tries were using the old stable version (1.0.9), whereupon I ran into a problem regarding the rdps binary (cross compiled binary wants to execute on my x86 host machine). This was detailed here
[...]
What I�m wondering is, can I disable lemon�s execution during the build process and be safe? Do I need lemon to be on my target platform for TShark to operate correctly? Or is this just an artifact of the build process, and I need to change the CC used to build the tool?

Yes, you need lemon.  It generates the display filter grammar.

I think I may have (finally, after several wrong turns) figured out what's wrong with cross-compilation: we're not calling AC_CANONICAL_TARGET any more (this was commented out in rev 25232).

Just un-commenting it breaks things, so can you try to see if it works with configure.in starting like this:

# $Id: configure.in 30478 2009-10-10 14:20:33Z krj $
#
AC_PREREQ(2.60)

AC_INIT(wireshark, 1.3.1)

dnl Check for CPU / vendor / OS
dnl The user is encouraged to use either `AC_CANONICAL_BUILD', or
dnl `AC_CANONICAL_HOST', or `AC_CANONICAL_TARGET', depending on the
dnl needs.  Using `AC_CANONICAL_TARGET' is enough to run the two other
dnl macros.

dnl AC_CANONICAL_HOST
dnl AC_CANONICAL_BUILD
AC_CANONICAL_TARGET

AM_INIT_AUTOMAKE([1.9 tar-ustar])

(In 1.2 the revision and version numbers will be different. What's important is that AC_INIT comes first, then AC_CANONICAL_TARGET, then AM_INIT_AUTOMAKE.)