[英]GStreamer linking error
I'm trying to build the source code of https://github.com/iiordanov/remote-desktop-clients/tree/master/eclipse_projects/Opaque .我正在尝试构建https://github.com/iiordanov/remote-desktop-clients/tree/master/eclipse_projects/Opaque的源代码。
Now there's an error while building the gstreamer library:现在在构建 gstreamer 库时出现错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
Error while executing 'D:\Entwicklung\Android\ndk-bundle\ndk-build.cmd' with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\Entwicklung\Android-Projekte\app\Spice-Client\app\jni\src\Android.mk APP_ABI=mips64 NDK_ALL_ABIS=mips64 NDEBUG=1 APP_PLATFORM=android-21 NDK_OUT=D:/Entwicklung/Android-Projekte/app/Spice-Client/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=D:\Entwicklung\Android-Projekte\app\Spice-Client\app\build\intermediates\ndkBuild\debug\lib gst-build-mips64/libgstreamer_android.so}
Android NDK: WARNING:D:\Entwicklung\Android-Projekte\app\Spice-Client\app\jni\src\Android.mk:spice: non-system libraries in linker flags: D:/Entwicklung/Android-Projekte/app/Spice-Client/app/jni/src/../libs/deps/lib/libssl.a D:/Entwicklung/Android-Projekte/app/Spice-Client/app/jni/src/../libs/deps/lib/libcrypto.a D:/Entwicklung/Android-Projekte/app/Spice-Client/app/jni/src/../libs/deps/lib/libcelt051.a D:/Entwicklung/Android-Projekte/app/Spice-Client/app/jni/src/../libs/deps/lib/libgovirt.a D:/Entwicklung/Android-Projekte/app/Spice-Client/app/jni/src/../libs/deps/lib/librest-0.7.a D:/Entwicklung/Android-Projekte/app/Spice-Client/app/jni/src/../libs/deps/lib/libjpeg.a D:/Entwicklung/Android-Projekte/app/Spice-Client/app/jni/src/../libs/deps/lib/libusb.a D:/Entwicklung/Android-Projekte/app/Spice-Client/app/jni/src/../libs/deps/lib/libusbredirhost.a D:/Entwicklung/Android-Projekte/app/Spice-Client/app/jni/src/../libs/deps/lib/libusbredirparser.a
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
GStreamer : [GEN] => gst-build-mips64/gstreamer_android.c
GStreamer : [COMPILE] => gst-build-mips64/gstreamer_android.c
GStreamer : [LINK] => gst-build-mips64/libgstreamer_android.so
clang.exe: error: invalid linker name in argument '-fuse-ld=gold'
make: *** [buildsharedlibrary_mips64] Error 1
I also tried to rename the linker to "gold.exe", but it doesn't change anything I'm currently using the ARM Build of GStreamer Version 1.9.2 https://gstreamer.freedesktop.org/data/pkg/android/1.9.2/我还尝试将链接器重命名为“gold.exe”,但它不会改变我目前使用 GStreamer 1.9.2 版的 ARM 构建https://gstreamer.freedesktop.org/data/pkg/android /1.9.2/
Android.mk安卓.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LIB_PATH := $(LOCAL_PATH)/../../libs/armeabi
SPICE_CLIENT_ANDROID_DEPS := $(LOCAL_PATH)/../libs/deps
GSTREAMER_ROOT := $(LOCAL_PATH)/../../libs/gstreamer
CROSS_DIR := $(LOCAL_PATH)/../../libs/gstreamer
spice_objs := \
$(SPICE_CLIENT_ANDROID_DEPS)/lib/libssl.a \
$(SPICE_CLIENT_ANDROID_DEPS)/lib/libcrypto.a \
$(SPICE_CLIENT_ANDROID_DEPS)/lib/libcelt051.a \
$(SPICE_CLIENT_ANDROID_DEPS)/lib/libgovirt.a \
$(SPICE_CLIENT_ANDROID_DEPS)/lib/librest-0.7.a \
$(SPICE_CLIENT_ANDROID_DEPS)/lib/libjpeg.a \
$(SPICE_CLIENT_ANDROID_DEPS)/lib/libusb.a \
$(SPICE_CLIENT_ANDROID_DEPS)/lib/libusbredirhost.a \
$(SPICE_CLIENT_ANDROID_DEPS)/lib/libusbredirparser.a
LOCAL_MODULE := spice
LOCAL_SRC_FILES := gtk/spice-uri.c gtk/channel-record.c gtk/channel-playback.c gtk/channel-cursor.c \
gtk/channel-webdav.c gtk/spice-cmdline.c gtk/coroutine_gthread.c gtk/spice-util.c \
gtk/spice-session.c gtk/spice-channel.c gtk/spice-marshal.c gtk/spice-glib-enums.c \
gtk/gio-coroutine.c gtk/channel-base.c gtk/channel-main.c gtk/spice-proxy.c gtk/bio-gsocket.c \
gtk/glib-compat.c gtk/channel-display.c gtk/channel-display-mjpeg.c gtk/channel-inputs.c \
gtk/decode-glz.c gtk/decode-jpeg.c gtk/decode-zlib.c gtk/wocky-http-proxy.c gtk/channel-port.c \
gtk/spice-client.c gtk/spice-audio.c gtk/spice-gstaudio.c gtk/vmcstream.c \
gtk/channel-usbredir.c gtk/usb-device-manager.c gtk/usbutil.c gtk/bio-gio.c \
spice-common/common/generated_client_demarshallers.c spice-common/common/generated_client_demarshallers1.c \
spice-common/common/generated_client_marshallers.c spice-common/common/generated_client_marshallers1.c \
spice-common/common/mem.c spice-common/common/marshaller.c spice-common/common/canvas_utils.c \
spice-common/common/backtrace.c spice-common/common/sw_canvas.c spice-common/common/pixman_utils.c \
spice-common/common/lines.c spice-common/common/rop3.c spice-common/common/quic.c spice-common/common/lz.c \
spice-common/common/region.c spice-common/common/ssl_verify.c spice-common/common/log.c \
spice-common/common/snd_codec.c \
virt-viewer/virt-viewer-file.c virt-viewer/virt-viewer-util.c \
android/android-service.c android/android-spicy.c android/android-spice-widget.c \
android/android-io.c
LOCAL_LDLIBS += $(spice_objs) \
-ljnigraphics -llog -ldl -lstdc++ -lz \
-malign-double -malign-loops
LOCAL_CPPFLAGS += -DG_LOG_DOMAIN=\"GSpice\" \
-DSW_CANVAS_CACHE \
-DHAVE_CONFIG_H -UHAVE_SYS_SHM_H -DSW_CANVAS_CACHE \
-D_REENTRANT -DWITH_GSTAUDIO
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/gtk \
$(LOCAL_PATH)/spice-common \
$(LOCAL_PATH)/spice-common/common \
$(LOCAL_PATH)/spice-common/spice-protocol \
$(LOCAL_PATH)/virt-viewer \
$(SPICE_CLIENT_ANDROID_DEPS)/include \
$(SPICE_CLIENT_ANDROID_DEPS)/include/govirt-1.0 \
$(SPICE_CLIENT_ANDROID_DEPS)/include/rest-0.7 \
$(SPICE_CLIENT_ANDROID_DEPS)/include/jpeg-turbo \
$(SPICE_CLIENT_ANDROID_DEPS)/include/libusb \
$(SPICE_CLIENT_ANDROID_DEPS)/include/usbredirparser \
$(SPICE_CLIENT_ANDROID_DEPS)/include/usbredirhost \
$(CROSS_DIR)/include \
$(CROSS_DIR)/include/glib-2.0 \
$(CROSS_DIR)/include/libxml2 \
$(CROSS_DIR)/include/pixman-1 \
$(CROSS_DIR)/include/spice-1 \
$(CROSS_DIR)/lib/glib-2.0/include
LOCAL_CFLAGS := $(LOCAL_CPPFLAGS) \
-std=gnu99 -Wall -Wno-sign-compare -Wno-deprecated-declarations -Wl,--no-undefined \
-fPIC -DPIC -O3 -funroll-loops -ffast-math
LOCAL_EXPORT_CFLAGS += $(LOCAL_CFLAGS)
LOCAL_EXPORT_LDLIBS += $(LOCAL_LDLIBS)
LOCAL_ARM_MODE := arm
LOCAL_SHARED_LIBRARIES := gstreamer_android
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
GSTREAMER_SDK_ROOT_ANDROID := $(LOCAL_PATH)/../../libs/gstreamer
ifndef GSTREAMER_SDK_ROOT
ifndef GSTREAMER_SDK_ROOT_ANDROID
$(error GSTREAMER_SDK_ROOT_ANDROID is not defined!)
endif
GSTREAMER_SDK_ROOT := $(GSTREAMER_SDK_ROOT_ANDROID)
endif
GSTREAMER_NDK_BUILD_PATH := $(GSTREAMER_SDK_ROOT)/share/gst-android/ndk-build/
include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk
GSTREAMER_PLUGINS := $(GSTREAMER_PLUGINS_CORE) $(GSTREAMER_PLUGINS_SYS)
G_IO_MODULES := gnutls
GSTREAMER_EXTRA_DEPS := pixman-1 gstreamer-app-1.0 libsoup-2.4 libxml-2.0 gthread-2.0 gobject-2.0 glib-2.0 gio-unix-2.0
TARGET_LDFLAGS := -z muldefs
include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk
So does anybody know how to solve this error?那么有人知道如何解决这个错误吗?
Looks like gstreamer unconditionally passes -fuse-ld=gold
:看起来 gstreamer 无条件通过
-fuse-ld=gold
:
$ grep -rI fuse-ld .
...
./share/gst-android/ndk-build/gstreamer-1.0.mk:GSTREAMER_LD := -fuse-ld=gold -Wl,-soname,lib$(GSTREAMER_ANDROID_MODULE_NAME).so
The NDK doesn't ship ld.gold for mips/mips64. NDK 不为 mips/mips64 提供 ld.gold。 You need to gate
-fuse-ld=gold
use against TARGET_ARCH
like so:您需要像这样对
TARGET_ARCH
使用-fuse-ld=gold
:
# mips/mips64 don't have ld.gold.
ifeq (,$(filter mips mips64,$(TARGET_ARCH)))
LOCAL_LDFLAGS += -fuse-ld=gold
endif
Alternatively, just don't pass -fuse-ld=gold
.或者,只是不要通过
-fuse-ld=gold
。 The NDK will default to it for the other architectures (aside from aarch64, where bfd is still the default).对于其他架构,NDK 将默认使用它(除了 aarch64,其中 bfd 仍然是默认值)。
Precompiled gstreamer binaries does not include mips support yet.预编译的 gstreamer 二进制文件还不包括 mips 支持。 You should exclude mips from build..
您应该从构建中排除 mips。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.