Hello,
I am currently trying to build no gui version of linphone SDK
using yocto for an arm device. I am using the following bitbake
recipe.
The current git depository of meta-bc currently supports version
2.5 of yocto (and lower) while i am using yocto 2.7 (warrior).
DESCRIPTION = "WIP LINPHONE-SDK Audio/video SIP-based IP phone
(console edition)"
LICENSE = "GPLv2"
HOMEPAGE =
"http://www.linphone.org/technical-corner/linphone/overview"
SECTION = "network"
SECTION_linphonec = "console/network"
INC_PR = "r0"
DEPENDS = "yasm-native nasm-native git-native doxygen-native
python-pystache-native python-six-native mariadb pulseaudio
alsa-lib virtual/gettext sqlite3 mariadb zlib perl-native"
PROVIDES = "linphone-sdk"
RPROVIDES_${PN} = "bcunit bctoolbox belle-sip belr belcard \
ortp mediastreamer2 bcg729 bzrtp lime \
mswebrtc speex speexdsp \
liblinphone linphonec"
S = "${WORKDIR}/git"
inherit cmakebuilder gettext pythonnative pkgconfig chrpath
perlnative
PACKAGECONFIG ??= "sqlite zlib bzrtp
${@bb.utils.contains('DISTRO_FEATURES','x11', 'video', '', d)}"
PACKAGECONFIG[sqlite] = "-DENABLE_SQLITE_STORAGE=yes,
-DENABLE_SQLITE_STORAGE=no"
PACKAGECONFIG[zlib] = ", --disable-zlib, zlib"
PACKAGECONFIG[video]= " -DENABLE_NON_FREE_CODECS=ON
-DENABLE_OPENH264=ON -DENABLE_EMBEDDED_OPENH264=ON
-DENABLE_X11=YES -DENABLE_XV=YES -DENABLE_GLX=ON
-DENABLE_GL=NO,-DENABLE_VIDEO=YES ,libv4l libxv virtual/libgl
glew"
PACKAGECONFIG[bzrtp]= " -DENABLE_BZRTP=YES, -DENABLE_BZRTP=NO"
PACKAGECONFIG[mdns]= "-DENABLE_MDNS=YES,-DENABLE_MDNS=NO"
EXTRA_OECMAKE ??= " "
EXTRA_OECMAKE += " -DENABLE_CONSOLE_UI=NO -DENABLE_GTK_UI=NO
-DENABLE_CXX_WRAPPER=YES -DENABLE_VCARD=YES -DENABLE_VPX=NO
-DENABLE_XML2=NO -DENABLE_SQLITE=NO -DENABLE_ZLIB=NO
-DENABLE_SOCI_MYSQL=YES"
EXTRA_OECMAKE += " -DENABLE_UNIT_TESTS=YES -DENABLE_TESTS=YES"
#EXTRA_OECMAKE += " -DENABLE_UNIT_TESTS=NO -DENABLE_TESTS=NO"
#Force cmake cross-compiling
EXTRA_OECMAKE += " -DCMAKE_CROSSCOMPILING=YES"
EXTRA_OECMAKE += "
-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake"
BUILD_INSTALL_PREFIX = "${WORKDIR}/git/linphone-sdk/desktop"
INSTALL_PATH = "/opt/belledonne-communications"
BUILD_INSTALL_PATH = "${BUILD_INSTALL_PREFIX}${INSTALL_PATH}"
#Used by cmake.bbclass to add the temporary target directory as
root for find_package, required to find correct libraries
directories
OECMAKE_EXTRA_ROOT_PATH = "${BUILD_INSTALL_PATH}"
EXTRA_OECMAKE += "
-DCMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES=${STAGING_INCDIR}"
EXTRA_OECMAKE += "
-DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES=${STAGING_INCDIR}"
#The actual target installation prefix when cross-compiling
EXTRA_OECMAKE += " -DCMAKE_STAGING_PREFIX=${BUILD_INSTALL_PATH}"
EXTRA_OECMAKE += " -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}"
EXTRA_OECMAKE += " -DCMAKE_SKIP_RPATH=YES"
EXTRA_OECMAKE += "
-DCMAKE_EXE_LINKER_FLAGS='-Wl,-rpath-link=${BUILD_INSTALL_PATH}/lib
-Wl,-rpath=${INSTALL_PATH}/lib'"
EXTRA_OECMAKE += "
-DCMAKE_SHARED_LINKER_FLAGS='-Wl,-rpath=${INSTALL_PATH}/lib
-Wl,-rpath-link=${BUILD_INSTALL_PATH}/lib'"
EXTRA_OECMAKE += "
-DCMAKE_MODULE_LINKER_FLAGS='-Wl,-rpath=${INSTALL_PATH}/lib
-Wl,-rpath-link=${BUILD_INSTALL_PATH}/lib'"
#Apply default linker flags provided by Yocto.
#This avoids 'No GNU_HASH in the elf binary' error as documented
#in
https://www.yoctoproject.org/docs/2.0.1/ref-manual/ref-manual.html#qa-issue-ldflags
.
TARGET_CC_ARCH += "${LDFLAGS}"
PACKAGES = "${PN} ${PN}-dev ${PN}-dbg"
FILES_${PN} += "${INSTALL_PATH}/bin/*"
FILES_${PN} += "${INSTALL_PATH}/lib/*"
FILES_${PN} += "${INSTALL_PATH}/share/*"
FILES_${PN}-dev = "${INSTALL_PATH}/include/*"
SYSROOT_DIRS += "/opt"
do_install_append () {
#Do not include generated and installed cmake/pkgconfig files
to the target package
rm -rf "${BUILD_INSTALL_PATH}/cmake"
rm -rf "${BUILD_INSTALL_PATH}/lib/pkgconfig"
install -m 0755 -d ${D}${INSTALL_PATH}/bin
${D}${INSTALL_PATH}/lib ${D}${INSTALL_PATH}/include
${D}${INSTALL_PATH}/share
cp -r ${BUILD_INSTALL_PATH}/bin/* ${D}${INSTALL_PATH}/bin
cp -r ${BUILD_INSTALL_PATH}/lib/* ${D}${INSTALL_PATH}/lib
cp -r ${BUILD_INSTALL_PATH}/share/* ${D}${INSTALL_PATH}/share
cp -r ${BUILD_INSTALL_PATH}/include/*
${D}${INSTALL_PATH}/include
}
#Allow non-symlink .so files and static libraries in ${PN} package
INSANE_SKIP_${PN} += "dev-so staticdev already-stripped"
I am facing the following issue when trying to build open h264
(building with only audio support works fine) :
g++: error: unrecognized command line option '-m64'
I can't find any instance of '-m64' in makefile or cmake file.
cd /home/tvuillemin/work/yocto/build/tmp/work/cortexa9t2hf-neon-phytec-linux-gnueabi/linphone-sdk/git_d4ab91f970d419382dd024ee53e2efdffeacc16d-r0.0/build/WORK/desktop/Build/openh264 && /home/tvuillemin/work/yocto/build/tmp/work/cortexa9t2hf-neon-phytec-linux-gnueabi/linphone-sdk/git_d4ab91f970d419382dd024ee53e2efdffeacc16d-r0.0/build/desktop/EP_openh264_build.sh && /home/tvuillemin/work/yocto/build/tmp/work/cortexa9t2hf-neon-phytec-linux-gnueabi/linphone-sdk/git_d4ab91f970d419382dd024ee53e2efdffeacc16d-r0.0/recipe-sysroot-native/usr/bin/cmake -E touch /home/tvuillemin/work/yocto/build/tmp/work/cortexa9t2hf-neon-phytec-linux-gnueabi/linphone-sdk/git_d4ab91f970d419382dd024ee53e2efdffeacc16d-r0.0/build/WORK/desktop//Stamp/EP_openh264/EP_openh264-build
| FAILED: /home/tvuillemin/work/yocto/build/tmp/work/cortexa9t2hf-neon-phytec-linux-gnueabi/linphone-sdk/git_d4ab91f970d419382dd024ee53e2efdffeacc16d-r0.0/build/WORK/desktop/Stamp/EP_openh264/EP_openh264-build
| cd /home/tvuillemin/work/yocto/build/tmp/work/cortexa9t2hf-neon-phytec-linux-gnueabi/linphone-sdk/git_d4ab91f970d419382dd024ee53e2efdffeacc16d-r0.0/build/WORK/desktop/Build/openh264 && /home/tvuillemin/work/yocto/build/tmp/work/cortexa9t2hf-neon-phytec-linux-gnueabi/linphone-sdk/git_d4ab91f970d419382dd024ee53e2efdffeacc16d-r0.0/build/desktop/EP_openh264_build.sh && /home/tvuillemin/work/yocto/build/tmp/work/cortexa9t2hf-neon-phytec-linux-gnueabi/linphone-sdk/git_d4ab91f970d419382dd024ee53e2efdffeacc16d-r0.0/recipe-sysroot-native/usr/bin/cmake -E touch /home/tvuillemin/work/yocto/build/tmp/work/cortexa9t2hf-neon-phytec-linux-gnueabi/linphone-sdk/git_d4ab91f970d419382dd024ee53e2efdffeacc16d-r0.0/build/WORK/desktop//Stamp/EP_openh264/EP_openh264-build
| mkdir -p codec/common/arm/
| mkdir -p codec/common/arm64/
| mkdir -p codec/common/mips/
| mkdir -p codec/common/src/
| mkdir -p codec/common/x86/
| mkdir -p codec/console/common/src/
| mkdir -p codec/console/dec/src/
| mkdir -p codec/console/enc/src/
| mkdir -p codec/decoder/core/arm/
| mkdir -p codec/decoder/core/arm64/
| mkdir -p codec/decoder/core/mips/
| mkdir -p codec/decoder/core/src/
| mkdir -p codec/decoder/core/x86/
| mkdir -p codec/decoder/plus/src/
| mkdir -p codec/encoder/core/arm/
| mkdir -p codec/encoder/core/arm64/
| mkdir -p codec/encoder/core/mips/
| mkdir -p codec/encoder/core/src/
| mkdir -p codec/encoder/core/x86/
| mkdir -p codec/encoder/plus/src/
| mkdir -p codec/processing/src/adaptivequantization/
| mkdir -p codec/processing/src/arm/
| mkdir -p codec/processing/src/arm64/
| mkdir -p codec/processing/src/backgrounddetection/
| mkdir -p codec/processing/src/common/
| mkdir -p codec/processing/src/complexityanalysis/
| mkdir -p codec/processing/src/denoise/
| mkdir -p codec/processing/src/downsample/
| mkdir -p codec/processing/src/imagerotate/
| mkdir -p codec/processing/src/mips/
| mkdir -p codec/processing/src/scenechangedetection/
| mkdir -p codec/processing/src/scrolldetection/
| mkdir -p codec/processing/src/vaacalc/
| mkdir -p codec/processing/src/x86/
| /home/tvuillemin/work/yocto/build/tmp/work/cortexa9t2hf-neon-phytec-linux-gnueabi/linphone-sdk/git_d4ab91f970d419382dd024ee53e2efdffeacc16d-r0.0/recipe-sysroot-native/usr/bin/arm-phytec-linux-gnueabi/arm-phytec-linux-gnueabi-g++ -O3 -DNDEBUG -m64 -DX86_ASM -DHAVE_AVX2 -Wall -fno-strict-aliasing -fPIC -MMD -MP -fstack-protector-all -DGENERATED_VERSION_HEADER -DHAVE_AVX2 -I../../../../..//git/external/openh264/codec/api/svc -I../../../../..//git/external/openh264/codec/common/inc -Icodec/common/inc -c -o codec/common/src/common_tables.o ../../../../..//git/external/openh264/codec/common/src/common_tables.cpp
| arm-phytec-linux-gnueabi-g++: error: unrecognized command line option '-m64'
| make: *** [../../../../..//git/external/openh264/codec/common/
targets.mk:95: codec/common/src/common_tables.o] Error 1