Enabling visualstudio variant throws exception in ninjabackend.py
Win10 x64 Pro 1909
Current cerbero master (cloned yesterday), not sure where to get the version number from.
Python 3.8.1 x64
CMake 3.16.2
VS Community 2019 16.4.29613.14
Trying to build GStreamer with Cerbero, with -v visualstudio enabled. Without the variant, compilation runs without problems.
After a successful bootstrap, trying to build package gstreamer with -v visualstudio enabled causes an exception to occur:
$ ./cerbero-uninstalled bootstrap
[...]
$ ./cerbero-uninstalled -v visualstudio package gstreamer-1.0
Building recipes with Visual Studio 2019 whenever possible
WARNING: Could not recover status
Building the following recipes: mingw-runtime libffi zlib proxy-libintl glib gstreamer-1.0 libxml2 libogg libpng pixman expat bzip2 freetype libiconv fontconfig cairo fribidi harfbuzz pango libvorbis libtheora libvisual orc opus graphene libjpeg-turbo gst-plugins-base-1.0 gst-shell speex gmp nettle libtasn1 gnutls glib-networking libsoup mpg123 lame wavpack flac libvpx libdv gst-plugins-good-1.0 libass libkate openh264 librtmp libsrtp libdca libmms libdvdread libdvdnav libnice vo-aacenc openjpeg tiff spandsp sbc ladspa srt libusrsctp zbar openssl gst-plugins-bad-1.0 a52dec opencore-amr x264 gst-plugins-ugly-1.0 json-glib ca-certificates gst-rtsp-server-1.0 ffmpeg gst-libav-1.0 gst-validate gst-editing-services-1.0 vsintegration-1.0
Running under MSYS: reverting to basic build status output
Building using 2 job(s) with the following job subdivisions: 2 general job(s)
[(1/75) mingw-runtime -> fetch]
[(1/75) mingw-runtime -> extract]
[(1/75) mingw-runtime -> configure]
[(1/75) mingw-runtime -> compile]
[(1/75) mingw-runtime -> install]
[(1/75) mingw-runtime -> post_install]
[(1/75) mingw-runtime -> gen_library_file]
[(2/75) zlib -> fetch]
[(2/75) zlib -> extract]
[(2/75) zlib -> configure]
[(3/75) proxy-libintl -> fetch]
[(3/75) proxy-libintl -> extract]
[(3/75) proxy-libintl -> configure]
Running command 'c:/GStreamer_Cerbero/cerbero/build/build-tools/bin/meson --prefix=c:/GStreamer_Cerbero/cerbero/build/dist/msvc_x86_64 --libdir=lib --default-library=both --buildtype=debugoptimized --backend=ninja --wrap-mode=nodownload --native-file c:/GStreamer_Cerbero/cerbero/build/sources/msvc_x86_64/proxy-libintl-0.1/_builddir/meson-native-file.txt'
The Meson build system
Version: 0.49.2
Source dir: C:\GStreamer_Cerbero\cerbero\build\sources\msvc_x86_64\proxy-libintl-0.1
Build dir: C:\GStreamer_Cerbero\cerbero\build\sources\msvc_x86_64\proxy-libintl-0.1\_builddir
Build type: native build
Project name: proxy-libintl
Project version: 1
Appending CFLAGS from environment: '/utf-8'
Native C compiler: cl (msvc 19.24.28314)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Build targets in project: 2
Found ninja-1.9.0 at 'c:/GStreamer_Cerbero/cerbero/build/build-tools/bin\ninja.EXE'
Traceback (most recent call last):
File "c:\GStreamer_Cerbero\cerbero\build\build-tools\Lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\mesonmain.py", line 112, in run
return options.run_func(options)
File "c:\GStreamer_Cerbero\cerbero\build\build-tools\Lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\msetup.py", line 230, in run
app.generate()
File "c:\GStreamer_Cerbero\cerbero\build\build-tools\Lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\msetup.py", line 161, in generate
self._generate(env)
File "c:\GStreamer_Cerbero\cerbero\build\build-tools\Lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\msetup.py", line 210, in _generate
intr.backend.generate(intr)
File "c:\GStreamer_Cerbero\cerbero\build\build-tools\Lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\backend\ninjabackend.py", line 220, in generate
with self.detect_vs_dep_prefix(tempfilename) as outfile:
File "c:\GStreamer_Cerbero\cerbero\build\build-tools\Lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\backend\ninjabackend.py", line 188, in detect_vs_dep_prefix
pc = subprocess.Popen([compiler.get_exelist(),
File "C:\Python38\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python38\lib\subprocess.py", line 1247, in _execute_child
args = list2cmdline(args)
File "C:\Python38\lib\subprocess.py", line 549, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Python38\lib\os.py", line 816, in fsdecode
filename = fspath(filename) # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not list
Recipe 'proxy-libintl' failed at the build step 'configure'
Fatal Error: Running ['c:/GStreamer_Cerbero/cerbero/build/build-tools/bin/meson', '--prefix=c:/GStreamer_Cerbero/cerbero/build/dist/msvc_x86_64', '--libdir=lib', '--default-library=both', '--buildtype=debugoptimized', '--backend=ninja', '--wrap-mode=nodownload', '--native-file', 'c:/GStreamer_Cerbero/cerbero/build/sources/msvc_x86_64/proxy-libintl-0.1/_builddir/meson-native-file.txt'], returncode 2
Select an action to proceed:
[0] Enter the shell
[1] Rebuild the recipe from scratch
[2] Rebuild starting from the failed step
[3] Skip recipe
[4] Abort
4
Running command 'c:/GStreamer_Cerbero/cerbero/build/build-tools/bin/meson --prefix=c:/GStreamer_Cerbero/cerbero/build/dist/msvc_x86_64 --libdir=lib --default-library=both --buildtype=debugoptimized --backend=ninja --wrap-mode=nodownload --native-file c:/GStreamer_Cerbero/cerbero/build/sources/msvc_x86_64/zlib-1.2.11/_builddir/meson-native-file.txt'
The Meson build system
Version: 0.49.2
Source dir: C:\GStreamer_Cerbero\cerbero\build\sources\msvc_x86_64\zlib-1.2.11
Build dir: C:\GStreamer_Cerbero\cerbero\build\sources\msvc_x86_64\zlib-1.2.11\_builddir
Build type: native build
Project name: zlib
Project version: 1.2.11
Appending CFLAGS from environment: '/utf-8'
Native C compiler: cl (msvc 19.24.28314)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Build targets in project: 2
Found ninja-1.9.0 at 'c:/GStreamer_Cerbero/cerbero/build/build-tools/bin\ninja.EXE'
Traceback (most recent call last):
File "c:\GStreamer_Cerbero\cerbero\build\build-tools\Lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\mesonmain.py", line 112, in run
return options.run_func(options)
File "c:\GStreamer_Cerbero\cerbero\build\build-tools\Lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\msetup.py", line 230, in run
app.generate()
File "c:\GStreamer_Cerbero\cerbero\build\build-tools\Lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\msetup.py", line 161, in generate
self._generate(env)
File "c:\GStreamer_Cerbero\cerbero\build\build-tools\Lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\msetup.py", line 210, in _generate
intr.backend.generate(intr)
File "c:\GStreamer_Cerbero\cerbero\build\build-tools\Lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\backend\ninjabackend.py", line 220, in generate
with self.detect_vs_dep_prefix(tempfilename) as outfile:
File "c:\GStreamer_Cerbero\cerbero\build\build-tools\Lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\backend\ninjabackend.py", line 188, in detect_vs_dep_prefix
pc = subprocess.Popen([compiler.get_exelist(),
File "C:\Python38\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python38\lib\subprocess.py", line 1247, in _execute_child
args = list2cmdline(args)
File "C:\Python38\lib\subprocess.py", line 549, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Python38\lib\os.py", line 816, in fsdecode
filename = fspath(filename) # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not list
Recipe 'zlib' failed at the build step 'configure'
Fatal Error: Running ['c:/GStreamer_Cerbero/cerbero/build/build-tools/bin/meson', '--prefix=c:/GStreamer_Cerbero/cerbero/build/dist/msvc_x86_64', '--libdir=lib', '--default-library=both', '--buildtype=debugoptimized', '--backend=ninja', '--wrap-mode=nodownload', '--native-file', 'c:/GStreamer_Cerbero/cerbero/build/sources/msvc_x86_64/zlib-1.2.11/_builddir/meson-native-file.txt'], returncode 2
Select an action to proceed:
[0] Enter the shell
[1] Rebuild the recipe from scratch
[2] Rebuild starting from the failed step
[3] Skip recipe
[4] Abort
4
***** Error running 'package' command:
I did a little debugging: in cerbero\build\build-tools\lib\site-packages\meson-0.49.2-py3.8.egg\mesonbuild\backend\ninjabackend.py, line 188 has
pc = subprocess.Popen([compiler.get_exelist(), ...
The get_exelist() function returns ['cl'] for Visual Studio 2019. The error goes away if the list is unpacked or the first item is used. My quick fix:
aaa = compiler.get_exelist()
if isinstance(aaa, list):
if len(aaa) == 1:
aaa = aaa[0]
else:
raise MesonException('Compiler exe list is a list with >1 elements.')
pc = subprocess.Popen([aaa, ...
With this "fix", Cerbero completed successfully, though the actual command line also included -v nvcodec and -v intelmsdk besides -v visualstudio.
After installing the .msi package supplied by Cerbero (gstreamer-1.0-msvc-x86_64-1.17.0.1.msi), however, I get some warnings when running gst-launch or gst-inspect:
C:\>gst-launch-1.0.exe
(gst-launch-1.0:2712): GStreamer-WARNING **: 18:34:09.069: Failed to load plugin 'C:\Users\T\GStreamer\1.0\x86_64\lib\gstreamer-1.0\gstassrender.dll': 'C:\Users\T\GStreamer\1.0\x86_64\lib\gstreamer-1.0\gstassrender.dll': %1 is not a valid Win32 application.
(gst-launch-1.0:2712): GStreamer-WARNING **: 18:34:09.122: Failed to load plugin 'C:\Users\T\GStreamer\1.0\x86_64\lib\gstreamer-1.0\gstdashdemux.dll': 'C:\Users\T\GStreamer\1.0\x86_64\lib\gstreamer-1.0\gstdashdemux.dll': %1 is not a valid Win32 application.
(gst-launch-1.0:2712): GStreamer-WARNING **: 18:34:09.170: Failed to load plugin 'C:\Users\T\GStreamer\1.0\x86_64\lib\gstreamer-1.0\gstges.dll': 'C:\Users\T\GStreamer\1.0\x86_64\lib\gstreamer-1.0\gstges.dll': %1 is not a valid Win32 application.
0:00:00.464240000 2712 0000027CDD719E40 ERROR msdk msdk.c:177:msdk_open_session: Intel Media SDK not available (undeveloped feature)
(gst-launch-1.0:2712): GStreamer-WARNING **: 18:34:09.525: Failed to load plugin 'C:\Users\T\GStreamer\1.0\x86_64\lib\gstreamer-1.0\gstsmoothstreaming.dll': 'C:\Users\T\GStreamer\1.0\x86_64\lib\gstreamer-1.0\gstsmoothstreaming.dll': %1 is not a valid Win32 application.
(gst-launch-1.0:2712): GStreamer-WARNING **: 18:34:09.552: Failed to load plugin 'C:\Users\T\GStreamer\1.0\x86_64\lib\gstreamer-1.0\gstsoup.dll': 'C:\Users\T\GStreamer\1.0\x86_64\lib\gstreamer-1.0\gstsoup.dll': %1 is not a valid Win32 application.
(gst-launch-1.0:2712): GStreamer-WARNING **: 18:34:09.599: Failed to load plugin 'C:\Users\T\GStreamer\1.0\x86_64\lib\gstreamer-1.0\gstzbar.dll': 'C:\Users\T\GStreamer\1.0\x86_64\lib\gstreamer-1.0\gstzbar.dll': %1 is not a valid Win32 application.
0:00:00.617256000 2712 0000027CDD719E40 ERROR GST_PIPELINE gst/parse/grammar.y:1162:priv_gst_parse_yyparse: empty pipeline not allowed
ERROR: pipeline could not be constructed: empty pipeline not allowed.
The two errors are expected, as 1) I don't have Intel drivers installed, 2) I ran gst-launch without parameters. I'm hoping to figure out why the other warnings occurred. Other than these warnings, things seem to work, e.g. I'm able to launch a pipeline for h264 or hevc video playback.
Edit: error output, software versions added, reformatted