mpv-player / mpv-build

🔨 Helper scripts to compile mpv on Linux
http://mpv.io
414 stars 108 forks source link

meson.build:1:0: ERROR: Could not invoke sanity test executable: [Errno 8] Exec format error: '/workspaces/test/mpv-build/libplacebo/build/meson-private/sanitycheckc.exe'. #238

Closed BrownNPC closed 1 month ago

BrownNPC commented 1 month ago
Build started at 2024-10-01T12:45:18.491512
Main binary: /usr/local/python/3.12.1/bin/python3
Build Options: -Ddefault_library=static -Dtests=false -Ddemos=false -Dprefix=/workspaces/test/mpv-build/build_libs -Dlibdir=/workspaces/test/mpv-build/build_libs/lib
Python system: Linux
The Meson build system
Version: 1.5.2
Source dir: /workspaces/test/mpv-build/libplacebo
Build dir: /workspaces/test/mpv-build/libplacebo/build
Build type: native build
Project name: libplacebo
Project version: 7.349.0
-----------
Detecting compiler via: `x86_64-w64-mingw32-gcc --version` -> 0
stdout:
x86_64-w64-mingw32-gcc (GCC) 9.3-win32 20200320
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------
Running command: -cpp -x c -E -dM -
-----
-----------
Detecting linker via: `x86_64-w64-mingw32-gcc -Wl,--version` -> 0
stdout:
GNU ld (GNU Binutils) 2.34
Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
-----------
stderr:
collect2 version 9.3-win32 20200320
/usr/bin/x86_64-w64-mingw32-ld -plugin /usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/lto-wrapper -plugin-opt=-fresolution=/tmp/ccmZX69z.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -m i386pep -Bdynamic /usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/../../../../x86_64-w64-mingw32/lib/crt2.o /usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/crtbegin.o -L/usr/lib/gcc/x86_64-w64-mingw32/9.3-win32 -L/usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/../../../../x86_64-w64-mingw32/lib --version -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt /usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/crtend.o
-----------
Sanity testing C compiler: x86_64-w64-mingw32-gcc
Is cross compiler: False.
Sanity check compiler command line: x86_64-w64-mingw32-gcc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command:  /workspaces/test/mpv-build/libplacebo/build/meson-private/sanitycheckc.exe

meson.build:1:0: ERROR: Could not invoke sanity test executable: [Errno 8] Exec format error: '/workspaces/test/mpv-build/libplacebo/build/meson-private/sanitycheckc.exe'.

Its trying to run a windows executable when my goal is to cross compile for windows. I there a config option for disabling these sanity checks?

kasper93 commented 1 month ago

Those checks are meson's and not related to mpv.

Build type: native build

You have to use cross compilation mode, else meson will be unhappy, if binaries are not runnable. In cross compile, you can use wine to sanity check or not, controlled by exe_wrapper. See https://mesonbuild.com/Cross-compilation.html for proper cross compilation configuration with meson.