DYLD errors Using 1.20.2 with Xcode

Nirbheek Chauhan nirbheek.chauhan at gmail.com
Sat May 28 13:42:58 UTC 2022


Hi Patrick,

You are missing the following link argument: -Wl,-rpath,<path_to_libdir>

This is handled for you automatically if you're using pkg-config, but
with XCode you need to add it by hand. See also:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2218

https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/848

If there's a way to do this automatically for frameworks too, please
let us know. As far as I know, there's no way to have XCode
automatically pick up a list of linker arguments that should be used
when linking to a framework.

Cheers,
Nirbheek

On Sat, May 28, 2022 at 10:45 AM Kolya via gstreamer-devel
<gstreamer-devel at lists.freedesktop.org> wrote:
>
>
> On May 27, 2022, at 4:24 PM, Kolya via gstreamer-devel <gstreamer-devel_at_lists_freedesktop_org_59mnm7srbr1196_2a6d20b7 at icloud.com> wrote:
>
> Team,
>
> I am using Xcode 13.1 and GStreamer 1.20.2. I am getting the following error when trying to run sample code. Any explanation as to what I am doing wrong?
>
> dyld[49496]: Library not loaded: /Users/matt/Projects/cerbero-1.20/build/dist/darwin_universal/x86_64/lib/GStreamer
>   Referenced from: /Users/patrickcusack/Library/Developer/Xcode/DerivedData/soketreader-
>
>
> I ran tool -L on gst-launch-1.0 and see that it returns the following:
>
> otool -L /Library/Frameworks/GStreamer.framework/Versions/1.0/bin/gst-launch-1.0
>
> @rpath/lib/libgstreamer-1.0.0.dylib (compatibility version 2003.0.0, current version 2003.0.0)
> @rpath/lib/libglib-2.0.0.dylib (compatibility version 6201.0.0, current version 6201.6.0)
> @rpath/lib/libgobject-2.0.0.dylib (compatibility version 6201.0.0, current version 6201.6.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
>
>
> What does “/Users/matt/Projects/cerbero-1.20/build/dist/darwin_universal/x86_64/lib/GStreamer” do exactly?
>
> I ran tool against GStreamer and this only exposes one symbol: dyld_stub_binder
>
> otool -L /Library/Frameworks/GStreamer.framework/Versions/Current/GStreamer
> /Library/Frameworks/GStreamer.framework/Versions/Current/GStreamer:
> /Users/matt/Projects/cerbero-1.20/build/dist/darwin_universal/x86_64/lib/GStreamer (compatibility version 0.0.0, current version 0.0.0)
> @rpath/lib/libgsttag-1.0.0.dylib (compatibility version 2003.0.0, current version 2003.0.0, reexport)
> @rpath/lib/libgstnet-1.0.0.dylib (compatibility version 2003.0.0, current version 2003.0.0, reexport)
> ~~~~~~~MUCH MUCH MORE~~~~~~~~~~~~~~~~~~~
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
>
> Does this issue belong on Gitlab?
>
> I’ll probably build this using Cerebro as it was simple on Linux, but I would like to know as you have gone to the trouble of supporting a macOS Framework.
>
> Patrick


More information about the gstreamer-devel mailing list