Wireshark-dev: Re: [Wireshark-dev] Issues with cross-compiling

From: Guy Harris <gharris@xxxxxxxxx>
Date: Mon, 17 Jan 2022 21:14:11 -0800
On Jan 16, 2022, at 6:01 PM, Glen Huang <heyhgl@xxxxxxxxx> wrote:

> I’m trying to create an OpenWrt package for Wireshark.
> 
> I think I’m pretty close. However, I got stuck at lemon, which if I’m not wrong, should be compiled by my build machine’s compiler. From the source code, I found out it supports the LEMON_C_COMPILER variable, which I assigned with the build machine’s compiler, but after compiling, CMAKE used the target platform’s linking flags for linking, which apparently failed.

At least according to the "Mastering Cmake" boot, if your build process requires special tools built from project source in the native environment, that's a bit of a pain with CMake:

	https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html#running-executables-built-in-the-project

I don't know whether newer version of CMake have a built-in concept of "this file must be built with a native compiler when doing a cross-build".