meson/ninja build fails with installed python >= 3.8 (Windows version tested)
Describe your issue
When building gstreamer using meson/ninja configuration on Windows (possibly others) the build fails if installed python is 3.8 or higher.
Expected Behavior
Expected build with recent python (>= 3.8) to succeed without issues.
Observed Behavior
Fail as follows.
File "F:\build\gstreamer\subprojects\gobject-introspection\tools\g-ir-scanner", line 98, in <module>
from giscanner.scannermain import scanner_main
File "F:\build\gstreamer\subprojects\gobject-introspection\giscanner\scannermain.py", line 35, in <module>
from giscanner.ast import Include, Namespace
File "F:\build\gstreamer\subprojects\gobject-introspection\giscanner\ast.py", line 29, in <module>
from .sourcescanner import CTYPE_TYPEDEF, CSYMBOL_TYPE_TYPEDEF
File "F:\build\gstreamer\subprojects\gobject-introspection\giscanner\sourcescanner.py", line 34, in <module>
from giscanner._giscanner import SourceScanner as CSourceScanner
ImportError: DLL load failed while importing _giscanner: The specified module could not be found.
ninja: build stopped: subcommand failed.
Setup
Windows 10, gstreamer trunk as of 3/11/2021
- Command line: meson /path/to/mybuild ; cd /path/to/mybuild; ninja
Steps to reproduce the bug
Uninstall python 3.7x if installed. Install more recent python: 3.8x, 3.9x or 3.10x
How reproducible is the bug?
Always
Solutions you have tried
Installed python 3.7x as workaround (effective)
Related non-duplicate issues
Additional Information
Suggest build configuration scripts modified to do something like this.
if (python version >= 3.8)
{
config += "-Dintrospection=disabled"
print("WARNING: introspection disabled because of python version incompatibility")
}
... as temporary until build passes latest python.
above is pseudo code, not something that can drop right in as is.