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

pkgconfig: fix use of uninstalled libraries #12769

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ylatuya
Copy link

@ylatuya ylatuya commented Jan 24, 2024

I suspect https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3247 might be caused by this issue in meson.

We should prepend the path of uninstalled libraries to PKG_CONFIG_PATH so they have preference over other search paths set by the user.

Support for using uninstalled libraries was added by @xavierclaessens in #10275.

@xclaesse
Copy link
Member

error: "list[str]" has no attribute "prepend"; maybe "append"?

Never understood why python is missing that... You want extra_paths.insert(0, uninstalled_path).

@xclaesse
Copy link
Member

LGTM if CI pass this time :)

@ylatuya
Copy link
Author

ylatuya commented Jan 24, 2024

If for ex

error: "list[str]" has no attribute "prepend"; maybe "append"?

Never understood why python is missing that... You want extra_paths.insert(0, uninstalled_path).

Yeah :) I keep making the same mistake over and over every time I come back to Python :)

@soumyaDghosh
Copy link

@ylatuya I tried build the meson from your repo and try it, but still it's appeneded at the end.

PKG_CONFIG_PATH=/snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/pkgconfig:/snap/gnome-42-2204-sdk/current/usr/lib/pkgconfig:/snap/gnome-42-2204-sdk/current/usr/share/pkgconfig:/root/stage/usr/lib/x86_64-linux-gnu/pkgconfig:/root/parts/gstreamer/build/meson-uninstalled CC=cc /snap/gnome-42-2204-sdk/current/usr/bin/g-ir-scanner --quiet --no-libtool --namespace=GstVideo --nsversion=1.0 --warn-all --output subprojects/gst-plugins-base/gst-libs/gst/video/GstVideo-1.0.gir '--add-init-section=extern void gst_init(gint*,gchar**);g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);g_setenv("GST_REGISTRY_1.0", "/root/parts/gstreamer/build/subprojects/gst-plugins-base/gir_empty_registry.reg", 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/video/video.h -I/root/parts/gstreamer/src/subprojects/gst-plugins-base/gst-libs/gst/video -I/root/parts/gstreamer/build/subprojects/gst-plugins-base/gst-libs/gst/video -I/root/parts/gstreamer/src/subprojects/gst-plugins-base/. -I/root/parts/gstreamer/build/subprojects/gst-plugins-base/. -I/root/parts/gstreamer/src/subprojects/gst-plugins-base/gst-libs -I/root/parts/gstreamer/build/subprojects/gst-plugins-base/gst-libs -I/root/parts/gstreamer/src/subprojects/gstreamer/libs -I/root/parts/gstreamer/build/subprojects/gstreamer/libs -I/root/parts/gstreamer/src/subprojects/gstreamer/. -I/root/parts/gstreamer/build/subprojects/gstreamer/. --filelist=/root/parts/gstreamer/build/subprojects/gst-plugins-base/gst-libs/gst/video/libgstvideo-1.0.so.0.2208.0.p/GstVideo_1.0_gir_filelist --include=Gst-1.0 --include=GstBase-1.0 --symbol-prefix=gst --identifier-prefix=Gst --pkg-export=gstreamer-video-1.0 --cflags-begin -DG_DISABLE_CAST_CHECKS -I/root/parts/gstreamer/src/subprojects/gst-plugins-base/. -I/root/parts/gstreamer/build/subprojects/gst-plugins-base/. -I/root/parts/gstreamer/src/subprojects/gst-plugins-base/gst-libs -I/root/parts/gstreamer/build/subprojects/gst-plugins-base/gst-libs -I/root/parts/gstreamer/src/subprojects/gstreamer/libs -I/root/parts/gstreamer/build/subprojects/gstreamer/libs -I/root/parts/gstreamer/src/subprojects/gstreamer/. -I/root/parts/gstreamer/build/subprojects/gstreamer/. -I/root/parts/gstreamer/src/subprojects/gstreamer/gst/parse -I/root/parts/gstreamer/build/subprojects/gstreamer/gst/parse -I/snap/gnome-42-2204-sdk/current/usr/include/glib-2.0 -I/snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/snap/gnome-42-2204-sdk/current/usr/include -I/usr/include/orc-0.4 -I/snap/gnome-42-2204-sdk/current/usr/include/gobject-introspection-1.0 --cflags-end --add-include-path=/root/parts/gstreamer/build/subprojects/gstreamer/gst --add-include-path=/root/parts/gstreamer/build/subprojects/gstreamer/libs/gst/base --add-include-path=/snap/gnome-42-2204-sdk/current/usr/share/gir-1.0 -L/root/parts/gstreamer/build/subprojects/gstreamer/libs/gst/base -L/root/parts/gstreamer/build/subprojects/gstreamer/gst -L/snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu --extra-library=gstbase-1.0 --extra-library=gstreamer-1.0 -L/root/parts/gstreamer/build/subprojects/gst-plugins-base/gst-libs/gst/video --library gstvideo-1.0 -L/root/parts/gstreamer/build/subprojects/gstreamer/libs/gst/base -L/root/parts/gstreamer/build/subprojects/gstreamer/gst -L/snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu -L/root/stage/usr/lib -L/root/stage/usr/lib/x86_64-linux-gnu -L/snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu --extra-library=glib-2.0 --extra-library=gobject-2.0 --extra-library=gmodule-2.0 --extra-library=m --extra-library=orc-0.4 --extra-library=dl --extra-library=girepository-1.0 --sources-top-dirs /root/parts/gstreamer/src/subprojects/gst-plugins-base --sources-top-dirs /root/parts/gstreamer/build/subprojects/gst-plugins-base                                                                                                      
2024-01-24 23:24:10.691 :: /root/parts/gstreamer/build/tmp-introspectf91wko28/GstVideo-1.0: symbol lookup error: /root/parts/gstreamer/build/tmp-introspectf91wko28/GstVideo-1.0: undefined symbol: gst_navigation_modifier_type_get_type                                                                                                                
2024-01-24 23:24:10.691 :: Command '['/root/parts/gstreamer/build/tmp-introspectf91wko28/GstVideo-1.0', '--introspect-dump=/root/parts/gstreamer/build/tmp-introspectf91wko28/functions.txt,/root/parts/gstreamer/build/tmp-introspectf91wko28/dump.xml']' returned non-zero exit status 127.

