GNOME Bugzilla – Bug 773401
ndk-build/gstreamer-1.0.mk: shell continuation + new lines cause not found
Last modified: 2018-01-14 12:24:39 UTC
I use GStreamer 1.8.2, I build it on my own using Cerbero. I get the following error during build $ ./gradlew assembleDebug :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2320Library UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72320Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42320Library UP-TO-DATE :app:prepareComAndroidSupportSupportVectorDrawable2320Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources UP-TO-DATE :app:processDebugManifest UP-TO-DATE :app:processDebugResources UP-TO-DATE :app:generateDebugSources UP-TO-DATE :app:ndkBuild TARGET_ARCH_ABI=armeabi GSTREAMER_ROOT=/root/cerbero-home/dist/android_arm GSTREAMER_NDK_BUILD_PATH=/root/cerbero-home/dist/android_arm/share/gst-android/ndk-build/ SHELL=PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin PKG_CONFIG_PATH=/root/cerbero-home/dist/android_arm/lib/pkgconfig /bin/bash GSTREAMER_PLUGINS=coreelements audioconvert audiorate audioresample gio typefindfunctions volume autodetect opensles playback level autoconvert rawparse audiomixer ogg opus audioparsers taglib opusparse tcp rtp soup udp GSTREAMER_EXTRA_DEPS=glib-2.0 gio-2.0 json-glib-1.0 libsoup-2.4 libradiokit-common-1.2 libradiokit-electron-common-1.2 libradiokit-electron-1.2 G_IO_MODULES=gnutls GStreamer : [GEN] => gst-build-armeabi/gstreamer_android.c /bin/bash: -c: line 1: syntax error: unexpected end of file /bin/sh: 2: sed "s/@PLUGINS_DECLARATION@/ GST_PLUGIN_STATIC_DECLARE(coreelements);\n GST_PLUGIN_STATIC_DECLARE(audioconvert);\n GST_PLUGIN_STATIC_DECLARE(audiorate);\n GST_PLUGIN_STATIC_DECLARE(audioresample);\n GST_PLUGIN_STATIC_DECLARE(gio);\n GST_PLUGIN_STATIC_DECLARE(typefindfunctions);\n GST_PLUGIN_STATIC_DECLARE(volume);\n GST_PLUGIN_STATIC_DECLARE(autodetect);\n GST_PLUGIN_STATIC_DECLARE(opensles);\n GST_PLUGIN_STATIC_DECLARE(playback);\n GST_PLUGIN_STATIC_DECLARE(level);\n GST_PLUGIN_STATIC_DECLARE(autoconvert);\n GST_PLUGIN_STATIC_DECLARE(rawparse);\n GST_PLUGIN_STATIC_DECLARE(audiomixer);\n GST_PLUGIN_STATIC_DECLARE(ogg);\n GST_PLUGIN_STATIC_DECLARE(opus);\n GST_PLUGIN_STATIC_DECLARE(audioparsers);\n GST_PLUGIN_STATIC_DECLARE(taglib);\n GST_PLUGIN_STATIC_DECLARE(opusparse);\n GST_PLUGIN_STATIC_DECLARE(tcp);\n GST_PLUGIN_STATIC_DECLARE(rtp);\n GST_PLUGIN_STATIC_DECLARE(soup);\n GST_PLUGIN_STATIC_DECLARE(udp);\n/g" | \: not found /bin/sh: 3: sed "s/@PLUGINS_REGISTRATION@/ GST_PLUGIN_STATIC_REGISTER(coreelements);\n GST_PLUGIN_STATIC_REGISTER(audioconvert);\n GST_PLUGIN_STATIC_REGISTER(audiorate);\n GST_PLUGIN_STATIC_REGISTER(audioresample);\n GST_PLUGIN_STATIC_REGISTER(gio);\n GST_PLUGIN_STATIC_REGISTER(typefindfunctions);\n GST_PLUGIN_STATIC_REGISTER(volume);\n GST_PLUGIN_STATIC_REGISTER(autodetect);\n GST_PLUGIN_STATIC_REGISTER(opensles);\n GST_PLUGIN_STATIC_REGISTER(playback);\n GST_PLUGIN_STATIC_REGISTER(level);\n GST_PLUGIN_STATIC_REGISTER(autoconvert);\n GST_PLUGIN_STATIC_REGISTER(rawparse);\n GST_PLUGIN_STATIC_REGISTER(audiomixer);\n GST_PLUGIN_STATIC_REGISTER(ogg);\n GST_PLUGIN_STATIC_REGISTER(opus);\n GST_PLUGIN_STATIC_REGISTER(audioparsers);\n GST_PLUGIN_STATIC_REGISTER(taglib);\n GST_PLUGIN_STATIC_REGISTER(opusparse);\n GST_PLUGIN_STATIC_REGISTER(tcp);\n GST_PLUGIN_STATIC_REGISTER(rtp);\n GST_PLUGIN_STATIC_REGISTER(soup);\n GST_PLUGIN_STATIC_REGISTER(udp);\n/g" | \: not found /bin/sh: 4: sed "s/@G_IO_MODULES_LOAD@/ GST_G_IO_MODULE_LOAD(gnutls);\n/g" | \: not found /bin/sh: 5: sed "s/@G_IO_MODULES_DECLARE@/ GST_G_IO_MODULE_DECLARE(gnutls);\n/g": not found make: *** [genstatic_armeabi] Error 127 :app:ndkBuild FAILED I have found out that if I remove newlines from gstreamer-1.0.mk in genstatic_$(TARGET_ARCH_ABI) task, so I write genstatic_$(TARGET_ARCH_ABI): @$(HOST_ECHO) "GStreamer : [GEN] => $(PRIV_C)" @$(call host-mkdir,$(PRIV_B_DIR)) cat $(PRIV_C_IN) | $(SED) "s/@PLUGINS_DECLARATION@/$(PRIV_P_D)/g" | $(SED) "s/@PLUGINS_REGISTRATION@/$(PRIV_P_R)/g" | $(SED) "s/@G_IO_MODULES_LOAD@/$(PRIV_G_L)/g" | $(SED) "s/@G_IO_MODULES_DECLARE@/$(PRIV_G_R)/g" > $(PRIV_C) instead of genstatic_$(TARGET_ARCH_ABI): @$(HOST_ECHO) "GStreamer : [GEN] => $(PRIV_C)" @$(call host-mkdir,$(PRIV_B_DIR)) cat $(PRIV_C_IN) | \ $(SED) "s/@PLUGINS_DECLARATION@/$(PRIV_P_D)/g" | \ $(SED) "s/@PLUGINS_REGISTRATION@/$(PRIV_P_R)/g" | \ $(SED) "s/@G_IO_MODULES_LOAD@/$(PRIV_G_L)/g" | \ $(SED) "s/@G_IO_MODULES_DECLARE@/$(PRIV_G_R)/g" > $(PRIV_C) it works fine. I run this within Docker image of Ubuntu 14.04.5, shell is bash 4.3.11
This should be fixed in 1.8.3 and 1.9.90. Can you confirm?
I have upgraded to 1.8.3 and still the same GStreamer : [GEN] => gst-build-armeabi/gstreamer_android.c cat /root/cerbero-home/dist/android_arm/share/gst-android/ndk-build//gstreamer_android-1.0.c.in | \ sed "s/@PLUGINS_DECLARATION@/ GST_PLUGIN_STATIC_DECLARE(coreelements);\n GST_PLUGIN_STATIC_DECLARE(audioconvert);\n GST_PLUGIN_STATIC_DECLARE(audiorate);\n GST_PLUGIN_STATIC_DECLARE(audioresample);\n GST_PLUGIN_STATIC_DECLARE(gio);\n GST_PLUGIN_STATIC_DECLARE(typefindfunctions);\n GST_PLUGIN_STATIC_DECLARE(volume);\n GST_PLUGIN_STATIC_DECLARE(autodetect);\n GST_PLUGIN_STATIC_DECLARE(opensles);\n GST_PLUGIN_STATIC_DECLARE(playback);\n GST_PLUGIN_STATIC_DECLARE(level);\n GST_PLUGIN_STATIC_DECLARE(autoconvert);\n GST_PLUGIN_STATIC_DECLARE(rawparse);\n GST_PLUGIN_STATIC_DECLARE(audiomixer);\n GST_PLUGIN_STATIC_DECLARE(ogg);\n GST_PLUGIN_STATIC_DECLARE(opus);\n GST_PLUGIN_STATIC_DECLARE(audioparsers);\n GST_PLUGIN_STATIC_DECLARE(taglib);\n GST_PLUGIN_STATIC_DECLARE(opusparse);\n GST_PLUGIN_STATIC_DECLARE(tcp);\n GST_PLUGIN_STATIC_DECLARE(rtp);\n GST_PLUGIN_STATIC_DECLARE(soup);\n GST_PLUGIN_STATIC_DECLARE(udp);\n/g" | \ sed "s/@PLUGINS_REGISTRATION@/ GST_PLUGIN_STATIC_REGISTER(coreelements);\n GST_PLUGIN_STATIC_REGISTER(audioconvert);\n GST_PLUGIN_STATIC_REGISTER(audiorate);\n GST_PLUGIN_STATIC_REGISTER(audioresample);\n GST_PLUGIN_STATIC_REGISTER(gio);\n GST_PLUGIN_STATIC_REGISTER(typefindfunctions);\n GST_PLUGIN_STATIC_REGISTER(volume);\n GST_PLUGIN_STATIC_REGISTER(autodetect);\n GST_PLUGIN_STATIC_REGISTER(opensles);\n GST_PLUGIN_STATIC_REGISTER(playback);\n GST_PLUGIN_STATIC_REGISTER(level);\n GST_PLUGIN_STATIC_REGISTER(autoconvert);\n GST_PLUGIN_STATIC_REGISTER(rawparse);\n GST_PLUGIN_STATIC_REGISTER(audiomixer);\n GST_PLUGIN_STATIC_REGISTER(ogg);\n GST_PLUGIN_STATIC_REGISTER(opus);\n GST_PLUGIN_STATIC_REGISTER(audioparsers);\n GST_PLUGIN_STATIC_REGISTER(taglib);\n GST_PLUGIN_STATIC_REGISTER(opusparse);\n GST_PLUGIN_STATIC_REGISTER(tcp);\n GST_PLUGIN_STATIC_REGISTER(rtp);\n GST_PLUGIN_STATIC_REGISTER(soup);\n GST_PLUGIN_STATIC_REGISTER(udp);\n/g" | \ /bin/bash: -c: line 1: syntax error: unexpected end of file seULES_LOAD@/ GST_G_IO_MODULE_LOAD(gnutls);\n/g" | \ /bin/sh: 2: sed "s/@PLUGINS_DECLARATION@/ GST_PLUGIN_STATIC_DECLARE(coreelements);\n GST_PLUGIN_STATIC_DECLARE(audioconvert);\n GST_PLUGIN_STATIC_DECLARE(audiorate);\n GST_PLUGIN_STATIC_DECLARE(audioresample);\n GST_PLUGIN_STATIC_DECLARE(gio);\n GST_PLUGIN_STATIC_DECLARE(typefindfunctions);\n GST_PLUGIN_STATIC_DECLARE(volume);\n GST_PLUGIN_STATIC_DECLARE(autodetect);\n GST_PLUGIN_STATIC_DECLARE(opensles);\n GST_PLUGIN_STATIC_DECLARE(playback);\n GST_PLUGIN_STATIC_DECLARE(level);\n GST_PLUGIN_STATIC_DECLARE(autoconvert);\n GST_PLUGIN_STATIC_DECLARE(rawparse);\n GST_PLUGIN_STATIC_DECLARE(audiomixer);\n GST_PLUGIN_STATIC_DECLARE(ogg);\n GST_PLUGIN_STATIC_DECLARE(opus);\n GST_PLUGIN_STATIC_DECLARE(audioparsers);\n GST_PLUGIN_STATIC_DECLARE(taglib);\n GST_PLUGIN_STATIC_DECLARE(opusparse);\n GST_PLUGIN_STATIC_DECLARE(tcp);\n GST_PLUGIN_STATIC_DECLARE(rtp);\n GST_PLUGIN_STATIC_DECLARE(soup);\n GST_PLUGIN_STATIC_DECLARE(udp);\n/g" | \: not found /bin/sh: 3: sed "s/@PLUGINS_REGISTRATION@/ GST_PLUGIN_STATIC_REGISTER(coreelements);\n GST_PLUGIN_STATIC_REGISTER(audioconvert);\n GST_PLUGIN_STATIC_REGISTER(audiorate);\n GST_PLUGIN_STATIC_REGISTER(audioresample);\n GST_PLUGIN_STATIC_REGISTER(gio);\n GST_PLUGIN_STATIC_REGISTER(typefindfunctions);\n GST_PLUGIN_STATIC_REGISTER(volume);\n GST_PLUGIN_STATIC_REGISTER(autodetect);\n GST_PLUGIN_STATIC_REGISTER(opensles);\n GST_PLUGIN_STATIC_REGISTER(playback);\n GST_PLUGIN_STATIC_REGISTER(level);\n GST_PLUGIN_STATIC_REGISTER(autoconvert);\n GST_PLUGIN_STATIC_REGISTER(rawparse);\n GST_PLUGIN_STATIC_REGISTER(audiomixer);\n GST_PLUGIN_STATIC_REGISTER(ogg);\n GST_PLUGIN_STATIC_REGISTER(opus);\n GST_PLUGIN_STATIC_REGISTER(audioparsers);\n GST_PLUGIN_STATIC_REGISTER(taglib);\n GST_PLUGIN_STATIC_REGISTER(opusparse);\n GST_PLUGIN_STATIC_REGISTER(tcp);\n GST_PLUGIN_STATIC_REGISTER(rtp);\n GST_PLUGIN_STATIC_REGISTER(soup);\n GST_PLUGIN_STATIC_REGISTER(udp);\n/g" | \: not found sed "s/@G_IO_MODULES_DECLARE@/ GST_G_IO_MODULE_DECLARE(gnutls);\n/g" > gst-build-armeabi/gstreamer_android.c /bin/sh: 4: sed "s/@G_IO_MODULES_LOAD@/ GST_G_IO_MODULE_LOAD(gnutls);\" | \: not found /bin/sh: 5: sed "s/@G_IO_MODULES_DECLARE@/ GST_G_IO_MODULE_DECLARE(gnutls);\n/g" > gst-build-armeabi/gstreamer_android.c: not found
Ok so this is a different problem. What was the last version that worked fine for you?
I think it was 1.6.3 but I wasn't making Android builds for a while so I might be wrong.
It seems that just removing newlines fixes the issue, should I prepare the patch?
Is that a duplicate of bug #768456? I can't reproduce it here though
Might also make sense to look at bug #773464. FWIW, please try with 1.9.90. That should at least work
ping?
Closing for lack of response. Please reopen if issue still happens.
This is actually still an issue in Android Studio.
commit c9b56474b3322b45fc503cc8a51f32141e492148 Author: Matthew Waters <matthew@centricular.com> Date: Wed Nov 29 16:15:30 2017 +1100 android/ndk-build: don't use line continuation with shell pipes gradle/android-studio do not seem to like it at all. https://bugzilla.gnome.org/show_bug.cgi?id=773401