Build gst-python fails to find pygobject-3.0
Describe your issue
I'm trying to compile gst-python but it isn't finding the pygobject-3.0 when installed in a Conda environment. I installed these libraries in the environment:
name: base
channels:
- defaults
- pytorch
- conda-forge
dependencies:
- python==3.10
- pycairo
- pygobject
- meson
- ninja
- cmake
- pytorch
- opencv
- matplotlib
- ipykernel
- pip
and also these ones through apt-get install g++ build-essential libglib2.0-dev libglib2.0-dev-bin libgstreamer1.0-dev libtool m4 autoconf automake libgirepository1.0-dev libcairo2-dev
Once installed and activated, running meson build
can't find pygobject:
The Meson build system
Version: 1.2.1
Source dir: /opt/nvidia/deepstream/deepstream-6.4/sources/deepstream_python_apps/3rdparty/gstreamer/subprojects/gst-python
Build dir: /opt/nvidia/deepstream/deepstream-6.4/sources/deepstream_python_apps/3rdparty/gstreamer/subprojects/gst-python/build
Build type: native build
Project name: gst-python
Project version: 1.20.3
C compiler for the host machine: cc (gcc 11.3.0 "cc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0")
C linker for the host machine: cc ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency gstreamer-1.0 found: YES 1.20.3
Run-time dependency gstreamer-base-1.0 found: YES 1.20.3
Run-time dependency gmodule-2.0 found: YES 2.72.4
Found CMake: /root/.local/bin/cmake (3.19.6)
Run-time dependency pygobject-3.0 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency pygobject-3.0
meson.build:23:16: ERROR: Neither a subproject directory nor a pygobject.wrap file was found.
A full log can be found at /opt/nvidia/deepstream/deepstream-6.4/sources/deepstream_python_apps/3rdparty/gstreamer/subprojects/gst-python/build/meson-logs/meson-log.txt
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
Is there a way to manually set the pygobject path? Which one should it be?
/opt/conda/lib/pkgconfig/pygobject-3.0.pc
/opt/conda/pkgs/pygobject-3.46.0-py310h30b043a_1
/opt/conda/pkgs/pygobject-3.46.0-py310h30b043a_1/include/pygobject-3.0
/opt/conda/pkgs/pygobject-3.46.0-py310h30b043a_1/include/pygobject-3.0/pygobject.h
/opt/conda/pkgs/pygobject-3.46.0-py310h30b043a_1/lib/pkgconfig/pygobject-3.0.pc
Expected Behavior
Meson finds PyGObject
Setup
- Operating System: 5.15.133.1-microsoft-standard-WSL2
- Device: Virtual Machine
- GStreamer Version: 1.22.9
-
Command line:
meson build