@xclaesse
Copy link
Member

@soumyaDghosh how are those /snap/... paths set? Could it be from .bashrc somehow?

@soumyaDghosh
Copy link

soumyaDghosh commented Jan 24, 2024

@soumyaDghosh how are those /snap/... paths set? Could it be from .bashrc somehow?

I am trying to find it out. I am still searching, but they are probably not from .bashrc.

@soumyaDghosh
Copy link

soumyaDghosh commented Jan 24, 2024

@xclaesse Can't find from where those paths are coming, not from the .bashrc that's for sure, can you guess from where these may come? I mean in general, from where do they come?

@xclaesse
Copy link
Member

I guess that's Ubuntu's gnome-sdk: https://github.com/ubuntu/gnome-sdk. CC @kenvandine who seems to be dev of that.

@ylatuya
Copy link
Author

ylatuya commented Jan 24, 2024

@ylatuya I tried build the meson from your repo and try it, but still it's appeneded at the end.

I think I probably only fixed one part of the issue. We need to fix it as well in the the generated command in build.ninja that calls g-ir-scanner using env PKG_CONFIG_PATH.

It's either this or the build files were not re-generated correctly. Can you confirm this @soumyaDghosh

@soumyaDghosh
Copy link

soumyaDghosh commented Jan 25, 2024

@ylatuya I tried multiple times both in github CI and local machine, and in my local machine I found no instance in the build.ninja file an env PKG_CONFIG_PATH=/root/parts/gstreamer/build/meson-uninstalled.....

log

snapcraft-clapper-on-amd64-for-amd64-11449460 ../parts/gstreamer/build# cat build.ninja | grep 'env PKG_CONFIG_PATH=/root/parts'

I specifically build here with the new meson installed manually. And it still gave the same

EDIT: I manually added that path to PKG_CONFIG_PATH and regenerated build.ninja, still the files were linking to the preinstalled libraries

