"undefined reference to bsd_signal" error on Android Studio 2.1
Diane Cordero
dcordero at sbimagingsystems.com
Mon May 9 22:41:36 UTC 2016
Hi everyone,
I am working on migrating my Android Eclipse project to Android Studio 2.1 using Android NDK v12 and Gradle 2.2.1.
Below is the error I see when trying to compile the GStreamer library (version 1.8.1):
GStreamer : [GEN] => gst-build-armeabi-v7a/gstreamer_android.c
GStreamer : [COMPILE] => gst-build-armeabi-v7a/gstreamer_android.c
GStreamer : [LINK] => gst-build-armeabi-v7a/libgstreamer_android.so
/home/slomo/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include/signal.h:113: error: undefined reference to 'bsd_signal'
/home/slomo/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include/signal.h:113: error: undefined reference to 'bsd_signal'
/home/slomo/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include/signal.h:113: error: undefined reference to 'bsd_signal'
/home/slomo/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include/signal.h:113: error: undefined reference to 'bsd_signal'
collect2: error: ld returned 1 exit status
Why does it reference API level 9? Is this error based on changes to the Android NDK? If so, is there a patch I can apply to get around this error?
As a side question, are GStreamer releases tested on Android Studio? And what is the connection between android-ndk-r11 and the Android NDK used by Android Studio?
Application.mk
APP_ABI := armeabi-v7a
APP_PLATFORM := android-21
Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := Pixa
LOCAL_SRC_FILES := Pixa.c
LOCAL_SHARED_LIBRARIES := gstreamer_android
LOCAL_LDLIBS := -llog -landroid
include $(BUILD_SHARED_LIBRARY)
ifndef GSTREAMER_ROOT
ifndef GSTREAMER_ROOT_ANDROID
#$(error GSTREAMER_ROOT_ANDROID is not defined!)
GSTREAMER_ROOT_ANDROID := /home/sbis-android/Android/Installation/gstreamer-1.0-android-armv7-1.8.1
endif
GSTREAMER_ROOT := $(GSTREAMER_ROOT_ANDROID)
endif
GSTREAMER_NDK_BUILD_PATH := $(GSTREAMER_ROOT)/share/gst-android/ndk-build
include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk
GSTREAMER_PLUGINS := $(GSTREAMER_PLUGINS_CORE) $(GSTREAMER_PLUGINS_SYS) $(GSTREAMER_PLUGINS_EFFECTS) $(GSTREAMER_PLUGINS_CODECS_RESTRICTED) $(GSTREAMER_PLUGINS_CODECS) $(GSTREAMER_PLUGINS_NET) $(GSTREAMER_PLUGINS_PLAYBACK) $(GSTREAMER_AGGREGATE_TOP)
GSTREAMER_EXTRA_DEPS := gstreamer-video-1.0
include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk
Gradle task:
task ndkBuild(type: Exec, description: 'Compile JNI source via NDK') {
def ndkDir = project.plugins.findPlugin('com.android.application').getNdkFolder()
println(project.plugins.findPlugin('com.android.application').getNdkFolder())
commandLine "$ndkDir/ndk-build",
'NDK_PROJECT_PATH=build',
'APP_BUILD_SCRIPT=src/main/jni/Android.mk',
'NDK_APPLICATION_MK=src/main/jni/Application.mk'
}
Thanks!
Diane Cordero
Software Engineer
340 Storke Road, Suite 101
Goleta, CA 93117
P 805.252.1366
[SBIS horizontal logo v4]
Confidentiality Notice: This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended addressee, or the person responsible for delivering it to them, you may not copy, forward, disclose, or otherwise use it or any part of it in any way. To do so may be unlawful. If you receive this e-mail in error, please delete it and notify the sender immediately.
The Santa Barbara Imaging Systems logo, Pixa, and the Pixa logo are trademarks of Santa Barbara Imaging Systems. All rights reserved.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-android/attachments/20160509/f477f05d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 10501 bytes
Desc: image001.png
URL: <https://lists.freedesktop.org/archives/gstreamer-android/attachments/20160509/f477f05d/attachment-0001.png>
More information about the gstreamer-android
mailing list