Skip to content

Instantly share code, notes, and snippets.

@eduardofilo
Last active September 7, 2016 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eduardofilo/d24d3887d896b51b775fabb8ed712814 to your computer and use it in GitHub Desktop.
Save eduardofilo/d24d3887d896b51b775fabb8ed712814 to your computer and use it in GitHub Desktop.
Error compiling Linphone Android with x264 support
desarrollo@PCDesarrollo:~/linphone-android$ echo $PATH
/home/desarrollo/android-sdk/tools:/home/desarrollo/android-sdk/platform-tools:/home/desarrollo/android-ndk-r11c:/home/desarrollo/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:/home/desarrollo/bin:/home/desarrollo/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
desarrollo@PCDesarrollo:~/linphone-android$ git pull
Already up-to-date.
desarrollo@PCDesarrollo:~/linphone-android$ git submodule update --recursive --init
desarrollo@PCDesarrollo:~/linphone-android$ ./prepare.py -c
desarrollo@PCDesarrollo:~/linphone-android$ ./prepare.py -DENABLE_NON_FREE_CODECS=YES -DENABLE_X264=YES armv7
cmake /home/desarrollo/linphone-android/submodules/cmake-builder -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=/home/desarrollo/linphone-android/liblinphone-sdk/android-armv7 -DCMAKE_INSTALL_PREFIX=/home/desarrollo/linphone-android/liblinphone-sdk/android-armv7 -DCMAKE_NO_SYSTEM_FROM_IMPORTED=YES -DLINPHONE_BUILDER_WORK_DIR=/home/desarrollo/linphone-android/WORK/android-armv7 -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-android-armv7.cmake -DCMAKE_INSTALL_MESSAGE=LAZY -DLINPHONE_BUILDER_CONFIG_FILE=configs/config-android.cmake -DLINPHONE_BUILDER_EXTERNAL_SOURCE_PATH=/home/desarrollo/linphone-android/submodules -DENABLE_NON_FREE_CODECS=YES -DENABLE_X264=YES
-- Using sysroot path: /home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm
-- Using sysroot path: /home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm
-- The C compiler identification is Clang 3.8.243773
-- The CXX compiler identification is Clang 3.8.243773
-- Check for working C compiler: /home/desarrollo/android-ndk-r11c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
-- Check for working C compiler: /home/desarrollo/android-ndk-r11c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/desarrollo/android-ndk-r11c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
-- Check for working CXX compiler: /home/desarrollo/android-ndk-r11c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using toolchain file '/home/desarrollo/linphone-android/submodules/cmake-builder/toolchains/toolchain-android-armv7.cmake'
-- Using configuration file '/home/desarrollo/linphone-android/submodules/cmake-builder/configs/config-android.cmake'
-- Found PythonInterp: /usr/bin/python (found version "2.7.12")
-- Including builder mbedtls
-- Including builder bcunit
-- Including builder bctoolbox
-- Including builder antlr3c
-- Including builder bellesip
-- Including builder ortp
-- Including builder androidcpufeatures
-- Including builder androidsupport
-- Including builder speex
-- Including builder gsm
-- Including builder opus
-- Including builder ffmpeg
-- Including builder ffmpegandroid
-- Including builder vpx
-- Including builder matroska2
-- Including builder srtp
-- Including builder xml2
-- Including builder bzrtp
-- Including builder ms2
-- Including builder mswebrtc
-- Including builder mssilk
-- Including builder x264
-- Including builder msx264
-- Including builder sqlite3
-- Including builder belr
-- Including builder belcard
-- Including builder linphone
-- Using sysroot path: /home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm
-- Using sysroot path: /home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm
-- The C compiler identification is Clang 3.8.243773
-- The CXX compiler identification is Clang 3.8.243773
-- Check for working C compiler: /home/desarrollo/android-ndk-r11c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
-- Check for working C compiler: /home/desarrollo/android-ndk-r11c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/desarrollo/android-ndk-r11c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
-- Check for working CXX compiler: /home/desarrollo/android-ndk-r11c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/desarrollo/linphone-android/WORK/android-armv7/cmake/Autotools
-- Enabled features:
* Unit tests , Build unit tests programs for belle-sip, mediastreamer2 and linphone.
* Documentation , Enable documentation generation with Doxygen.
* Tools , Enable tools binary compilation.
* Mbedtls , Crypto stack implementation based on mbeddtls
* GPL third parties , Usage of GPL third-party code (FFmpeg and x264).
* Non free codecs , Allow inclusion of non-free codecs in the build.
* SRTP , SRTP media encryption support.
* ZRTP , ZRTP media encryption support.
* WebRTC AEC , WebRTC echo canceller support.
* GSM , GSM audio encoding/decoding support.
* iLBC , iLBC audio encoding/decoding support.
* ISAC , ISAC audio encoding/decoding support.
* OPUS , OPUS audio encoding/decoding support.
* Silk , Silk audio encoding/decoding support.
* Speex , Speex audio encoding/decoding support.
* Video , Ability to capture and display video.
* FFmpeg , Some video processing features via FFmpeg: JPEG encoding/decoding, video scaling, H264 decoding...
* MKV , MKV playing and recording support.
* VPX , VPX (VP8) video encoding/decoding support.
* X264 , H.264 video encoding support with the x264 library (require license).
* VCARD , Enable vCard 4 support Linphone and Liblinphone.
-- Disabled features:
* Polarssl , Crypto stack implementation based on polarssl
* Tunnel , Secure tunnel for SIP/RTP (require license).
* RTP MAP , Always include rtpmap in SDP.
* Belledonne Antlr , Do not build the Belledonne version of Antlr3c
* WASAPI , Windows Audio Session API (WASAPI) sound card support.
* AMRNB , AMR narrow-band audio encoding/decoding support (require license).
* AMRWB , AMR wide-band audio encoding/decoding support (require license).
* Codec2 , Codec2 audio encoding/decoding support.
* G729 , G.729 audio encoding/decoding support (require license).
* G729B CNG , G.729 annex B confort noise generation (require license).
* G726 , G.726 audio encoding/decoding support.
* BV16 , BroadVoice 16 audio encoding/decoding support.
* H263 , H263 video encoding/decoding support (require license).
* H263p , H263+ video encoding/decoding support (require license).
* MPEG4 , MPEG4 video encoding/decoding support (require license).
* OpenH264 , H.264 video encoding/decoding support with the openh264 library (require license).
* V4L , V4L camera driver.
* PCAP , PCAP support.
* GTK , Enable the GTK user interface of Linphone.
* NLS , Enable internationalization of Linphone and Liblinphone. (Only for the desktop target)
* Relative prefix , liblinphone and mediastreamer will look for their respective ressources relatively to their location.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/desarrollo/linphone-android/WORK/android-armv7/cmake
INFO: You can now run 'make' to build.
WARNING:
***************************************************************************
***************************************************************************
***** CAUTION, this liblinphone SDK is built using 3rd party GPL code *****
***** Even if you acquired a proprietary license from Belledonne *****
***** Communications, this SDK is GPL and GPL only. *****
***** To disable 3rd party gpl code, please use: *****
***** $ ./prepare.py -DENABLE_GPL_THIRD_PARTIES=NO *****
***************************************************************************
***************************************************************************
desarrollo@PCDesarrollo:~/linphone-android$ make
...
...
Scanning dependencies of target EP_x264
make[3]: Leaving directory '/home/desarrollo/linphone-android/WORK/android-armv7/cmake'
make[3]: Entering directory '/home/desarrollo/linphone-android/WORK/android-armv7/cmake'
[ 70%] Creating directories for 'EP_x264'
[ 71%] No download step for 'EP_x264'
[ 72%] No patch step for 'EP_x264'
[ 72%] No update step for 'EP_x264'
[ 72%] Performing configure step for 'EP_x264'
No working C compiler found.
CMakeFiles/EP_x264.dir/build.make:106: recipe for target '/home/desarrollo/linphone-android/WORK/android-armv7/Stamp/EP_x264/EP_x264-configure' failed
make[3]: *** [/home/desarrollo/linphone-android/WORK/android-armv7/Stamp/EP_x264/EP_x264-configure] Error 1
make[3]: Leaving directory '/home/desarrollo/linphone-android/WORK/android-armv7/cmake'
CMakeFiles/Makefile2:180: recipe for target 'CMakeFiles/EP_x264.dir/all' failed
make[2]: *** [CMakeFiles/EP_x264.dir/all] Error 2
make[2]: Leaving directory '/home/desarrollo/linphone-android/WORK/android-armv7/cmake'
Makefile:83: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/desarrollo/linphone-android/WORK/android-armv7/cmake'
Makefile:159: recipe for target 'armv7-build' failed
make: *** [armv7-build] Error 2
desarrollo@PCDesarrollo:~/linphone-android$ cat WORK/android-armv7/Build/x264/config.log
x264 configure script
Command line options: "--prefix=/home/desarrollo/linphone-android/liblinphone-sdk/android-armv7" "--host=arm-none-linux-gnueabi" "--enable-static" "--enable-pic" "--extra-cflags=" "--extra-ldflags=" "--sysroot=/home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm"
checking whether /home/desarrollo/android-ndk-r11c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang works... no
Failed commandline was:
--------------------------------------------------
/home/desarrollo/android-ndk-r11c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang conftest.c -Wall -I. -I$(SRCPATH) --sysroot=/home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm --sysroot=/home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm -lm -o conftest
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find crtbegin.o: No such file or directory
/usr/bin/ld: skipping incompatible /home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm/usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm/usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm/usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm/usr/lib/libm.a when searching for -lm
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm/usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm/usr/lib/libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm/usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /home/desarrollo/android-ndk-r11c/platforms/android-14/arch-arm/usr/lib/libc.a when searching for -lc
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find crtend.o: No such file or directory
/usr/bin/ld: cannot find crtn.o: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--------------------------------------------------
Failed program was:
--------------------------------------------------
int main () { return 0; }
--------------------------------------------------
DIED: No working C compiler found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment