[Bug 764244] New: Android build fails to find sed command

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Mar 26 20:04:55 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=764244

            Bug ID: 764244
           Summary: Android build fails to find sed command
    Classification: Platform
           Product: GStreamer
           Version: 1.8.0
                OS: Linux
            Status: NEW
          Severity: major
          Priority: Normal
         Component: cerbero
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: marcin at saepia.net
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

I found out that 1.8.0 fails to determine location of sed command while
building for Android. Probably it's related to upgrade to NDK r11b. I've made
some tests with the same source code of my app on 1.6.3 (where NDK r10e was
present) and the problem does not exist.

I have found out that if I replace line in gstreamer-1.0.mk

HOST_SED := $(strip $(NDK_HOST_SED))

with 

HOST_SED := sed

it starts to work.


Steps to reproduce:

1. Take fresh ubuntu 14.04
2. Clone cerbero (tag 1.8.0)
3. Bootstrap & package gstreamer-1.0 with cross-android.cbc config
4. Fetch Android SDK
5. Try to build any app

Expected output: app builds properly

Actual output:

# ANDROID_HOME=/root/.android-packages/sdk/android-sdk-linux/
ANDROID_NDK_ROOT=/root/cerbero/android-ndk-r11/
ANDROID_GST_ROOT=/root/cerbero/dist/  ./gradlew build
: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/dist//android_arm
GSTREAMER_NDK_BUILD_PATH=/root/cerbero/dist//android_arm/share/gst-android/ndk-build/
SHELL=/bin/sh
GSTREAMER_PLUGINS=coreelements adder app audioconvert audiorate audioresample
audiotestsrc gio pango typefindfunctions videoconvert videorate videoscale
videotestsrc volume autodetect videofilter playback subparse ogg theora vorbis
opus ivorbisdec alaw apetag audioparsers auparse avi dv flac flv flxdec
icydemux id3demux isomp4 jpeg matroska mulaw multipart png speex taglib vpx
wavenc wavpack wavparse y4menc adpcmdec adpcmenc dashdemux dvbsuboverlay dvdspu
hls id3tag kate midi mxf openh264 opusparse pcapparse pnm rfbsrc schro gstsiren
smoothstreaming subenc videoparsersbad y4mdec jpegformat gdp rsvg openjpeg
spandsp androidmedia tcp rtsp rtp rtpmanager soup udp dataurisrc sdp srtp
rtspclientsink opensles opengl asfmux dtsdec faad mpegpsdemux mpegpsmux
mpegtsdemux mpegtsmux voaacenc a52dec amrnb amrwbdec asf dvdsub dvdlpcmdec mad
mpeg2dec xingmux realmedia x264 lame mpg123 libav  encoding libvisual goom
goom2k1 audiovisualizers alpha alphacolor audiofx cairo cutter debug
deinterlace dtmf effectv equalizer gdkpixbuf imagefreeze interleave level
multifile replaygain shapewipe smpte spectrum videobox videocrop videomixer
accurip aiff audiofxbad autoconvert bayer coloreffects debugutilsbad
fieldanalysis freeverb frei0r gaudieffects geometrictransform inter interlace
ivtc rawparse removesilence segmentclip smooth speed soundtouch videofiltersbad
audiomixer compositor mms rtmp
GSTREAMER_EXTRA_DEPS=glib-2.0
make: -n: Command not found
make: -n: Command not found
/bin/sh: 0: Illegal option - 
/bin/sh: 0: Illegal option - 
(repeated many times)
GStreamer      : [GEN] => gst-build-armeabi/gstreamer_android.c
/bin/sh: 1: i: not found
make: [genstatic_armeabi] Error 127 (ignored)
/bin/sh: 1: i: not found
make: [genstatic_armeabi] Error 127 (ignored)
/bin/sh: 1: i: not found
make: [genstatic_armeabi] Error 127 (ignored)
/bin/sh: 1: i: not found
make: [genstatic_armeabi] Error 127 (ignored)
GStreamer      : [COMPILE] => gst-build-armeabi/gstreamer_android.c
gst-build-armeabi/gstreamer_android.c:17:2: error: stray '@' in program
  @PLUGINS_DECLARATION@
  ^
gst-build-armeabi/gstreamer_android.c:17:22: error: stray '@' in program
  @PLUGINS_DECLARATION@
                      ^
gst-build-armeabi/gstreamer_android.c:20:2: error: stray '@' in program
  @G_IO_MODULES_DECLARE@
  ^
gst-build-armeabi/gstreamer_android.c:17:3: error: unknown type name
'PLUGINS_DECLARATION'
  @PLUGINS_DECLARATION@
   ^
gst-build-armeabi/gstreamer_android.c:20:23: error: stray '@' in program
  @G_IO_MODULES_DECLARE@
                       ^
gst-build-armeabi/gstreamer_android.c:23:1: error: expected '=', ',', ';',
'asm' or '__attribute__' before 'void'
 void
 ^
gst-build-armeabi/gstreamer_android.c:26:2: error: stray '@' in program
  @PLUGINS_REGISTRATION@
  ^
gst-build-armeabi/gstreamer_android.c:26:23: error: stray '@' in program
  @PLUGINS_REGISTRATION@
                       ^
gst-build-armeabi/gstreamer_android.c: In function
'gst_android_load_gio_modules':
gst-build-armeabi/gstreamer_android.c:33:2: error: stray '@' in program
  @G_IO_MODULES_LOAD@
  ^
gst-build-armeabi/gstreamer_android.c:33:20: error: stray '@' in program
  @G_IO_MODULES_LOAD@
                    ^
gst-build-armeabi/gstreamer_android.c:33:3: error: 'G_IO_MODULES_LOAD'
undeclared (first use in this function)
  @G_IO_MODULES_LOAD@
   ^
gst-build-armeabi/gstreamer_android.c:33:3: note: each undeclared identifier is
reported only once for each function it appears in
gst-build-armeabi/gstreamer_android.c:34:1: error: expected ';' before '}'
token
 }
 ^
gst-build-armeabi/gstreamer_android.c: In function 'gst_android_init':
gst-build-armeabi/gstreamer_android.c:497:3: error: implicit declaration of
function 'gst_android_register_static_plugins'
[-Werror=implicit-function-declaration]
   gst_android_register_static_plugins ();
   ^
cc1: all warnings being treated as errors
make: *** [gst-build-armeabi/gstreamer_android.o] Error 1
:app:ndkBuild FAILED


The build script was:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := test
LOCAL_SRC_FILES := test.c

LOCAL_SHARED_LIBRARIES := gstreamer_android
LOCAL_LDLIBS := -llog -landroid
include $(BUILD_SHARED_LIBRARY)

ifeq ($(TARGET_ARCH_ABI),armeabi)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ARM)
else ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ARMV7)
else ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ARM64)
else ifeq ($(TARGET_ARCH_ABI),x86)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_X86)
else ifeq ($(TARGET_ARCH_ABI),x86_64)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_X86_64)
else
$(error Target arch ABI not supported)
endif

GSTREAMER_NDK_BUILD_PATH  := $(GSTREAMER_ROOT)/share/gst-android/ndk-build/
SHELL := PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
PKG_CONFIG_PATH=$(GSTREAMER_ROOT)/lib/pkgconfig /bin/bash

include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk
GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CORE)
$(GSTREAMER_PLUGINS_PLAYBACK) $(GSTREAMER_PLUGINS_CODECS)
$(GSTREAMER_PLUGINS_NET) $(GSTREAMER_PLUGINS_SYS)
$(GSTREAMER_PLUGINS_CODECS_RESTRICTED) $(GSTREAMER_CODECS_GPL)
$(GSTREAMER_PLUGINS_ENCODING) $(GSTREAMER_PLUGINS_VIS)
$(GSTREAMER_PLUGINS_EFFECTS) $(GSTREAMER_PLUGINS_NET_RESTRICTED)
GSTREAMER_EXTRA_DEPS      := glib-2.0 libradiokit-common-1.0

$(info TARGET_ARCH_ABI=$(TARGET_ARCH_ABI))
$(info GSTREAMER_ROOT=$(GSTREAMER_ROOT))
$(info GSTREAMER_NDK_BUILD_PATH=$(GSTREAMER_NDK_BUILD_PATH))
$(info SHELL=$(SHELL))
$(info GSTREAMER_PLUGINS=$(GSTREAMER_PLUGINS))
$(info GSTREAMER_EXTRA_DEPS=$(GSTREAMER_EXTRA_DEPS))

include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk


test.c:


#include <string.h>
#include <stdint.h>
#include <jni.h>


/* Library initializer */
jint
JNI_OnLoad (JavaVM * vm, void *reserved) {
    return JNI_VERSION_1_4;
}

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list