For a while, I managed to cross-compile the appropriate GTK4 DLLs from Linux Mint. For about 2-3 months, it’s been complaining that python.h is missing. How can I work around this?
mkdir gtk
cd gtk
git clone https://gitlab.gnome.org/GNOME/gtk.git
mkdir build_win64
cd build_win64
meson setup ../gtk/ --cross-file ../cross.ini
ninja -j20
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'
[properties]
sys_root = '$HOME/.wine/drive_c'
[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
ld = 'x86_64-w64-mingw32-ld'
objcopy = 'x86_64-w64-mingw32-objcopy'
strip = 'x86_64-w64-mingw32-strip'
pkg-config = 'x86_64-w64-mingw32-pkg-config'
windres = 'x86_64-w64-mingw32-windres'
# exe_wrapper = 'wine64'
exe_wrapper = 'wine'
[built-in options]
vulkan = 'disabled'
default_library = 'shared'
build-demos = 'false'
debug = 'false'
optimization = 's'
introspection = 'disabled'
# media-gstreamer = 'disabled'
meson-log.txt:
env[PKG_CONFIG_LIBDIR]: /usr/lib/x86_64-linux-gnu/pkgconfig
env[PKG_CONFIG_PATH]:
env[PKG_CONFIG_SYSROOT_DIR]: $HOME/.wine/drive_c
env[PKG_CONFIG]: /usr/bin/x86_64-w64-mingw32-pkg-config
-----------
Called: `/usr/bin/x86_64-w64-mingw32-pkg-config --cflags python-3.12` -> 0
stdout:
-I$HOME/.wine/drive_c/usr/include/python3.12 -I$HOME/.wine/drive_c/usr/include/x86_64-linux-gnu/python3.12
-----------
env[PKG_CONFIG_LIBDIR]: /usr/lib/x86_64-linux-gnu/pkgconfig
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
env[PKG_CONFIG_PATH]:
env[PKG_CONFIG_SYSROOT_DIR]: $HOME/.wine/drive_c
env[PKG_CONFIG]: /usr/bin/x86_64-w64-mingw32-pkg-config
-----------
Called: `/usr/bin/x86_64-w64-mingw32-pkg-config --libs python-3.12` -> 0
env[PKG_CONFIG_LIBDIR]: /usr/lib/x86_64-linux-gnu/pkgconfig
env[PKG_CONFIG_PATH]:
env[PKG_CONFIG_SYSROOT_DIR]: $HOME/.wine/drive_c
env[PKG_CONFIG]: /usr/bin/x86_64-w64-mingw32-pkg-config
-----------
Called: `/usr/bin/x86_64-w64-mingw32-pkg-config --libs python-3.12` -> 0
Run-time dependency python found: YES 3.12
Running compile:
Working directory: /home/tux/Schreibtisch/von_Git/GTK4/build_win64/meson-private/tmpzvite3bq
Code:
#include <Python.h>
-----------
Command line: `x86_64-w64-mingw32-gcc '-I$HOME/.wine/drive_c/usr/include/python3.12' '-I$HOME/.wine/drive_c/usr/include/x86_64-linux-gnu/python3.12' /home/tux/Schreibtisch/von_Git/GTK4/build_win64/meson-private/tmpzvite3bq/testfile.c -o /home/tux/Schreibtisch/von_Git/GTK4/build_win64/meson-private/tmpzvite3bq/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 -std=gnu99` -> 1
stderr:
/home/tux/Schreibtisch/von_Git/GTK4/build_win64/meson-private/tmpzvite3bq/testfile.c:2:18: fatal error: Python.h: No such file or directory
2 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
-----------
../gtk/subprojects/gobject-introspection/meson.build:178:3: ERROR: C header 'Python.h' not usable```