Python test failed with gstreamer 1.24.5

I am trying to build Gstreamer 1.24.5 with python using below command :
meson setup . ../gstreamer --buildtype release --unity off --strip --prefix=/opt/ --libdir = /opt/lib --default-library shared --wrap-mode=nofallback -Dorc-source=system -Dgpl =enabled -Drs=enabled -Dcpp_args=-std=c++20 -Dexamples=disabled -Dtests=enabled -Dgtk_doc=disabled -Dpackage-origin=https://github.com/Gstreamer/gstreamer -Dvaapi=enabled

meson version : 1.6.0
Operating system : Ubuntu 24.04

After this i ran the tests using
ninja -l $(no of cores) all

Following tests failed :


561/575 gst-editing-services / pythontests                                                FAIL              0.35s   exit status 1
>>> CK_DEFAULT_TIMEOUT=20 GI_TYPELIB_PATH=/mnt/gstreamer.build/subprojects/gst-editing-services/tests/check/../../ges GST_STATE_IGNORE_ELEMENTS='' MESON_TEST_ITERATION=1 GST_PLUGIN_SYSTEM_PATH_1_0='' UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=22 GST_REGISTRY=/mnt/gstreamer.build/subprojects/gst-editing-services/tests/check/scenarios.registry GST_PLUGIN_PATH_1_0=/mnt/gstreamer.build ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 /mnt/gstreamer.build/subprojects/gst-devtools/validate/tools/gst-validate-launcher --pyunittest-dir /mnt/gstreamer/subprojects/gst-editing-services/tests/check pyunittest --dump-on-failure

562/575 gst-editing-services / edit_while_seeked_with_stop                                OK                0.86s
563/575 gst-python / Test gst                                                             FAIL              0.11s   exit status 1
>>> GST_OVERRIDE_SRC_PATH=/mnt/gstreamer/subprojects/gst-python/testsuite/../gi/overrides GST_PLUGIN_PATH_1_0=/mnt/gstreamer.build:/mnt/gstreamer.build/subprojects/gst-python/plugin:/mnt/gstreamer/subprojects/gst-python/testsuite GST_PLUGIN_LOADING_WHITELIST=gstreamer:gst-plugins-base:gst-python@/mnt/gstreamer.build/subprojects/gst-python MESON_TEST_ITERATION=1 GST_REGISTRY='/mnt/gstreamer.build/subprojects/gst-python/testsuite/Test gst.registry' UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 GST_OVERRIDE_BUILD_PATH=/mnt/gstreamer.build/subprojects/gst-python/testsuite/../gi/overrides MALLOC_PERTURB_=236 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 /opt/miniconda/bin/python3 /mnt/gstreamer.build/../gstreamer/subprojects/gst-python/testsuite/runtests.py test_gst.py

564/575 gst-editing-services / check_keyframes_in_compositor_two_sources                  OK                0.75s
565/575 gst-python / Test fundamentals                                                    FAIL              0.05s   exit status 1
>>> GST_OVERRIDE_SRC_PATH=/mnt/gstreamer/subprojects/gst-python/testsuite/../gi/overrides MALLOC_PERTURB_=37 GST_PLUGIN_PATH_1_0=/mnt/gstreamer.build:/mnt/gstreamer.build/subprojects/gst-python/plugin:/mnt/gstreamer/subprojects/gst-python/testsuite GST_PLUGIN_LOADING_WHITELIST=gstreamer:gst-plugins-base:gst-python@/mnt/gstreamer.build/subprojects/gst-python MESON_TEST_ITERATION=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 GST_REGISTRY='/mnt/gstreamer.build/subprojects/gst-python/testsuite/Test fundamentals.registry' GST_OVERRIDE_BUILD_PATH=/mnt/gstreamer.build/subprojects/gst-python/testsuite/../gi/overrides ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 /opt/miniconda/bin/python3 /mnt/gstreamer.build/../gstreamer/subprojects/gst-python/testsuite/runtests.py test_types.py

566/575 gst-python / Test plugins                                                         FAIL              0.06s   exit status 1
>>> GST_OVERRIDE_SRC_PATH=/mnt/gstreamer/subprojects/gst-python/testsuite/../gi/overrides GST_PLUGIN_PATH_1_0=/mnt/gstreamer.build:/mnt/gstreamer.build/subprojects/gst-python/plugin:/mnt/gstreamer/subprojects/gst-python/testsuite GST_PLUGIN_LOADING_WHITELIST=gstreamer:gst-plugins-base:gst-python@/mnt/gstreamer.build/subprojects/gst-python MESON_TEST_ITERATION=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=194 GST_REGISTRY='/mnt/gstreamer.build/subprojects/gst-python/testsuite/Test plugins.registry' GST_OVERRIDE_BUILD_PATH=/mnt/gstreamer.build/subprojects/gst-python/testsuite/../gi/overrides ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 /opt/miniconda/bin/python3 /mnt/gstreamer.build/../gstreamer/subprojects/gst-python/testsuite/runtests.py test_plugin.py

567/575 gst-editing-services / simple_playback_test                                       OK                0.57s
568/575 gstreamer-full / python-full                                                      FAIL              0.07s   exit status 1
>>> GST_OVERRIDE_SRC_PATH=/mnt/gstreamer/tests/python/../../subprojects/gst-python/gi/overrides MALLOC_PERTURB_=83 MESON_TEST_ITERATION=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 GI_TYPELIB_PATH=/mnt/gstreamer.build/tests/python/../.. LD_LIBRARY_PATH=/opt/scorer/lib:/opt/miniconda/lib:/usr/local/cuda:/mnt/gstreamer.build/tests/python/../.. GST_OVERRIDE_BUILD_PATH=/mnt/gstreamer.build/tests/python/../../subprojects/gst-python/gi/overrides ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 /opt/miniconda/bin/python3.12 /mnt/gstreamer/tests/python/python-full.py

Could someone help identify the cause of this issue and suggest a solution? Any guidance or help would be greatly appreciated.

Have you tried the latest 1.24 release yet, which is 1.24.10 currently? :slightly_smiling_face:

I tried with Gstreamer version 1.24.10. It didn’t helped , same tests failed for this version also. :slightly_smiling_face:

I’m also trying to build gstreamer (1.26) with Windows 10, Python 3.12. The meson build seemed to go fine, and I can do something like

gst-launch-1.0.exe videotestsrc ! autovideosink

but when I try to use gst-python in my program. I get an error

>>> import gi
>>> gi.require_version('Gst','1.0')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\gstreamer\gst\lib\site-packages\gi\__init__.py", line 143, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gst not available

So i went and did

meson test -C .\builddir\ --suite gst-python

and all of the tests failed.

So I guess I got lucky with my first build. I can’t seem to replicate it.

[3226/3907] Linking target subprojects/libxml2-2.13.5/python/libxml2mod.cp312-win_amd64.pyd
FAILED: subprojects/libxml2-2.13.5/python/libxml2mod.cp312-win_amd64.pyd subprojects/libxml2-2.13.5/python/libxml2mod.cp312-win_amd64.pdb
“link” /MACHINE:x64 /OUT:subprojects/libxml2-2.13.5/python/libxml2mod.cp312-win_amd64.pyd subprojects/libxml2-2.13.5/python/libxml2mod.cp312-win_amd64.pyd.p/libxml.c.obj subprojects/libxml2-2.13.5/python/libxml2mod.cp312-win_amd64.pyd.p/libxml2-py.c.obj subprojects/libxml2-2.13.5/python/libxml2mod.cp312-win_amd64.pyd.p/types.c.obj “/release” “/nologo” “/DEBUG” “/PDB:subprojects\libxml2-2.13.5\python\libxml2mod.cp312-win_amd64.pdb” “/DLL” “/IMPLIB:subprojects\libxml2-2.13.5\python\libxml2mod.cp312-win_amd64.lib” “subprojects/libxml2-2.13.5/xml2.lib” “C:\Users\Tim\AppData\Local\Programs\Python\Python312\libs\python312.lib” “kernel32.lib” “user32.lib” “gdi32.lib” “winspool.lib” “shell32.lib” “ole32.lib” “oleaut32.lib” “uuid.lib” “comdlg32.lib” “advapi32.lib”
LINK : fatal error LNK1104: cannot open file ‘python312_d.lib’
[3227/3907] Linking target subprojects/gst-plugins-good/ext/jack/gstjack.dll
Creating library subprojects\gst-plugins-good\ext\jack\gstjack.lib and object subprojects\gst-plugins-good\ext\jack\gstjack.exp
[3228/3907] Linking target subprojects/gst-plugins-good/ext/cairo/gstcairo.dll
Creating library subprojects\gst-plugins-good\ext\cairo\gstcairo.lib and object subprojects\gst-plugins-good\ext\cairo\gstcairo.exp
[3229/3907] Linking target subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux2.dll
Creating library subprojects\gst-plugins-good\ext\adaptivedemux2\gstadaptivedemux2.lib and object subprojects\gst-plugins-good\ext\adaptivedemux2\gstadaptivedemux2.exp
[3230/3907] Linking target subprojects/gst-plugins-good/ext/flac/gstflac.dll
Creating library subprojects\gst-plugins-good\ext\flac\gstflac.lib and object subprojects\gst-plugins-good\ext\flac\gstflac.exp
[3231/3907] Linking target subprojects/gst-plugins-good/ext/jpeg/gstjpeg.dll
Creating library subprojects\gst-plugins-good\ext\jpeg\gstjpeg.lib and object subprojects\gst-plugins-good\ext\jpeg\gstjpeg.exp
ninja: build stopped: subcommand failed.

It turns out that I need

-Dlibxml2:python=false

to get rid of

Even though I reinstalled python 3.12 with the debug options, I still got that error during the build w/o the Dlibxml2:python=false option.