我在ubuntu 18上使用g-streamer和pkg-config。我正在交叉编译aarch 64,遇到了以下错误。
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so when searching for **-lgstreamer-1.0**
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: cannot find -**lgstreamer-1.0**
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libgobject-2.0.so when searching for **-lgobject-2.0**
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libgobject-2.0.a when searching for **-lgobject-2.0**
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: cannot find -lgobject-2.0
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libglib-2.0.so when searching for **-lglib-2.0**
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libglib-2.0.a when searching for **-lglib-2.0**
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: cannot find -lglib-2.0
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libm.so when searching for **-lm**
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libm.a when searching for **-lm**
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.so when searching for **-lc**
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.a when searching for **-lc**
我也安装了pkg-config-aarch 64,并遵循了这个thread,但我仍然无法解决这个错误。以下是我的GST版本:GStreamer Core Library版本1.14.5
此外,我已经检查了.pc
文件,它们在aarch 64目录中不可用。我想我必须为aarch 64安装gst,但我不知道如何在Ubuntu上安装。这个问题只发生在我交叉编译pkg-config的时候。
我也安装了pkg-config-aarch 64并遵循此thread,但我仍然无法解决错误。
CMake文件块
find_package(PkgConfig REQUIRED)
pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0)
# Include directories
include_directories(
${GLIB_INCLUDE_DIRS}
${GSTREAMER_INCLUDE_DIRS}
)
#linking GStreamer library directory
link_directories(
${GLIB_LIBRARY_DIRS}
${GSTREAMER_LIBRARY_DIRS}
)
add_executable(yo_gst tutorial_2.cpp)
target_include_directories(yo_gst PUBLIC ${GSTREAMER_INCLUDE_DIRS})
target_link_libraries(yo_gst PUBLIC ${GSTREAMER_LIBRARIES})
用于交叉编译的.sh文件块
export PKG_CONFIG_ALLOW_CROSS=1
export PKG_CONFIG_PATH=/usr/bin/pkg-config:$PKG_CONFIG_PATH
Pkg-config
pkg-config --list-all |grep gstreamer
gstreamer-video-1.0 GStreamer Video Library - Video base classes and helper functions
gstreamer-riff-1.0 GStreamer RIFF Library - RIFF helper functions
gstreamer-1.0 GStreamer - Streaming media framework
gstreamer-net-1.0 GStreamer networking library - Network-enabled GStreamer plug-ins and clocking
gstreamer-pbutils-1.0 GStreamer Base Utils Library - General utility functions
gstreamer-app-1.0 GStreamer Application Library - Helper functions and base classes for application integration
gstreamer-audio-1.0 GStreamer Audio library - Audio helper functions and base classes
gstreamer-tag-1.0 GStreamer Tag Library - Tag base classes and helper functions
gstreamer-plugins-base-1.0 GStreamer Base Plugins Libraries - Streaming media framework, base plugins libraries
gstreamer-allocators-1.0 GStreamer Allocators Library - Allocators implementation
gstreamer-rtsp-1.0 GStreamer RTSP Library - RTSP base classes and helper functions
gstreamer-check-1.0 GStreamer check unit testing - Unit testing helper library for GStreamer modules
gstreamer-base-1.0 GStreamer base classes - Base classes for GStreamer elements
gstreamer-fft-1.0 GStreamer FFT Library - FFT implementation
gstreamer-sdp-1.0 GStreamer SDP Library - SDP helper functions
gstreamer-rtp-1.0 GStreamer RTP Library - RTP base classes and helper functions
gstreamer-controller-1.0 GStreamer controller - Dynamic parameter control for GStreamer elements
gstreamer-gl-1.0 GStreamer OpenGL Plugins Libraries - Streaming media framework, OpenGL plugins libraries
1条答案
按热度按时间igsr9ssn1#
通过链接添加arm64架构。
1.安装以下软件包。
sudo apt-get install libgstreamer1.0-dev:arm64 libgstreamer-plugins-base1.0-dev:arm64 libgstreamer-plugins-bad1.0-dev:arm64 gstreamer1.0-plugins-base:arm64 gstreamer1.0-plugins-good:arm64 gstreamer1.0-plugins-bad:arm64 gstreamer1.0-plugins-ugly:arm64 gstreamer1.0-libav:arm64 gstreamer1.0-tools:arm64 gstreamer1.0-x:arm64 gstreamer1.0-alsa:arm64 gstreamer1.0-gl:arm64 gstreamer1.0-gtk3:arm64 gstreamer1.0-qt5:arm64 gstreamer1.0-pulseaudio:arm64