I’ve done the following:
- Installed both the runtime and development installer from here: https://gstreamer.freedesktop.org/download/#macos
- Added the following to my
.zshrc
:
export PKG_CONFIG_PATH="/Library/Frameworks/GStreamer.framework/Libraries/pkgconfig"
export PATH="/Library/Frameworks/GStreamer.framework/Versions/1.0/bin${PATH:+:$PATH}"
I first tried running the C files referring to [Installing on Mac OS X]. I couldn’t compile it with the Manual compilation
way but was able to compile it with pkg-config
.
I tried running the basic tutorials in rust with cargo run
and I’m getting the following error:
Compiling tutorial-2 v0.1.0 (/Users/foo/Rust/gstreamer/tutorial-2)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.47s
Running `target/debug/tutorial-2`
dyld[5618]: Library not loaded: @rpath/libgstreamer-1.0.0.dylib
Referenced from: <31D00DA7-B40D-36BE-892C-227790D656EE> /Users/foo/Rust/gstreamer/tutorial-2/target/debug/tutorial-2
Reason: tried: '/Users/foo/Rust/gstreamer/tutorial-2/target/debug/deps/libgstreamer-1.0.0.dylib' (no such file), '/Users/foo/Rust/gstreamer/tutorial-2/target/debug/libgstreamer-1.0.0.dylib' (no such file), '/Users/foo/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libgstreamer-1.0.0.dylib' (no such file), '/Users/foo/.rustup/toolchains/stable-aarch64-apple-darwin/lib/libgstreamer-1.0.0.dylib' (no such file), '/Users/foo/lib/libgstreamer-1.0.0.dylib' (no such file), '/usr/local/lib/libgstreamer-1.0.0.dylib' (no such file), '/usr/lib/libgstreamer-1.0.0.dylib' (no such file, not in dyld cache)
zsh: abort cargo run
Interestingly, the Library not loaded: @rpath/libgsreamer-1.0.0.dylib
error was coming even when I was trying to manually compile the C program without pkg-config
and the error for it was:
dyld[5739]: Library not loaded: @rpath/GStreamer.framework/Versions/1.0/lib/GStreamer
Referenced from: <F1DEB422-9E2C-3B90-A7DD-E4BB64301599> /Users/foo/Rust/gstreamer/main
Reason: no LC_RPATH's found
zsh: abort ./main
Could you please help me with this? Thanks!