linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] newbie trying to cross compile G729 library for AR


From: Michael Jacobson
Subject: [Linphone-developers] newbie trying to cross compile G729 library for ARM9
Date: Wed, 3 Oct 2018 22:00:52 +0000

So, as the subject states, i am very much a newbie. i am new to linux in general, new to open source libraries, new to mailing lists, etc etc...i am also new to cmake and makefiles, also to configure and autogen stuff so i am pretty lost.


so i am sure this is very basic but i am having a heck of a time finding something that works.


i am running on Ubuntu 16.04, i am trying to compile the static libbcg729.a file for the bcg729 library on my ARM AM4378 A9 processor target. the goal is to use the library in a c project to handle g729 encode and decode. ‚Äč


our SDK provides a file that preloads a bunch of environment variables for us when we wish to compile projects. the file looks like this:


SDK_PATH="/home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/linux-devkit"
if [ -z "$ZSH_NAME" ] && [ "x$0" = "x./environment-setup" ]; then
    echo "Error: This script needs to be sourced. Please run as \". ./environment-setup\""
    exit 1
else
    if [ -n "$BASH_SOURCE" ]; then
        SDK_PATH="`dirname $BASH_SOURCE`"
    fi
    SDK_PATH=`readlink -f "$SDK_PATH"`
    export SDK_PATH
fi
export SDK_SYS=x86_64-arago-linux
export REAL_MULTIMACH_TARGET_SYS=armv7ahf-neon-linux-gnueabi
export TOOLCHAIN_SYS=arm-linux-gnueabihf
export TOOLCHAIN_PREFIX=$TOOLCHAIN_SYS-
export SDK_PATH_NATIVE=$SDK_PATH/sysroots/$SDK_SYS
export SDK_PATH_TARGET=$SDK_PATH/sysroots/$REAL_MULTIMACH_TARGET_SYS
export PATH=$SDK_PATH_NATIVE/usr/bin:$SDK_PATH_NATIVE/usr/bin/arm-linux-gnueabi:$PATH
export CPATH=$SDK_PATH_TARGET/usr/include:$CPATH
export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH_TARGET
export PKG_CONFIG_PATH=$SDK_PATH_TARGET/usr/lib/pkgconfig
export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
export CONFIG_SITE=$SDK_PATH/site-config-$REAL_MULTIMACH_TARGET_SYS
export CC=${TOOLCHAIN_PREFIX}gcc
export CXX=${TOOLCHAIN_PREFIX}g++
export GDB=${TOOLCHAIN_PREFIX}gdb
export CPP="${TOOLCHAIN_PREFIX}gcc -E"
export NM=${TOOLCHAIN_PREFIX}nm
export AS=${TOOLCHAIN_PREFIX}as
export AR=${TOOLCHAIN_PREFIX}ar
export RANLIB=${TOOLCHAIN_PREFIX}ranlib
export OBJCOPY=${TOOLCHAIN_PREFIX}objcopy
export OBJDUMP=${TOOLCHAIN_PREFIX}objdump
export STRIP=${TOOLCHAIN_PREFIX}strip
export CONFIGURE_FLAGS="--target=arm-linux-gnueabi --host=arm-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=$SDK_PATH_TARGET"
export CPPFLAGS=" -march=armv7-a -marm -mfpu=neon  -mfloat-abi=hard --sysroot=$SDK_PATH_TARGET"
export CFLAGS="$CPPFLAGS"
export CXXFLAGS="$CPPFLAGS"
export LDFLAGS=" --sysroot=$SDK_PATH_TARGET"
export OECORE_NATIVE_SYSROOT=$SDK_PATH_NATIVE
export OECORE_TARGET_SYSROOT=$SDK_PATH_TARGET
export OECORE_ACLOCAL_OPTS="-I $SDK_PATH_NATIVE/usr/share/aclocal"
export OECORE_DISTRO_VERSION="2017.12"
export OECORE_SDK_VERSION="2017.12"
export PS1="\[\e[32;1m\][linux-devkit]\[\e[0m\]:\w> "
export PATH=$SDK_PATH_NATIVE/usr/bin/qt5:$PATH
export OE_QMAKE_CFLAGS="$CFLAGS"
export OE_QMAKE_CXXFLAGS="$CXXFLAGS"
export OE_QMAKE_LDFLAGS="$LDFLAGS"
export OE_QMAKE_CC=$CC
export OE_QMAKE_CXX=$CXX
export OE_QMAKE_LINK=$CXX
export OE_QMAKE_AR=$AR
export OE_QMAKE_LIBDIR_QT=$SDK_PATH_TARGET/usr/lib
export OE_QMAKE_INCDIR_QT=$SDK_PATH_TARGET/usr/include/qt5
export OE_QMAKE_HOST_BINDIR_QT=$SDK_PATH_NATIVE/usr/bin/qt5/
export OE_QMAKE_MOC=$SDK_PATH_NATIVE/usr/bin/qt5/moc
export OE_QMAKE_UIC=$SDK_PATH_NATIVE/usr/bin/qt5/uic
export OE_QMAKE_UIC3=$SDK_PATH_NATIVE/usr/bin/qt5/uic3
export OE_QMAKE_RCC=$SDK_PATH_NATIVE/usr/bin/qt5/rcc
export OE_QMAKE_QDBUSCPP2XML=$SDK_PATH_NATIVE/usr/bin/qt5/qdbuscpp2xml
export OE_QMAKE_QDBUSXML2CPP=$SDK_PATH_NATIVE/usr/bin/qt5/qdbusxml2cpp
export OE_QMAKE_QT_CONFIG=$SDK_PATH_TARGET/usr/lib/qt5/mkspecs/qconfig.pri
export OE_QMAKE_STRIP="echo"
export QMAKESPEC=$SDK_PATH_TARGET/usr/lib/qt5/mkspecs/linux-oe-g++
export QMAKE_DEFAULT_LIBDIRS=${QT_QMAKE_LIBDIR_QT}
export QMAKE_DEFAULT_INCDIRS=${QT_QMAKE_INCDIR_QT}


i assume that i need to "source" this file before i run any of the make/configure scripts. that might be my first misconception


i found that the normal way to build an open source library for cross compiling is to include "--host=<build tools prefix>" but that seems to apply to libraries that come with a configure file to begin with. with this library the instructions tell me to do a cmake, then a make, but nothing about configuration. furthermore you have to run autogen.sh to get the configuration file. this is quite a few more steps than the general use case i am finding in my search so i can't help but wonder if i am making a mistake on step 1


it also appears that commands need to accompany cmake to enable cross compiling, i've tried a few and every one resulted in:


"Manually-specified variables were not used by the project:"


and when i try to run "./configuration" in my special environment setup with "--host=" i get:


"checking for arm-linux-gnueabihf-gcc... no

checking for gcc... gcc"

so it doesn't seem to be loading my cross compiler

so i'm a bit lost and i am having a hard time finding information online on how to solve my problem. i hope i don't bother too many people with my beginner question but i'm not really sure where to go to ask.

once i have the answer do i have to delete the project and reclone it from git or can i rerun the scripts again where they currently are?

thank you for any help you can provide me





reply via email to

[Prev in Thread] Current Thread [Next in Thread]