Open fruitboy1226 opened 4 years ago
You have two options:
exe_wrapper
in your binaries
section which can execute a program for the target architecture (e.g., Qemu)properties
, set needs_exe_wrapper = true
without setting an exe_wrapper
to avoid the sanity check(Sorry, now I see that you've specified wine
as your exe_wrapper
.)
I think your problem is that you've misconfigured your cross file. Unless you're building a cross compiler you don't want to set target_machine
, just host_machine
(which is the machine that the binaries will run on.
Try this cross file:
[binaries]
c = 'arm-poky-linux-gnueabi-gcc'
cpp = 'arm-poky-linux-gnueabi-g++'
ar = 'arm-poky-linux-gnueabi-ar'
strip = 'arm-poky-linux-gnueabi-strip'
pkgconfig = 'home/yishan.owen/usr/lib/sysroots/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/pkgconfig'
exe_wrapper = 'wine'
[properties]
sys_root = '/home/yishan.owen/usr/lib/sysroots/cortexa7hf-neon-vfpv4-poky-linux-gnueabi'
needs_exe_wrapper = true
sizeof_int = 4
sizeof_wchar_t = 2
sizeof_void* = 8
alignment_char = 1
alignment_void* = 4
alignment_double = 4
has_function_printf = true
c_args = ['-DCROSS=1', '-DSOMETHING=3']
[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'cortex-a7'
endian = 'little'
I've just had a problem that is possibly related. At least search engines thought so. :)
I was porting some code to run meson and my environment variables were not clean. That caused all kind of troubles and I also got confused because meson will check the sanity of both the native compiler and cross compiler without announcing it.
It could help to print some environment variables like CC and change "Sanity testing C compiler" with "Sanity testing native C compiler".
when i do the cross compile, there always block the following errors:
my cross config file defined the following:
my compile cmd: "meson cross-build --cross-file cross_config.txt"
the meson version is 0.53.2.
Could you help to fix this issue? thanks so much.