Open pinchartl opened 7 months ago
6 months ping :) We've discussed the issue on IRC a while ago, but the discussion then died out.
Should we be using
instead here? Will that handle cross compilation too ?
(Though even then that probably doesn't discount the nature of the issue above)
I think the python3 dependency should be fixed regardless. Meson shouldn't pick host libraries when cross-compiling and linking to dependency('foo'), for any value of 'foo'.
When cross-compiling a project using the
python3
dependency (e.g.py3_dep = dependency('python3', required : get_option('pycamera'))
), meson incorrectly uses the Python headers from the host if the cross-compilation environment doesn't include Python.The issue was introduced starting in
Before that commit, meson failed to find the
python3
dependency, as shown in meson.log:The offending commit introduced multiple issues that got fixed in subsequent commits, so it's difficult to pinpoint the exact cause. The next stable release of meson, 1.1.0, picked the Python headers from the host:
The problem persists in the meson master branch.
I have noticed the problem when trying to cross-compile libcamera (https://git.libcamera.org/libcamera/libcamera.git/), and wrote the following minimal reproducer:
To reproduce the issue, you will need a cross-compilation environment without Python. I personally use buildroot, and can provide a configuration file if desired.
system parameters