Ubuntu static linking fails /usr/bin/ld: cannot find file
Hi, I'm using gstreamer-rs
to build a statically linked APP. The first thing I did was to download the gstreamer
source code and execute meson --default-library=static -Dgst-full-libraries=app,audio,video,pbutils -Dges=enabled -Dtools=enabled -Dbad=enabled builddir
, it builds successfully.
Then I run a simple example in gstreamer-rs
, before I configure two environment variables, namely export PKG_CONFIG_PATH="~/Desktop/Favorites/gstreamer/builddir/meson-private"
, and export SYSTEM_DEPS_LINK=static
.
In the end I got the error:
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-m64" "/tmp/rustcde7dOT/symbols.o".......
= note: /usr/bin/ld: cannot find -lges-1.0
/usr/bin/ld: cannot find -lxml2
/usr/bin/ld: cannot find -lgstvalidate-1.0
/usr/bin/ld: cannot find -lgstcontroller-1.0
/usr/bin/ld: cannot find -lgstpbutils-1.0
/usr/bin/ld: cannot find -lgstvideo-1.0
/usr/bin/ld: cannot find -lgstaudio-1.0
/usr/bin/ld: cannot find -lgsttag-1.0
/usr/bin/ld: cannot find -lgstbase-1.0
/usr/bin/ld: cannot find -lgstcheck-1.0
/usr/bin/ld: cannot find -lgstreamer-1.0
collect2: error: ld returned 1 exit status
Am I missing something?