snapcraft-clapper-on-amd64-for-amd64-11449460 ../parts/gstreamer/build# ls
GstDocumentedSubprojects  ci			 g-ir-cpp-6pnehsei.i  meson-info     meson-uninstalled	tests
GstPluginsPath.json	  compile_commands.json  g-ir-cpp-70fflkj7.c  meson-logs     scripts		tmp-introspect_hxwb9yp
build.ninja		  g-ir-cpp-6pnehsei.c	 g-ir-cpp-70fflkj7.i  meson-private  subprojects	tmp-introspectaua6km5r
snapcraft-clapper-on-amd64-for-amd64-11449460 ../parts/gstreamer/build# cd /root/parts/gstreamer/build/tmp-introspectaua6km5r/
build environment set for part 'parts'
snapcraft-clapper-on-amd64-for-amd64-11449460 ../parts/gstreamer/build/tmp-introspectaua6km5r# ldd GstVideo-1.0
	linux-vdso.so.1 (0x00007ffcd5999000)
	libgstvideo-1.0.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0 (0x00007fde2f29f000)
	libgstbase-1.0.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0 (0x00007fde2f21a000)
	libgstreamer-1.0.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007fde2f0c7000)
	libglib-2.0.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fde2ef6b000)
	libgobject-2.0.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fde2ef01000)
	libgmodule-2.0.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fde2eefa000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fde2ee0d000)
	liborc-0.4.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007fde2ed88000)
	libgirepository-1.0.so.1 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libgirepository-1.0.so.1 (0x00007fde2ed4a000)
	libgio-2.0.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fde2ea00000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fde2e600000)
	libunwind.so.8 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libunwind.so.8 (0x00007fde2ed2f000)
	libdw.so.1 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1 (0x00007fde2ec83000)
	libpcre2-8.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fde2e969000)
	libffi.so.7 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libffi.so.7 (0x00007fde2ec74000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fde2f370000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fde2ec58000)
	libmount.so.1 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libmount.so.1 (0x00007fde2ec14000)
	libselinux.so.1 => /snap/gnome-42-2204-sdk/current/lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fde2e93d000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fde2e912000)
	libelf.so.1 => /lib/x86_64-linux-gnu/libelf.so.1 (0x00007fde2e8f4000)
	libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007fde2e8e1000)
	libblkid.so.1 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fde2e8aa000)

@eli-schwartz
Copy link
Member

Well, to be sure you'd really need to check the pickled command lines used by meson --internal exe as well.

@soumyaDghosh
Copy link

Well, to be sure you'd really need to check the pickled command lines used by meson --internal exe as well.

Can you give me some insight on how can I do so?

Also, I manually added all the paths possible to LD_LIBRARY_PATH and the linking also seemed to be correct,

snapcraft-clapper-on-amd64-for-amd64-11449460 ../parts/gstreamer/build/tmp-introspectrqgnm0lm# ldd GstVideo-1.0
	linux-vdso.so.1 (0x00007ffcf2feb000)
	libgstvideo-1.0.so.0 => /root/parts/gstreamer/build/subprojects/gst-plugins-base/gst-libs/gst/video/libgstvideo-1.0.so.0 (0x00007fc48f875000)
	libgstbase-1.0.so.0 => /root/parts/gstreamer/build/subprojects/gstreamer/libs/gst/base/libgstbase-1.0.so.0 (0x00007fc48f7eb000)
	libgstreamer-1.0.so.0 => /root/parts/gstreamer/build/subprojects/gstreamer/gst/libgstreamer-1.0.so.0 (0x00007fc48f688000)
	libglib-2.0.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fc48f52c000)
	libgobject-2.0.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fc48f4c2000)
	libgmodule-2.0.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fc48f4b9000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc48f3cc000)
	liborc-0.4.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007fc48f347000)
	libgirepository-1.0.so.1 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libgirepository-1.0.so.1 (0x00007fc48f30b000)
	libgio-2.0.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fc48f000000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc48ec00000)
	libpcre2-8.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fc48f272000)
	libffi.so.7 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libffi.so.7 (0x00007fc48f265000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fc48f99b000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fc48f249000)
	libmount.so.1 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libmount.so.1 (0x00007fc48efbc000)
	libselinux.so.1 => /snap/gnome-42-2204-sdk/current/lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fc48f21d000)
	libblkid.so.1 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fc48ef85000)

But, I still got this error

