ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-users: Re: [Wireshark-users] Cross compiling on MIPS32 problem

From: Jeff Morriss <jeff.morriss@xxxxxxxxxxx>
Date: Tue, 06 Feb 2007 14:25:09 +0800

[BTW, it's better to compose a new email rather than reply to an existing one on a different topic when sending to public mailing lists.]

Daniele Brevi wrote:
I'm trying to cross-compile tshark for a MIPS32 platform.
[...]
The problem is that when I run make it says that rdps executable cannot run.
If I understood well this file should not be cross-compiled (because it is
used for compilation task on host machine) so I edit the Makefile and I
substitute this:
rdps: rdps.c
        $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o rdps $(srcdir)/rdps.c

With this:

rdps: rdps.c
        gcc $(CFLAGS_FOR_BUILD) -o rdps $(srcdir)/rdps.c

and now seems to work.

Is this a bug or I use --target, --host, and --build and the wrong manner?

Looks like a bug to me.

I checked in a change (rev 20727) to change the line to:

rdps: rdps.c
        $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c

which should be correct (though I've never cross-compiled anything in my life).