When gstreamer-android is being built (using NDK r8e), it fails with the following output: GStreamer : [GEN] => gst-build/gstreamer_android.c GStreamer : [COMPILE] => gst-build/gstreamer_android.c gst-build/gstreamer_android.c:1:17: fatal error: jni.h: No such file or directory
Seems like the problem is: @$(_CC) --sysroot=$(SYSROOT) $(CFLAGS) -c $(GSTREAMER_ANDROID_C) -Wall -Werror -o $(GSTREAMER_ANDROID_O) $(GSTREAMER_ANDROID_CFLAGS) So either `$(CFLAGS)` was set in previous releases, or I really don't know where you would get the include directories.
So one step further. I added: # Build CFLAGS manually so we have standard android CFLAGS GSTREAMER_TARGET_CFLAGS := $(addprefix -isystem , $(TARGET_C_INCLUDES)) $(TARGET_CFLAGS) $(CFLAGS) GSTREAMER_TARGET_LDFLAGS := $(TARGET_LDFLAGS) $(LDFLAGS) and @$(HOST_ECHO) "GStreamer : [COMPILE] => $(GSTREAMER_ANDROID_C)" @$(TARGET_CC) --sysroot=$(SYSROOT) $(GSTREAMER_TARGET_CFLAGS) -c $(GSTREAMER_ANDROID_C) -Wall -Werror -o $(GSTREAMER_ANDROID_O) $(GSTREAMER_ANDROID_CFLAGS) and it at least compiles.
Now it fails with: GStreamer : [LINK] => gst-build/libgstreamer_android.so collect2: fatal error: cannot find 'ld' I have not found where it forces `ld` instead of the target linker. I do get a little worried because the build script seems really wonky.
I have the same issue "gst-build/gstreamer_android.c:1:17: fatal error: jni.h: No such file or directory" when compiling Gstreamer tutorials on Eclipse using NDK r8e (linux). I tried to compile using NDK-build from command line and it shows the same error message. Please tell me how to fix it.
to compile tutorial with Android NDK r8e i just add SYSROOT variable to Android.mk Tutorial1/jni/Android.mk ... LOCAL_LDLIBS := -llog SYSROOT := /opt/android-ndk-r8e/platforms/android-14/arch-arm/ include $(BUILD_SHARED_LIBRARY) ...
Did someone try with latest cerbero (not the last SDK release)? For me everything is working fine there with r8e.
(In reply to comment #6) > Did someone try with latest cerbero (not the last SDK release)? For me > everything is working fine there with r8e. gstreamer-sdk/share/gst-android/ndk-build/gstreamer.mk +# In newer NDK, SYSROOT is replaced by SYSROOT_INC and SYSROOT_LINK, which +# now points to the root directory. But this will probably change in the future from: +# https://android.googlesource.com/platform/ndk/+/fa8c1b4338c1bef2813ecee0ee298e9498a1aaa7 +ifndef SYSROOT + SYSROOT := $(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-$(TARGET_ARCH) +endif + The new lines above in gstreamer.mk(in cerbero master branch) fix the problem, tested under android-ndk-r9d.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.