FAILED: subprojects/gst-plugins-base/gst-libs/gst/video/GstVideo-1.0.gir                                                                         
2024-01-25 11:23:19.538 :: env PKG_CONFIG_PATH=/root/parts/gstreamer/build/meson-uninstalled:/snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/pkgconfig:/snap/gnome-42-2204-sdk/current/usr/lib/pkgconfig:/snap/gnome-42-2204-sdk/current/usr/share/pkgconfig:/root/stage/usr/lib/x86_64-linux-gnu/pkgconfig CC=cc /snap/gnome-42-2204-sdk/current/usr/bin/g-ir-scanner --quiet --no-libtool --namespace=GstVideo --nsversion=1.0 --warn-all --output subprojects/gst-plugins-base/gst-libs/gst/video/GstVideo-1.0.gir '--add-init-section=extern void gst_init(gint*,gchar**);g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);g_setenv("GST_REGISTRY_1.0", "/root/parts/gstreamer/build/subprojects/gst-plugins-base/gir_empty_registry.reg", 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/video/video.h -I/root/parts/gstreamer/src/subprojects/gst-plugins-base/gst-libs/gst/video -I/root/parts/gstreamer/build/subprojects/gst-plugins-base/gst-libs/gst/video -I/root/parts/gstreamer/src/subprojects/gst-plugins-base/. -I/root/parts/gstreamer/build/subprojects/gst-plugins-base/. -I/root/parts/gstreamer/src/subprojects/gst-plugins-base/gst-libs -I/root/parts/gstreamer/build/subprojects/gst-plugins-base/gst-libs -I/root/parts/gstreamer/src/subprojects/gstreamer/libs -I/root/parts/gstreamer/build/subprojects/gstreamer/libs -I/root/parts/gstreamer/src/subprojects/gstreamer/. -I/root/parts/gstreamer/build/subprojects/gstreamer/. --filelist=/root/parts/gstreamer/build/subprojects/gst-plugins-base/gst-libs/gst/video/libgstvideo-1.0.so.0.2208.0.p/GstVideo_1.0_gir_filelist --include=Gst-1.0 --include=GstBase-1.0 --symbol-prefix=gst --identifier-prefix=Gst --pkg-export=gstreamer-video-1.0 --cflags-begin -DG_DISABLE_CAST_CHECKS -I/root/parts/gstreamer/src/subprojects/gst-plugins-base/. -I/root/parts/gstreamer/build/subprojects/gst-plugins-base/. -I/root/parts/gstreamer/src/subprojects/gst-plugins-base/gst-libs -I/root/parts/gstreamer/build/subprojects/gst-plugins-base/gst-libs -I/root/parts/gstreamer/src/subprojects/gstreamer/libs -I/root/parts/gstreamer/build/subprojects/gstreamer/libs -I/root/parts/gstreamer/src/subprojects/gstreamer/. -I/root/parts/gstreamer/build/subprojects/gstreamer/. -I/root/parts/gstreamer/src/subprojects/gstreamer/gst/parse -I/root/parts/gstreamer/build/subprojects/gstreamer/gst/parse -I/snap/gnome-42-2204-sdk/current/usr/include/glib-2.0 -I/snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/snap/gnome-42-2204-sdk/current/usr/include -I/usr/include/orc-0.4 -I/snap/gnome-42-2204-sdk/current/usr/include/gobject-introspection-1.0 --cflags-end --add-include-path=/root/parts/gstreamer/build/subprojects/gstreamer/gst --add-include-path=/root/parts/gstreamer/build/subprojects/gstreamer/libs/gst/base --add-include-path=/snap/gnome-42-2204-sdk/current/usr/share/gir-1.0 -L/root/parts/gstreamer/build/subprojects/gstreamer/libs/gst/base -L/root/parts/gstreamer/build/subprojects/gstreamer/gst -L/snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu --extra-library=gstbase-1.0 --extra-library=gstreamer-1.0 -L/root/parts/gstreamer/build/subprojects/gst-plugins-base/gst-libs/gst/video --library gstvideo-1.0 -L/root/parts/gstreamer/build/subprojects/gstreamer/libs/gst/base -L/root/parts/gstreamer/build/subprojects/gstreamer/gst -L/snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu -L/root/stage/usr/lib -L/root/stage/usr/lib/x86_64-linux-gnu -L/snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu --extra-library=glib-2.0 --extra-library=gobject-2.0 --extra-library=gmodule-2.0 --extra-library=m --extra-library=orc-0.4 --extra-library=dl --extra-library=girepository-1.0 --sources-top-dirs /root/parts/gstreamer/src/subprojects/gst-plugins-base --sources-top-dirs /root/parts/gstreamer/build/subprojects/gst-plugins-base                                                                                                      
2024-01-25 11:23:19.539 :: /root/parts/gstreamer/build/tmp-introspectrqgnm0lm/GstVideo-1.0: symbol lookup error: /root/parts/gstreamer/build/tmp-introspectrqgnm0lm/GstVideo-1.0: undefined symbol: gst_navigation_modifier_type_get_type                                                                                                                
2024-01-25 11:23:19.539 :: Command '['/root/parts/gstreamer/build/tmp-introspectrqgnm0lm/GstVideo-1.0', '--introspect-dump=/root/parts/gstreamer/build/tmp-introspectrqgnm0lm/functions.txt,/root/parts/gstreamer/build/tmp-introspectrqgnm0lm/dump.xml']' returned non-zero exit status 127.

Prepend the path of uninstalled libraries to PKG_CONFIG_PATH
so they have preference over other search paths set by the
user.

