openwebrtc icon indicating copy to clipboard operation
openwebrtc copied to clipboard

Android cross-compile target got error.

Open wangchauyan opened this issue 8 years ago • 12 comments

@superdump after updating latest code, I can build mac os x target now. But I am trying to build android cross-compile target but get error.

Please check these error messages:

[(28/36) openwebrtc-gst-plugins -> fetch ]
[(28/36) openwebrtc-gst-plugins -> extract ]
[(28/36) openwebrtc-gst-plugins -> configure ]
-----> copying /Users/ChauyanWang/cerbero/data/autotools/config.guess to /Users/ChauyanWang/cerbero/sources/android_armv7/openwebrtc-gst-plugins-0.3.0/config.guess
-----> copying /Users/ChauyanWang/cerbero/data/autotools/config.sub to /Users/ChauyanWang/cerbero/sources/android_armv7/openwebrtc-gst-plugins-0.3.0/config.sub
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /Users/ChauyanWang/cerbero/build-tools/bin/autoconf --force
autoreconf: running: /Users/ChauyanWang/cerbero/build-tools/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:21: installing './compile'
configure.ac:15: installing './missing'
ext/sctp/Makefile.am: installing './depcomp'
autoreconf: Leaving directory `.'
configure: WARNING: unrecognized options: --disable-erdtls, --disable-introspection
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-androideabi-strip... arm-linux-androideabi-strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc -fuse-ld=gold
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-linux-androideabi-gcc -fuse-ld=gold accepts -g... yes
checking for arm-linux-androideabi-gcc -fuse-ld=gold option to accept ISO C89... none needed
checking whether arm-linux-androideabi-gcc -fuse-ld=gold understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of arm-linux-androideabi-gcc -fuse-ld=gold... gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether arm-linux-androideabi-g++ -fuse-ld=gold accepts -g... yes
checking dependency style of arm-linux-androideabi-g++ -fuse-ld=gold... gcc3
checking for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc
checking whether we are using the GNU Objective C compiler... no
checking whether arm-linux-androideabi-gcc accepts -g... no
checking dependency style of arm-linux-androideabi-gcc... gcc3
checking dependency style of arm-linux-androideabi-gcc -fuse-ld=gold... gcc3
checking build system type... i386-apple-darwin15.4.0
checking host system type... arm-unknown-linux-androideabi
checking how to print strings... printf
checking for a sed that does not truncate output... /Users/ChauyanWang/cerbero/build-tools/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by arm-linux-androideabi-gcc -fuse-ld=gold... arm-linux-androideabi-ld.gold
checking if the linker (arm-linux-androideabi-ld.gold) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... arm-linux-androideabi-nm
checking the name lister (arm-linux-androideabi-nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert i386-apple-darwin15.4.0 file names to arm-unknown-linux-androideabi format... func_convert_file_noop
checking how to convert i386-apple-darwin15.4.0 file names to toolchain format... func_convert_file_noop
checking for arm-linux-androideabi-ld.gold option to reload object files... -r
checking for arm-linux-androideabi-objdump... arm-linux-androideabi-objdump
checking how to recognize dependent libraries... pass_all
checking for arm-linux-androideabi-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for arm-linux-androideabi-ar... arm-linux-androideabi-ar
checking for archiver @FILE support... @
checking for arm-linux-androideabi-strip... (cached) arm-linux-androideabi-strip
checking for arm-linux-androideabi-ranlib... arm-linux-androideabi-ranlib
checking command to parse arm-linux-androideabi-nm output from arm-linux-androideabi-gcc -fuse-ld=gold object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for arm-linux-androideabi-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... arm-linux-androideabi-cpp
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if arm-linux-androideabi-gcc -fuse-ld=gold supports -fno-rtti -fno-exceptions... no
checking for arm-linux-androideabi-gcc -fuse-ld=gold option to produce PIC... -fPIC -DPIC
checking if arm-linux-androideabi-gcc -fuse-ld=gold PIC flag -fPIC -DPIC works... yes
checking if arm-linux-androideabi-gcc -fuse-ld=gold static flag -static works... yes
checking if arm-linux-androideabi-gcc -fuse-ld=gold supports -c -o file.o... yes
checking if arm-linux-androideabi-gcc -fuse-ld=gold supports -c -o file.o... (cached) yes
checking whether the arm-linux-androideabi-gcc -fuse-ld=gold linker (arm-linux-androideabi-ld.gold) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... Android linker
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... arm-linux-androideabi-g++ -fuse-ld=gold -E
checking for ld used by arm-linux-androideabi-g++ -fuse-ld=gold... arm-linux-androideabi-ld.gold
checking if the linker (arm-linux-androideabi-ld.gold) is GNU ld... yes
checking whether the arm-linux-androideabi-g++ -fuse-ld=gold linker (arm-linux-androideabi-ld.gold) supports shared libraries... yes
checking for arm-linux-androideabi-g++ -fuse-ld=gold option to produce PIC... -fPIC -DPIC
checking if arm-linux-androideabi-g++ -fuse-ld=gold PIC flag -fPIC -DPIC works... yes
checking if arm-linux-androideabi-g++ -fuse-ld=gold static flag -static works... yes
checking if arm-linux-androideabi-g++ -fuse-ld=gold supports -c -o file.o... yes
checking if arm-linux-androideabi-g++ -fuse-ld=gold supports -c -o file.o... (cached) yes
checking whether the arm-linux-androideabi-g++ -fuse-ld=gold linker (arm-linux-androideabi-ld.gold) supports shared libraries... yes
checking dynamic linker characteristics... Android linker
checking how to hardcode library paths into programs... immediate
checking pkg-config is at least version 0.9.0... yes
checking for GST... yes
checking to see if compiler understands -Wall... yes
checking usrsctp.h usability... yes
checking usrsctp.h presence... yes
checking for usrsctp.h... yes
checking for usrsctp_init in -lusrsctp... no
configure: error: You need libusrsctp for the build
Running command 'mkdir -p m4 && autoreconf -fiv'
Running command './configure --prefix /Users/ChauyanWang/cerbero/dist/android_armv7 --libdir /Users/ChauyanWang/cerbero/dist/android_armv7/lib              --enable-shared             --enable-static             --disable-erdtls             --disable-debug             --disable-static-plugins             --disable-android-plugins             --disable-osx-plugins             --disable-linux-plugins --disable-colorspace-converter --enable-android-plugins                 DX="/Users/ChauyanWang/cerbero/build-tools/opt/android-sdk/build-tools/android-4.4W/dx" --disable-maintainer-mode  --disable-silent-rules  --disable-introspection  --host=arm-linux-androideabi'

Recipe 'openwebrtc-gst-plugins' failed at the build step 'configure'
Select an action to proceed:
[0] Enter the shell
[1] Rebuild the recipe from scratch
[2] Rebuild starting from the failed step
[3] Skip recipe
[4] Abort

Thanks a lot.

wangchauyan avatar Mar 28 '16 07:03 wangchauyan

I have a different issue when building icu:

   arm-linux-androideabi-gcc     ...  ucnv_cnv.c
ustrenum.cpp: In member function 'virtual UBool icu::StringEnumeration::operator==(const icu::StringEnumeration&) const':
ustrenum.cpp:123:20: error: cannot use typeid with -fno-rtti
     return typeid(*this) == typeid(that);
                    ^
ustrenum.cpp:123:36: error: cannot use typeid with -fno-rtti
     return typeid(*this) == typeid(that);
                                    ^
ustrenum.cpp:124:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
*** Failed compilation command follows: ----------------------------------------------------------
arm-linux-androideabi-g++ -fuse-ld=gold --sysroot=/Users/eroswai/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/eroswai/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -DANDROID -DPIC -D__ARM_ARCH_7A__ -D_REENTRANT -DU_HAVE_ELF_H=1 -DU_HAVE_ATOMIC=1 -DU_DISABLE_RENAMING=1 -I. -DDEFAULT_ICU_PLUGINS="/Users/eroswai/cerbero/dist/android_armv7/lib/icu"  -DU_ATTRIBUTE_DEPRECATED= -DU_COMMON_IMPLEMENTATION -Wall -g -Os --sysroot=/Users/eroswai/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/eroswai/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fPIC -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -DPIC -D__ARM_ARCH_7A__ -Wa,--noexecstack -fno-rtti -fno-exceptions -I/Users/eroswai/cerbero/android-ndk-r11/sources/cxx-stl/gnu-libstdc++/4.9/include -I/Users/eroswai/cerbero/android-ndk-r11/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long --std=c++0x -c -o ustrenum.ao ustrenum.cpp
--- ( rebuild with "/Applications/Xcode.app/Contents/Developer/usr/bin/make VERBOSE=1 all" to show all parameters ) --------
make[1]: *** [ustrenum.ao] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all-recursive] Error 2
Running command 'make -j8'

Recipe 'icu' failed at the build step 'compile'
Select an action to proceed:
[0] Enter the shell
[1] Rebuild the recipe from scratch
[2] Rebuild starting from the failed step
[3] Skip recipe
[4] Abort

@sdroege : any suggestions?

superdump avatar Mar 29 '16 09:03 superdump

@superdump edit config/android.config remove -fno-rtti os.environ['CXXFLAGS'] = os.environ['CFLAGS'] + ' -fno-exceptions'

nakyup avatar Mar 29 '16 23:03 nakyup

The question is why -fno-rtti was needed previously. It may enable it to build but it may not run or so. @sdroege ?

superdump avatar Mar 30 '16 04:03 superdump

This is sufficient to make that one recipe build:

diff --git a/recipes/icu.recipe b/recipes/icu.recipe
index bc75dc4..93957d4 100644
--- a/recipes/icu.recipe
+++ b/recipes/icu.recipe
@@ -84,7 +84,7 @@ class Recipe(recipe.Recipe):
             # http://www.kandroid.org/ndk/docs/CPLUSPLUS-SUPPORT.html
             gnustl_libs = shell.check_call('$PKG_CONFIG --libs gnustl',
                                                shell=True, split=False).strip()
-            self.append_env['CXXFLAGS'] = ' ' + gnustl_includes
+            self.append_env['CXXFLAGS'] = ' ' + gnustl_includes + ' -frtti '
             self.append_env['LDFLAGS'] = ' -B' + ldflags1 + ' ' + gnustl_libs

     @modify_environment

But I don't know what the impact is on Android.

superdump avatar Apr 12 '16 20:04 superdump

@superdump ok, I will try it again. thanks a lot.

wangchauyan avatar Apr 13 '16 00:04 wangchauyan

@superdump,

after updating the recipe and re-build, I got these errors

checking pkg-config is at least version 0.9.0... yes
checking for GST... yes
checking to see if compiler understands -Wall... yes
checking usrsctp.h usability... yes
checking usrsctp.h presence... yes
checking for usrsctp.h... yes
checking for usrsctp_init in -lusrsctp... no
configure: error: You need libusrsctp for the build
Running command 'mkdir -p m4 && autoreconf -fiv'
Running command './configure --prefix /Users/ChauyanWang/cerbero/dist/android_armv7 --libdir /Users/ChauyanWang/cerbero/dist/android_armv7/lib              --enable-shared             --enable-static             --disable-erdtls             --disable-debug             --disable-static-plugins             --disable-android-plugins             --disable-osx-plugins             --disable-linux-plugins --disable-colorspace-converter --enable-android-plugins                 DX="/Users/ChauyanWang/cerbero/build-tools/opt/android-sdk/build-tools/android-4.4W/dx" --disable-maintainer-mode  --disable-silent-rules  --disable-introspection  --host=arm-linux-androideabi'

Recipe 'openwebrtc-gst-plugins' failed at the build step 'configure'
Select an action to proceed:
[0] Enter the shell
[1] Rebuild the recipe from scratch
[2] Rebuild starting from the failed step
[3] Skip recipe
[4] Abort

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for gcc... arm-linux-androideabi-gcc -fuse-ld=gold
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/Users/ChauyanWang/cerbero/sources/android_armv7/openwebrtc-gst-plugins-0.3.0':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

I try to brew install libusrsctp and enter shell to re-configure. But it doesn't work.

Any suggestions ?

wangchauyan avatar Apr 13 '16 09:04 wangchauyan

Please attach the config.log of the failed configure run here. Also you don't need to install anything with brew

sdroege avatar Apr 13 '16 09:04 sdroege

@superdump I can't remember why rtti was disabled. I guess not all STLs available on Android support(ed) it?

sdroege avatar Apr 13 '16 09:04 sdroege

@sdroege

Please check these logs.

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by openwebrtc-gst-plugins configure 0.10.0, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure 

## --------- ##
## Platform. ##
## --------- ##

hostname = ChauyantekiAir2
uname -m = x86_64
uname -r = 15.4.0
uname -s = Darwin
uname -v = Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
     Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64
Kernel configured for up to 8 processors.
4 processors are physically available.
8 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 16.00 gigabytes
Default processor set: 331 tasks, 1807 threads, 8 processors
Load average: 1.76, Mach factor: 6.23
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /Users/ChauyanWang/cerbero/build-tools/bin
PATH: /Users/ChauyanWang/cerbero/android-ndk-r11
PATH: /Users/ChauyanWang/cerbero/android-ndk-r11/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin
PATH: /Users/ChauyanWang/cerbero/android-ndk-r11
PATH: /Users/ChauyanWang/cerbero/android-ndk-r11/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin
PATH: /Users/ChauyanWang/.rvm/gems/ruby-2.2.1/bin
PATH: /Users/ChauyanWang/.rvm/gems/ruby-2.2.1@global/bin
PATH: /Users/ChauyanWang/.rvm/rubies/ruby-2.2.1/bin
PATH: /Users/ChauyanWang/.opam/4.02.1/bin
PATH: /usr/local/heroku/bin
PATH: /Library/Frameworks/Python.framework/Versions/3.4/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /opt/X11/bin
PATH: /usr/local/go/bin
PATH: /Users/ChauyanWang/.rvm/bin
PATH: /Users/ChauyanWang/.rvm/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2521: checking for a BSD-compatible install
configure:2589: result: /usr/bin/install -c
configure:2600: checking whether build environment is sane
configure:2655: result: yes
configure:2806: checking for a thread-safe mkdir -p
configure:2845: result: ./install-sh -c -d
configure:2852: checking for gawk
configure:2882: result: no
configure:2852: checking for mawk
configure:2882: result: no
configure:2852: checking for nawk
configure:2882: result: no
configure:2852: checking for awk
configure:2868: found /usr/bin/awk
configure:2879: result: awk
configure:2890: checking whether make sets $(MAKE)
configure:2912: result: yes
configure:2941: checking whether make supports nested variables
configure:2958: result: yes
configure:3086: checking whether to enable maintainer-specific portions of Makefiles
configure:3095: result: yes
configure:3157: checking for gcc
configure:3184: result: arm-linux-androideabi-gcc -fuse-ld=gold
configure:3413: checking for C compiler version
configure:3422: arm-linux-androideabi-gcc -fuse-ld=gold --version >&5
arm-linux-androideabi-gcc (GCC) 4.9 20150123 (prerelease)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3433: $? = 0
configure:3422: arm-linux-androideabi-gcc -fuse-ld=gold -v >&5
Using built-in specs.
COLLECT_GCC=arm-linux-androideabi-gcc
COLLECT_LTO_WRAPPER=/Users/ChauyanWang/cerbero/android-ndk-r11/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../libexec/gcc/arm-linux-androideabi/4.9/lto-wrapper
Target: arm-linux-androideabi
Configured with: /Volumes/Android/buildbot/src/android/gcc/toolchain/build/../gcc/gcc-4.9/configure --prefix=/tmp/a207dc16dfb8d03d771bc7b48db766a1 --target=arm-linux-androideabi --host=x86_64-apple-darwin --build=x86_64-apple-darwin --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/buildbot/tmp/build/toolchain/temp-install --with-mpfr=/buildbot/tmp/build/toolchain/temp-install --with-mpc=/buildbot/tmp/build/toolchain/temp-install --with-cloog=/buildbot/tmp/build/toolchain/temp-install --with-isl=/buildbot/tmp/build/toolchain/temp-install --with-ppl=/buildbot/tmp/build/toolchain/temp-install --disable-ppl-version-check --disable-cloog-version-check --disable-isl-version-check --enable-cloog-backend=isl --with-host-libstdcxx='-static-libgcc -lstdc++ -lm' --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --disable-libitm --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --enable-initfini-array --disable-nls --prefix=/tmp/a207dc16dfb8d03d771bc7b48db766a1 --with-sysroot=/tmp/a207dc16dfb8d03d771bc7b48db766a1/sysroot --with-binutils-version=2.25 --with-mpfr-version=3.1.1 --with-mpc-version=1.0.1 --with-gmp-version=5.0.5 --with-gcc-version=4.9 --with-gdb-version=none --with-gxx-include-dir=/tmp/a207dc16dfb8d03d771bc7b48db766a1/include/c++/4.9 --with-bugurl=http://source.android.com/source/report-bugs.html --enable-languages=c,c++ --disable-bootstrap --enable-plugins --enable-libgomp --enable-gnu-indirect-function --disable-libsanitizer --enable-gold --enable-threads --enable-eh-frame-hdr-for-static --enable-graphite=yes --with-isl-version=0.11.1 --with-cloog-version=0.18.0 --with-arch=armv5te --program-transform-name='s&^&arm-linux-androideabi-&' --enable-gold=default
Thread model: posix
gcc version 4.9 20150123 (prerelease) (GCC) 
configure:3433: $? = 0
configure:3422: arm-linux-androideabi-gcc -fuse-ld=gold -V >&5
arm-linux-androideabi-gcc: error: unrecognized command line option '-V'
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
configure:3433: $? = 1
configure:3422: arm-linux-androideabi-gcc -fuse-ld=gold -qversion >&5
arm-linux-androideabi-gcc: error: unrecognized command line option '-qversion'
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
configure:3433: $? = 1
configure:3453: checking whether the C compiler works
configure:3475: arm-linux-androideabi-gcc -fuse-ld=gold -Wall -g -Os --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fPIC -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64  -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -DPIC -D__ARM_ARCH_7A__  -Wa,--noexecstack --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -DANDROID -DPIC -D__ARM_ARCH_7A__  -L/Users/ChauyanWang/cerbero/dist/android_armv7/lib --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -fPIC -no-canonical-prefixes -Wl,-no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-dynamic-linker,/system/bin/linker  -Wl,-z,nocopyreloc  -L/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/lib -march=armv7-a -Wl,--fix-cortex-a8  conftest.c  >&5
configure:3479: $? = 0
configure:3527: result: yes
configure:3530: checking for C compiler default output file name
configure:3532: result: a.out
configure:3538: checking for suffix of executables
configure:3545: arm-linux-androideabi-gcc -fuse-ld=gold -o conftest -Wall -g -Os --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fPIC -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64  -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -DPIC -D__ARM_ARCH_7A__  -Wa,--noexecstack --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -DANDROID -DPIC -D__ARM_ARCH_7A__  -L/Users/ChauyanWang/cerbero/dist/android_armv7/lib --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -fPIC -no-canonical-prefixes -Wl,-no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-dynamic-linker,/system/bin/linker  -Wl,-z,nocopyreloc  -L/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/lib -march=armv7-a -Wl,--fix-cortex-a8  conftest.c  >&5
configure:3549: $? = 0
configure:3571: result: 
configure:3593: checking whether we are cross compiling
configure:3601: arm-linux-androideabi-gcc -fuse-ld=gold -o conftest -Wall -g -Os --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fPIC -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64  -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -DPIC -D__ARM_ARCH_7A__  -Wa,--noexecstack --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -DANDROID -DPIC -D__ARM_ARCH_7A__  -L/Users/ChauyanWang/cerbero/dist/android_armv7/lib --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -fPIC -no-canonical-prefixes -Wl,-no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-dynamic-linker,/system/bin/linker  -Wl,-z,nocopyreloc  -L/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/lib -march=armv7-a -Wl,--fix-cortex-a8  conftest.c  >&5
configure:3605: $? = 0
configure:3612: ./conftest
./configure: line 3614: ./conftest: cannot execute binary file
configure:3616: $? = 126
configure:3623: error: in `/Users/ChauyanWang/cerbero/sources/android_armv7/openwebrtc-gst-plugins-0.3.0':
configure:3625: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CCASFLAGS_set=
ac_cv_env_CCASFLAGS_value=
ac_cv_env_CCAS_set=
ac_cv_env_CCAS_value=
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value='arm-linux-androideabi-gcc -fuse-ld=gold'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-Wall -g -Os --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fPIC -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64  -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -DPIC -D__ARM_ARCH_7A__  -Wa,--noexecstack'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value='--sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -DANDROID -DPIC -D__ARM_ARCH_7A__ '
ac_cv_env_CPP_set=set
ac_cv_env_CPP_value=arm-linux-androideabi-cpp
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-Wall -g -Os --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fPIC -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64  -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -DPIC -D__ARM_ARCH_7A__  -Wa,--noexecstack -fno-exceptions'
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value='arm-linux-androideabi-g++ -fuse-ld=gold'
ac_cv_env_GST_CFLAGS_set=
ac_cv_env_GST_CFLAGS_value=
ac_cv_env_GST_LIBS_set=
ac_cv_env_GST_LIBS_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-L/Users/ChauyanWang/cerbero/dist/android_armv7/lib --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -fPIC -no-canonical-prefixes -Wl,-no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-dynamic-linker,/system/bin/linker  -Wl,-z,nocopyreloc  -L/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/lib -march=armv7-a -Wl,--fix-cortex-a8 '
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_OBJCFLAGS_set=set
ac_cv_env_OBJCFLAGS_value='-Wall -g -Os '
ac_cv_env_OBJC_set=
ac_cv_env_OBJC_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=set
ac_cv_env_PKG_CONFIG_LIBDIR_value=/Users/ChauyanWang/cerbero/dist/android_armv7/lib/pkgconfig
ac_cv_env_PKG_CONFIG_PATH_set=set
ac_cv_env_PKG_CONFIG_PATH_value=/Users/ChauyanWang/cerbero/dist/android_armv7/share/pkgconfig
ac_cv_env_PKG_CONFIG_set=set
ac_cv_env_PKG_CONFIG_value=/Users/ChauyanWang/cerbero/build-tools/bin/pkg-config
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_func_nonposix_getgrgid_r=no
ac_cv_func_nonposix_getpwuid_r=no
ac_cv_func_posix_getgrgid_r=no
ac_cv_func_posix_getpwuid_r=no
ac_cv_func_uselocale=no
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=awk
ac_cv_prog_ac_ct_CC='arm-linux-androideabi-gcc -fuse-ld=gold'
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes
ax_cv_c_float_words_bigendian=no
glib_cv_stack_grows=yes
glib_cv_uscore=no

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='aclocal'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
ANDROID_CLASSPATH=''
AR='arm-linux-androideabi-ar'
AUTOCONF='${SHELL} /Users/ChauyanWang/cerbero/sources/android_armv7/openwebrtc-gst-plugins-0.3.0/missing autoconf'
AUTOHEADER='${SHELL} /Users/ChauyanWang/cerbero/sources/android_armv7/openwebrtc-gst-plugins-0.3.0/missing autoheader'
AUTOMAKE='${SHELL} /Users/ChauyanWang/cerbero/sources/android_armv7/openwebrtc-gst-plugins-0.3.0/missing automake-1.15'
AWK='awk'
BUILD_ANDROID_PLUGINS_FALSE=''
BUILD_ANDROID_PLUGINS_TRUE=''
BUILD_ERCOLORSPACE_FALSE=''
BUILD_ERCOLORSPACE_NEON_FALSE=''
BUILD_ERCOLORSPACE_NEON_TRUE=''
BUILD_ERCOLORSPACE_TRUE=''
BUILD_LINUX_PLUGINS_FALSE=''
BUILD_LINUX_PLUGINS_TRUE=''
BUILD_OSX_PLUGINS_FALSE=''
BUILD_OSX_PLUGINS_TRUE=''
CC='arm-linux-androideabi-gcc -fuse-ld=gold'
CCAS=''
CCASDEPMODE=''
CCASFLAGS=''
CCDEPMODE=''
CFLAGS='-Wall -g -Os --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fPIC -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64  -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -DPIC -D__ARM_ARCH_7A__  -Wa,--noexecstack'
CPP='arm-linux-androideabi-cpp'
CPPFLAGS='--sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -DANDROID -DPIC -D__ARM_ARCH_7A__ '
CXX='arm-linux-androideabi-g++ -fuse-ld=gold'
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS='-Wall -g -Os --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -I/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/include -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fPIC -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64  -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -DPIC -D__ARM_ARCH_7A__  -Wa,--noexecstack -fno-exceptions'
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
DX=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
ENABLE_DEBUG_FALSE=''
ENABLE_DEBUG_TRUE=''
EXEEXT=''
FGREP=''
GREP=''
GST_CFLAGS=''
GST_LIBS=''
GST_OBJCFLAGS=''
GST_PLUGIN_BUILD_STATIC_FALSE=''
GST_PLUGIN_BUILD_STATIC_TRUE=''
GST_PLUGIN_LDFLAGS=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
JAVAC=''
LD='arm-linux-androideabi-ld.gold'
LDFLAGS='-L/Users/ChauyanWang/cerbero/dist/android_armv7/lib --sysroot=/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm -fPIC -no-canonical-prefixes -Wl,-no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-dynamic-linker,/system/bin/linker  -Wl,-z,nocopyreloc  -L/Users/ChauyanWang/cerbero/android-ndk-r11/platforms/android-9/arch-arm/usr/lib -march=armv7-a -Wl,--fix-cortex-a8 '
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
MAINT=''
MAINTAINER_MODE_FALSE='#'
MAINTAINER_MODE_TRUE=''
MAKEINFO='${SHELL} /Users/ChauyanWang/cerbero/sources/android_armv7/openwebrtc-gst-plugins-0.3.0/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='./install-sh -c -d'
NM='arm-linux-androideabi-nm'
NMEDIT=''
OBJC=''
OBJCDEPMODE=''
OBJCFLAGS='-Wall -g -Os '
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='openwebrtc-gst-plugins'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='openwebrtc-gst-plugins'
PACKAGE_STRING='openwebrtc-gst-plugins 0.10.0'
PACKAGE_TARNAME='openwebrtc-gst-plugins'
PACKAGE_URL=''
PACKAGE_VERSION='0.10.0'
PATH_SEPARATOR=':'
PKG_CONFIG='/Users/ChauyanWang/cerbero/build-tools/bin/pkg-config'
PKG_CONFIG_LIBDIR='/Users/ChauyanWang/cerbero/dist/android_armv7/lib/pkgconfig'
PKG_CONFIG_PATH='/Users/ChauyanWang/cerbero/dist/android_armv7/share/pkgconfig'
RANLIB='arm-linux-androideabi-ranlib'
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP='arm-linux-androideabi-strip'
TARGET_PLATFORM_ANDROID_FALSE=''
TARGET_PLATFORM_ANDROID_TRUE=''
TARGET_PLATFORM_IOS_FALSE=''
TARGET_PLATFORM_IOS_SIMULATOR_FALSE=''
TARGET_PLATFORM_IOS_SIMULATOR_TRUE=''
TARGET_PLATFORM_IOS_TRUE=''
TARGET_PLATFORM_LINUX_FALSE=''
TARGET_PLATFORM_LINUX_TRUE=''
TARGET_PLATFORM_OSX_FALSE=''
TARGET_PLATFORM_OSX_TRUE=''
USRSCTP_LIBS=''
VERSION='0.10.0'
XXD=''
ac_ct_AR=''
ac_ct_CC='arm-linux-androideabi-gcc -fuse-ld=gold'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
ac_ct_OBJC=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCCAS_FALSE=''
am__fastdepCCAS_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__fastdepOBJC_FALSE=''
am__fastdepOBJC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /Users/ChauyanWang/cerbero/sources/android_armv7/openwebrtc-gst-plugins-0.3.0/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
plugindir=''
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "openwebrtc-gst-plugins"
#define PACKAGE_TARNAME "openwebrtc-gst-plugins"
#define PACKAGE_VERSION "0.10.0"
#define PACKAGE_STRING "openwebrtc-gst-plugins 0.10.0"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "openwebrtc-gst-plugins"
#define VERSION "0.10.0"

configure: exit 1

wangchauyan avatar Apr 13 '16 09:04 wangchauyan

Why does it detect the android compiler as the native one and tries to execute the resulting binaries? It should consider it as a cross compiler, and it does so here. Might be because it doesn't detect the host target?

/usr/bin/uname -p = i386 /bin/uname -X = unknown ... /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown

sdroege avatar Apr 13 '16 10:04 sdroege

I have built Mac OS host and then try to build android target. I am not sure if I need to do other settings before building android target.

But I built android target before and can make it. After pulling new code from server, and then I can't build android now.

So, do I need to do anything for fixing this error ?

wangchauyan avatar Apr 13 '16 10:04 wangchauyan

No, it's probably something special with your system that we don't consider

sdroege avatar Apr 13 '16 10:04 sdroege