Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gstreamer] missing GLib-2.0.gir' #15

Open
costisth opened this issue Feb 14, 2025 · 9 comments
Open

[gstreamer] missing GLib-2.0.gir' #15

costisth opened this issue Feb 14, 2025 · 9 comments
Labels
bug Something isn't working

Comments

@costisth
Copy link

Description

Building gstreamer 1.24.12 with_introspection on windows with msvc ended with the following error:
Couldn't find include 'GLib-2.0.gir'
(using self.requires("glib/2.78.3", transitive_headers=True, transitive_libs=True)

Shall glib be already installed (as a system dependency) ?
Any hint ?

Originally posted by @valgur in conan-io#26363 (comment)

Package and Environment Details

  • Package Name/Version: gstreamer/1.24.12
  • Operating System+version: Windows 10
  • Compiler+version: MSVC
  • Conan version: conan 2.11.0
  • Python version: Python 3.7.4

Conan profile

detect_api: Found msvc 17

Detected profile:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.version=193
os=Windows

Steps to reproduce

conan create --version 1.24.12 -vvv --update --build=missing -pr:h default-x86_64-windows-msvc193-cppstd17 -pr:b default-x86_64-windows-msvc193-cppstd17 -o shared=True -o with_introspection .\conanfile.py

Logs

Click to expand log
.....
gst-python| Program python3 found: YES (C:\Users\th\AppData\Local\Programs\Python\Python310\python.EXE)
gst-python| Run-time dependency python found: YES 3.10
gst-python| Run-time dependency python found: YES 3.10
gst-python| Message: python_abi_flags =
gst-python| Message: PY_LIB_FNAME = python310.dll (C:\Users\th\AppData\Local\Programs\Python\Python310)
gst-python| Message: pygobject overrides directory = C:/Lib\site-packages\gi/overrides
gst-python| Configuring config.h using configuration
gst-python| Build targets in project: 367
gst-python| Subproject gst-python finished.

..\src\meson.build:208: WARNING: DEPRECATED use of the `plugins` variable in gst-python.
..\src\meson.build:209: WARNING: The variable should now be called `gst_plugins` and use:
..\src\meson.build:210: WARNING: `declare_dependency( link_with: <plugin_target>, variable: {'full_path': <plugin_target>.full_path()})` instead

Executing subproject gst-examples

gst-examples| Project name: gst-examples
gst-examples| Project version: 1.24.11
gst-examples| C compiler for the host machine: cl (msvc 19.37.32825 "Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32825 for x64")
gst-examples| C linker for the host machine: link link 14.37.32825.0
gst-examples| Library m found: NO
gst-examples| Compiler for C supports arguments /utf-8: YES (cached)
gst-examples| Dependency gio-2.0 found: YES 2.78.3 (cached)
gst-examples| Dependency gstreamer-1.0 found: YES 1.24.11 (overridden)
gst-examples| Run-time dependency gstreamer-play-1.0 found: NO (tried pkgconfig and cmake)
gst-examples| Not looking for a fallback subproject for the dependency gstreamer-play-1.0 because:
gst-examples| Use of fallback dependencies is disabled.

gst-examples| ..\src\subprojects\gst-examples\meson.build:27:14: Exception: Dependency 'gstreamer-play-1.0' is required but not found.

Subproject subprojects\gst-examples is buildable: NO (disabling)
Subproject gst-plugins-rs : skipped: feature rs disabled
Dependency glib-2.0 found: YES 2.78.3 (cached)
Program scripts/update-girs.py found: YES (C:\Users\th\AppData\Local\Programs\Python\Python310\python.exe C:\Users\th\.conan2\p\b\gstre25c83bb564b61
Message: Documentation not built as building the documentation while cross building or building on windows is not supported yet.
Configuring GstDocumentedSubprojects with command
Program scripts/generate_plugins_path.py found: YES (C:\Users\th\AppData\Local\Programs\Python\Python310\python.exe C:\Users\th\.conan2\p\b\gstre25c
Configuring GstPluginsPath.json with command
Message: Building subprojects: gstreamer, gst-plugins-base, gst-plugins-good, libnice, gst-rtsp-server, gst-integration-testsuites, gst-python
Program gst-env.py found: YES (C:\Users\th\AppData\Local\Programs\Python\Python310\python.exe C:\Users\th\.conan2\p\b\gstre25c83bb564b61\b\src\gst-e
Program dotnet-format found: NO
Build targets in project: 371

gst-plugins-base 1.24.11

    GL api     : gl
    GL platform: wgl
    GL winsys  : win32
    Plugins    : adder, app, audioconvert, audiomixer, audiorate, audioresample, audiotestsrc, compositor, dsd, basedebug, encoding, gio, overlaycomposition, pb
                 videoconvertscale, videorate, videotestsrc, volume, opengl

gst-plugins-good 1.24.11

    Plugins: alpha, alphacolor, apetag, audiofx, audioparsers, auparse, autodetect, avi, cutter, navigationtest, debug, deinterlace, dtmf, effectv, equalizer, f
             interleave, isomp4, alaw, mulaw, level, matroska, monoscope, multifile, multipart, replaygain, rtp, rtpmanager, rtsp, shapewipe, smpte, spectrum, u
             xingmux, y4menc, directsound, waveform, jack, png, qml6

gst-rtsp-server 1.24.11

    Plugins: rtspclientsink

gstreamer 1.24.11

    Plugins: coreelements, coretracers

orc 0.4.38

  Backends
    AVX             : YES
    SSE             : YES
    MMX             : YES
    NEON            : NO
    MIPS            : NO
    c64x            : NO
    Altivec         : NO

  Build options
    Tools           : YES
    Tests           : NO
    Examples        : NO
    Benchmarks      : YES
    Documentation   : NO  disabled on windows
    Orc-test library: YES

gstreamer-full 1.24.11

  Build options
    gstreamer-full library     : NO
    gstreamer-full target type : shared_library
    Tools                      : gst-inspect  gst-stats  gst-typefind  gst-launch  gst-device-monitor  gst-discoverer  gst-play
    Helpers                    : gst-plugin-scanner  gst-completion-helper
    Libraries                  : gstreamer-rtsp-server-1.0
    Tests and examples disabled: NO

  Subprojects
    gl-headers                 : YES (from gst-plugins-base)
    gst-devtools               : NO Dependency 'json-glib-1.0' is required but not found.
    gst-editing-services       : NO INSTSONAME is not a valid variable name
    gst-examples               : NO Dependency 'gstreamer-play-1.0' is required but not found.
    gst-integration-testsuites : YES
    gst-libav                  : NO Dependency 'libavfilter' is required but not found.
    gst-plugins-bad            : NO Feature 'bad' disabled
    gst-plugins-base           : YES
    gst-plugins-good           : YES
    gst-plugins-rs             : NO Feature 'rs' disabled
    gst-plugins-ugly           : NO Feature 'ugly' disabled
    gst-python                 : YES
    gst-rtsp-server            : YES
    gstreamer                  : YES
    gstreamer-sharp            : NO Feature 'sharp' disabled
    gstreamer-vaapi            : NO Feature 'vaapi' disabled
    libnice                    : YES
    orc                        : YES
    pygobject                  : YES
    win-flex-bison-binaries    : YES 2 warnings
    win-nasm                   : YES
    win-pkgconfig              : YES

  User defined options
    Native files               : C:\Users\th\.conan2\p\b\gstre25c83bb564b61\b\build-release\conan\conan_meson_native.ini
    prefix                     : C:/

Found ninja-1.12.1 at C:\Users\th\.conan2\p\ninjad9a44352249a5\p\bin\ninja.EXE

gstreamer/1.24.11: Meson build cmd: meson compile -C "C:\Users\th\.conan2\p\b\gstre25c83bb564b61\b\build-release" -j8
gstreamer/1.24.11: RUN: meson compile -C "C:\Users\th\.conan2\p\b\gstre25c83bb564b61\b\build-release" -j8
gstreamer/1.24.11: Full command: "C:\Users\th\.conan2\p\b\gstre25c83bb564b61\b\build-release\conan\conanbuild.bat" && powershell.exe -Command "&'C:\Users\uild.ps1'" ; cmd /c "meson compile -C \"C:\Users\th\.conan2\p\b\gstre25c83bb564b61\b\build-release\" -j8"
conanvcvars.bat: Activating environment Visual Studio 17 - amd64 - winsdk_version=None - vcvars_ver=14.3
[vcvarsall.bat] Environment initialized for: 'x64'
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: C:\Users\th\.conan2\p\ninjad9a44352249a5\p\bin\ninja.EXE -j 8
[117/1397] Linking target subprojects/gstreamer/gst/gstreamer-1.0-0.dll
   Creating library subprojects\gstreamer\gst\gstreamer-1.0.lib and object subprojects\gstreamer\gst\gstreamer-1.0.exp
[119/1397] Linking target subprojects/orc/orc/orc-0.4-0.dll
   Creating library subprojects\orc\orc\orc-0.4.lib and object subprojects\orc\orc\orc-0.4.exp
[135/1397] Linking target subprojects/gstreamer/libs/gst/base/gstbase-1.0-0.dll
   Creating library subprojects\gstreamer\libs\gst\base\gstbase-1.0.lib and object subprojects\gstreamer\libs\gst\base\gstbase-1.0.exp
[163/1397] Linking target subprojects/gst-plugins-base/gst-libs/gst/tag/gsttag-1.0-0.dll
   Creating library subprojects\gst-plugins-base\gst-libs\gst\tag\gsttag-1.0.lib and object subprojects\gst-plugins-base\gst-libs\gst\tag\gsttag-1.0.exp
[166/1397] Generating subprojects/gstreamer/gst/Gst-1.0.gir with a custom command (wrapped by meson to set PATH, to set env)
FAILED: subprojects/gstreamer/gst/Gst-1.0.gir
"C:\Users\th\AppData\Local\Programs\Python\Python310\python.exe" "C:\Users\th\.conan2\p\meson70f304e27b046\f\bin\meson.py" "--internal" "exe" "--unpease\meson-private\meson_exe_python.EXE_900b68c035ea06f911d85979eafd31ac127e8f22.dat"
while executing ['C:\\Users\\th\\AppData\\Local\\Programs\\Python\\Python310\\python.EXE', 'C:/Users/th/.conan2/p/b/gobjed778ea6abd76c/p/bin/g-ir-sc.0', '--warn-all', '--output', 'subprojects/gstreamer/gst/Gst-1.0.gir', '--add-init-section=extern void gst_init(gint*,gchar**);g_setenv("GST_REGISTRY_DISABLE",, TRUE);g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);gst_init(NULL,NULL);', '--quiet', '--c-include=gst/gst.h', '-b/src/subprojects/gstreamer/gst/..', '-IC:/Users/th/.conan2/p/b/gstre25c83bb564b61/b/build-release/subprojects/gstreamer/gst/..', '-DGST_DISABLE_MINIOBJECb/gstre25c83bb564b61/b/src/subprojects/gstreamer/gst', '-IC:/Users/th/.conan2/p/b/gstre25c83bb564b61/b/build-release/subprojects/gstreamer/gst', '-IC:/Useer/.', '-IC:/Users/th/.conan2/p/b/gstre25c83bb564b61/b/build-release/subprojects/gstreamer/.', '-IC:/Users/th/.conan2/p/b/gstre25c83bb564b61/b/src/stre25c83bb564b61/b/build-release/subprojects/gstreamer/gst/parse', '--filelist=C:/Users/th/.conan2/p/b/gstre25c83bb564b61/b/build-release/subprojects/gstrib-2.0', '--include=GObject-2.0', '--include=GModule-2.0', '--symbol-prefix=gst', '--identifier-prefix=Gst', '--pkg-export=gstreamer-1.0', '--cflags-begin', '-Db564b61/b/src/subprojects/gstreamer/.', '-IC:/Users/th/.conan2/p/b/gstre25c83bb564b61/b/build-release/subprojects/gstreamer/.', '-IC:/Users/th/.conaIC:/Users/th/.conan2/p/b/gstre25c83bb564b61/b/build-release/subprojects/gstreamer/gst/parse', '-DFFI_BUILDING', '-IC:/Users/th/.conan2/p/b/glibbff50d1e/p/include/glib-2.0', '-IC:/Users/th/.conan2/p/b/glibbff509eec0d1e/p/lib/glib-2.0/include', '-IC:/Users/th/.conan2/p/libge00124390a106b/p/includeC:/Users/th/.conan2/p/libff4914aec038b04/p/include', '-IC:/Users/th/.conan2/p/b/gobjed778ea6abd76c/p/include', '-IC:/Users/th/.conan2/p/b/gobjtisth/.conan2/p/b/glibbff509eec0d1e/p/include/gio-win32-2.0', '-IC:/Users/th/.conan2/p/zlib0e715158c1dfd/p/include', '--cflags-end', '--add-include-path=C:/Users/th/.conan2/p/b/gstre25c83bb564b61/b/build-release/subprojects/gstreamer/gst', '--library', 'gstreamer-1.0', '-LC:/Users/th/.conan2/p/b/glibb6b/p/lib', '-LC:/Users/th/.conan2/p/libic989531291d9f6/p/lib', '-LC:/Users/th/.conan2/p/libff4914aec038b04/p/lib', '-LC:/Users/th/.conan2/p/b/90a106b/p/lib', '-LC:/Users/th/.conan2/p/libic989531291d9f6/p/lib', '-LC:/Users/th/.conan2/p/libff4914aec038b04/p/lib', '--extra-library=gobject-2.0brary=ole32', '--extra-library=shell32', '--extra-library=user32', '--extra-library=advapi32', '--extra-library=gnuintl', '--extra-library=iconv', '--extra-libr', '-LC:/Users/th/.conan2/p/b/gobjed778ea6abd76c/p/lib', '-LC:/Users/th/.conan2/p/zlib0e715158c1dfd/p/lib', '--extra-library=girepository-1.0', '--ery=iphlpapi', '--extra-library=dnsapi', '--extra-library=shlwapi', '--extra-library=zlib', '--sources-top-dirs', 'C:/Users/th/.conan2/p/b/gstre25c83bb564btisth/.conan2/p/b/gstre25c83bb564b61/b/build-release/subprojects/gstreamer']
--- stdout ---

--- stderr ---
Couldn't find include 'GLib-2.0.gir' (search path: '['C:/Users/th/.conan2/p/b/gobjed778ea6abd76c/p/res/gir-1.0', 'C:\\Users\\th\\.conan2\\p\\b\\gobje\\gir-1.0', 'gir-1.0', 'C:\\Users\\th\\.conan2\\p\\b\\gobjed778ea6abd76c\\p\\res\\gir-1.0', 'C:\\Users\\th\\.conan2\\p\\b\\gobjed778ea6abd76c\\p\\r

[173/1397] Compiling C object subprojects/gst-plugins-base/gst-libs/gst/video/gstvideo-1.0-0.dll.p/meson-generated_.._video-orc.c.obj
ninja: build stopped: subcommand failed.
@costisth costisth added the bug Something isn't working label Feb 14, 2025
@valgur
Copy link
Owner

valgur commented Feb 14, 2025

I tried to reproduce it locally, but running g-ir-scanner in the gstreamer recipe failed for me due to distutils not being found.

Gst-1.0.gir is supposed to be present in the gobject-introspection package, though, but it's disabled by default due to some issues in the past. Try enabling it with -o gobject-introspection/*:build_introspection_data=True.

@costisth
Copy link
Author

with -o gobject-introspection/*:build_introspection_data=True :

gobject-introspection/1.78.1: Invalid: gobject-introspection/1.78.1 fails to run g-ir-scanner due glib loaded as shared. Use -o 'glib/*:shared=False'. Contributions to fix this are welcome.

ERROR: There are invalid packages:
gobject-introspection/1.78.1: Invalid: gobject-introspection/1.78.1 fails to run g-ir-scanner due glib loaded as shared. Use -o 'glib/*:shared=False'. Contributions to fix this are welcome.

Trying to force shared=False , fails as gobject-introspection needs shared libs...

@valgur
Copy link
Owner

valgur commented Feb 14, 2025

You probably also need -o:b *:shared=False for build-context libs/tools.

@costisth
Copy link
Author

Unclear how it could build, comments from [(https://github.com/valgur/conan-center-index/blob/540e504f118a08428b799ede7934b16198f87fca/recipes/gobject-introspection/all/conanfile.py#L68)] are explicit, build introspection support under windows still complicated
What are the steps / commands you are using ? glib must be build first without introspection support, then gobject_introspection , then glib again ?

@valgur
Copy link
Owner

valgur commented Feb 14, 2025

I dug into gobject-introspection Windows support as deep as I could, but I got stuck at g-ir-scanner always failing to load gscanner._gscanner with ImportError: DLL load failed while importing _giscanner: The specified module could not be found.. That happens even despite all necessary DLLs being successfully found.
Unfortunately, dynamic library loading on Windows is very opaque and I'm out of ideas on how to further debug this at the moment.

@valgur
Copy link
Owner

valgur commented Feb 14, 2025

You could give the Vcpkg version of gobject-introspection + gstreamer a try. I'm curious whether that works any better. There's an active PR improving gobject-introspection support open as well: microsoft/vcpkg#43722

@costisth
Copy link
Author

Thanks a lot for your feedback, I ll give vcpkg a try...

@valgur
Copy link
Owner

valgur commented Feb 17, 2025

Let me know if you have more luck with Vcpkg. It would perhaps help narrow down the issue.

@costisth
Copy link
Author

No success so far with vcpkg...
the issue seems located in resolve_windows_libs from ccontroler.py for MSVC case. It is looking for {dll.a, lib*.a, *.a, *.lib} and does not find any of this files (nor _IMPORT_DESCRIPTOR )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants