Build gst-python 1.18 - linking failed - cannot open libpython shared object file?

Joe Bacon joejbacon at gmail.com
Thu Jun 2 10:45:20 UTC 2022


Hi
Please could someone help me... I believe this is a simple problem of a
missing path environment variable but i'm at a loss...
My environment variables seem correct from everything I've read. The meson
output looks good too - appearing to find all the python dependencies
correctly.
I am using a 'built from source' Python 3.10 and subsequent virtual
environment (called 'sg') - this all appears to be working correctly (have
been using with opencv)
I am working on an nVidia Jetson Xavier NX, Ubuntu 18.04. (system python is
3.6, system gstreamer is 1.14)
I generally build my main dependencies from source and install to /opt/ to
keep everything self contained and away from system versions.

*Environment variables:*
export
PATH=/opt/python/3.10/bin:/opt/opencv/bin:/opt/srt/bin:/opt/gstreamer/1.18/bin:$PATH
export
LD_LIBRARY_PATH=/opt/opencv/lib:/opt/srt/lib:/opt/gstreamer/1.18/lib/aarch64-linux-gnu:/opt/python/3.10/lib
export
LIBRARY_PATH=/opt/opencv/lib:/opt/srt/lib:/opt/gstreamer/1.18/lib/aarch64-linux-gnu:/opt/python/3.10/lib
export CPPFLAGS='-I/opt/opencv/include -I/opt/srt/include
-I/opt/gstreamer/1.18/include -I/home/sg/dev/environments/sg/include
-I/opt/python/3.10/include'
export
PKG_CONFIG_PATH=/opt/opencv/lib/pkgconfig:/opt/srt/lib/pkgconfig:/opt/gstreamer/1.18/lib/aarch64-linux-gnu/pkgconfig:/opt/python/3.10/lib/pkgconfig
export PYTHONPATH=~/dev/environments/sg/lib/python3.10/site-packages
export
GI_TYPELIB_PATH=/opt/gstreamer/1.18/lib/aarch64-linux-gnu/girepository-1.0
export
GST_PLUGIN_PATH=/opt/gstreamer/1.18/lib/aarch64-linux-gnu/gstreamer-1.0


*CLI output:*
(sg) sg at sg-cortex:~/dev/gstreamer/gst-python$ meson build/ -D
buildtype=release -D prefix=/opt/gstreamer/1.18/
The Meson build system
Version: 0.62.1
Source dir: /home/sg/dev/gstreamer/gst-python
Build dir: /home/sg/dev/gstreamer/gst-python/build
Build type: native build
Project name: gst-python
Project version: 1.18.6.1
C compiler for the host machine: cc (gcc 7.5.0 "cc (Ubuntu/Linaro
7.5.0-3ubuntu1~18.04) 7.5.0")
C linker for the host machine: cc ld.bfd 2.30
C++ compiler for the host machine: c++ (gcc 7.5.0 "c++ (Ubuntu/Linaro
7.5.0-3ubuntu1~18.04) 7.5.0")
C++ linker for the host machine: c++ ld.bfd 2.30
Host machine cpu family: aarch64
Host machine cpu: aarch64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency gstreamer-1.0 found: YES 1.18.6.1
Run-time dependency gstreamer-base-1.0 found: YES 1.18.6.1
Run-time dependency gmodule-2.0 found: YES 2.56.4
Run-time dependency pygobject-3.0 found: YES 3.26.1
Program python3 found: YES (/home/sg/dev/environments/sg/bin/python3)
Run-time dependency python-3.10-embed found: YES 3.10
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300
Message: pylib_loc = /opt/python/3.10/lib
Message: python_abi_flags =
Message: pylib_loc = /opt/python/3.10/lib
Message: pygobject overrides directory =
/opt/gstreamer/1.18/lib/python3.10/site-packages/gi/overrides
Configuring config.h using configuration
Program pkg-config found: YES (/usr/bin/pkg-config)
Run-time dependency gstreamer-plugins-base-1.0 found: YES 1.18.6.1
Build targets in project: 2
NOTICE: Future-deprecated features used:
 * 0.56.0: {'meson.build_root', 'dependency.get_pkgconfig_variable'}

gst-python 1.18.6.1

  User defined options
    buildtype: release
    prefix   : /opt/gstreamer/1.18/

Found ninja-1.8.2 at /usr/bin/ninja
(sg) sg at sg-cortex:~/dev/gstreamer/gst-python$ sudo ninja -C build/ install
[sudo] password for sg:
ninja: Entering directory `build/'
[4/5] Installing files.
/home/sg/dev/environments/sg/bin/python3: error while loading shared
libraries: libpython3.10.so.1.0: cannot open shared object file: No such
file or directory
FAILED: meson-install
/home/sg/dev/environments/sg/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220602/77ebc3e4/attachment.htm>


More information about the gstreamer-devel mailing list