see: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3247
@ylatuya
Copy link
Author

ylatuya commented Jan 25, 2024

I have added a couple of unit tests to verify how PKG_CONFIG_PATH dirs are added.

@soumyaDghosh
Copy link

I have added a couple of unit tests to verify how PKG_CONFIG_PATH dirs are added.

I think the issue is probably with gstreamer also, because even though the linking of the file was properly, it showed the same error!

@ylatuya
Copy link
Author

ylatuya commented Jan 25, 2024

Let's try to go step by step.

The way g-ir-scanner works is performing the following steps:

  1. Create a temporary directory: /root/parts/gstreamer/build/tmp-introspectrqgnm0lm/
  2. Create a new program to dump the introspeciton data: /root/parts/gstreamer/build/tmp-introspectrqgnm0lm/GstVideo-1.0.c
  3. Compile and link that program: /root/parts/gstreamer/build/tmp-introspectrqgnm0lm/GstVideo-1.0
  4. Run that program to dump the introspection data.

In the first logs you have shared, we can see that the error is in step 4. When g-ir-scanner runs the GstVideo-1.0 program, it fails to find the symbol gst_navigation_modifier_type_get_type. The first assumption is this problem is caused because the GstVideo-1.0 binary is linking against a different libgstvideo-1.0 that the one being built.

libgstvideo-1.0.so.0 => /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0 (0x00007fc4a4f5f000)

This is the first thing that needs to be fixed and my original guess is that an incorrect order of search directories in PKG_CONFIG_PATH would cause it.

In this comment you have shared a new output of ldd of GstVideo-1.0 where this is now fixed:

libgstvideo-1.0.so.0 => /root/parts/gstreamer/build/subprojects/gst-plugins-base/gst-libs/gst/video/libgstvideo-1.0.so.0 (0x00007fc48f875000)

Does the patch in this PR fix this problem?

@soumyaDghosh
Copy link

soumyaDghosh commented Jan 25, 2024

Does the patch in this PR fix this problem?

Actually it doesn't. I manually added the meson-uninstalled folder to the PKG_CONFIG_PATH. If I don't change the PKG_CONFIG_PATH by my own, it adds it at the end. You can find it in this CI.

EDIT: Also, this is linked with correct libraries, I still get the symbol not found error.

@ylatuya
Copy link
Author

ylatuya commented Jan 26, 2024

Thanks for your feedback. I originally thought it would be a linker issue caused by the incorrect order in PKG_CONFIG_PATH, which is what this PR is fixing but your issue seems a runtime linker issue, not loading the uninstalled libraries as described here: #1181.

@xclaesse I think this fix should still be merged, though.

@soumyaDghosh
Copy link

I think this fix should still be merged, though.

This PR didn't fix the not adding the PKG_CONFIG_PATH issue, it is still there. I'm sorry, if there was any misinterpretation from my previous comment. The CI link that I shared with you, will show you that it hasn't been fixed yet. Even with this PR.

@ylatuya
Copy link
Author

ylatuya commented Jan 26, 2024

I think this fix should still be merged, though.

This PR didn't fix the not adding the PKG_CONFIG_PATH issue, it is still there. I'm sorry, if there was any misinterpretation from my previous comment. The CI link that I shared with you, will show you that it hasn't been fixed yet. Even with this PR.

You are probably not using meson with this patch. There are 2 unit tests that validate the fix. This can be validated manually like:

python meson.py setup builddir "test cases/frameworks/22 gir link order" --pkg-config-path /this/path/should/go/last

build.ninja now has:

COMMAND = env PKG_CONFIG_PATH=/Users/andoni/git/meson/builddir/meson-uninstalled:/this/path/should/go/last

@soumyaDghosh
Copy link

I think this fix should still be merged, though.

This PR didn't fix the not adding the PKG_CONFIG_PATH issue, it is still there. I'm sorry, if there was any misinterpretation from my previous comment. The CI link that I shared with you, will show you that it hasn't been fixed yet. Even with this PR.

You are probably not using meson with this patch. There are 2 unit tests that validate the fix. This can be validated manually like:

python meson.py setup builddir "test cases/frameworks/22 gir link order" --pkg-config-path /this/path/should/go/last

build.ninja now has:

COMMAND = env PKG_CONFIG_PATH=/Users/andoni/git/meson/builddir/meson-uninstalled:/this/path/should/go/last

Okay. let's merge this, and I'll try to give a PR to the gnome-sdk to update this in the SDK. But, is there any chance of a new release anytime soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants