This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

qtcreator compilation problem with meta-toolchain-qt5

Hi,

I used "arago-daisy-config.txt" with oe-layertool-setup.sh to generate tisdk rootfs using commands:

- MACHINE=am335x-evm bitbake -k tisdk-rootfs-image

I then tried building a toolchain for Qt development for doing steps :

MACHINE=am335x-evm bitbake -k meta-toolchain-qt5

Above step created "arago-2015.05-toolchain-2015.05.sh"  in directory /home/ankur/ti-yocto/oe-layersetup/build/arago-tmp-external-linaro-toolchain/deploy/sdk

Then installed toolchain in directory /home/ankur/toolchain-ti and updated qtcreator/bin/qtcreator.sh to set correct environment variables by adding following line

source /home/ankur/toolchain-ti/environment-setup-cortexa8t2hf-vfp-neon-linux-gnueabi

#! /bin/sh
makeAbsolute() {

Then did setup of Qtcreator 3.4.0 as per http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Hands_on_with_QT

When I compile a simple hello world program, I get following errors:

rm-linux-gnueabihf-g++ -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/home/ankur/toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi -c -pipe -fstack-protector -O2 -pipe -g -feliminate-unused-debug-types -g -Wall -W -D_REENTRANT -fPIE -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../QTQuickDemo_v0.2 -I. -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5 -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtQuick -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtWidgets -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtGui -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtQml -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtNetwork -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtCore -I. -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -o main.o ../QTQuickDemo_v0.2/main.cpp

In file included from ../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtCore/qglobal.h:70:0,

from ../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtCore/qcoreapplication.h:37,

from ../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtWidgets/qapplication.h:37,

from ../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtWidgets/QApplication:1,

from ../QTQuickDemo_v0.2/main.cpp:1:

../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtCore/qcompilerdetection.h:890:20: fatal error: utility: No such file or directory

compilation terminated.

I fixed above by adding following in my .pro file:


INCLUDEPATH += /home/ankur/toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/include/c++/4.7.3
INCLUDEPATH += /home/ankur/toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/include/c++/4.7.3/arm-linux-gnueabihf/arm-linux-gnueabi

Then it gives error :

arm-linux-gnueabihf-g++ -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/home/ankur/toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi -c -pipe -fstack-protector -O2 -pipe -g -feliminate-unused-debug-types -g -Wall -W -D_REENTRANT -fPIE -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../QTQuickDemo_v0.2 -I. -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/include/c++/4.7.3 -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/include/c++/4.7.3/arm-linux-gnueabihf/arm-linux-gnueabi -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5 -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtQuick -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtWidgets -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtGui -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtQml -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtNetwork -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtCore -I. -I../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -o main.o ../QTQuickDemo_v0.2/main.cpp

In file included from ../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtGui/qopenglcontext.h:54:0,

from ../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtGui/QtGui:32,

from ../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtQuick/QtQuickDepends:4,

from ../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtQuick/QtQuick:3,

from ../QTQuickDemo_v0.2/main.cpp:4:

../../../toolchain-ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtGui/qopengl.h:99:26: fatal error: GLES2/gl2.h: No such file or directory

compilation terminated.

Clearly, toolchain is not properly built or setup.

Am I missing some step ? Any help is appreciated.

Thanks

Ankur

  • And these are contents of /home/ankur/toolchain-ti/environment-setup-cortexa8t2hf-vfp-neon-linux-gnueabi :

    export SDKTARGETSYSROOT=/opt/ti/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi
    export PATH=/opt/ti/sysroots/i686-arago-linux/usr/bin:/opt/ti/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabi:$PATH
    export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT
    export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib/pkgconfig
    export CONFIG_SITE=/opt/ti/site-config-cortexa8t2hf-vfp-neon-linux-gnueabi
    export OECORE_NATIVE_SYSROOT="/opt/ti/sysroots/i686-arago-linux"
    export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"
    export OECORE_ACLOCAL_OPTS="-I /opt/ti/sysroots/i686-arago-linux/usr/share/aclocal"
    export PYTHONHOME=/opt/ti/sysroots/i686-arago-linux/usr
    export CC="arm-linux-gnueabihf-gcc  -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=$SDKTARGETSYSROOT"
    export CXX="arm-linux-gnueabihf-g++  -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=$SDKTARGETSYSROOT"
    export CPP="arm-linux-gnueabihf-gcc -E  -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=$SDKTARGETSYSROOT"
    export AS="arm-linux-gnueabihf-as "
    export LD="arm-linux-gnueabihf-ld  --sysroot=$SDKTARGETSYSROOT"
    export GDB=arm-linux-gnueabihf-gdb
    export STRIP=arm-linux-gnueabihf-strip
    export RANLIB=arm-linux-gnueabihf-ranlib
    export OBJCOPY=arm-linux-gnueabihf-objcopy
    export OBJDUMP=arm-linux-gnueabihf-objdump
    export AR=arm-linux-gnueabihf-ar
    export NM=arm-linux-gnueabihf-nm
    export M4=m4
    export TARGET_PREFIX=arm-linux-gnueabihf-
    export CONFIGURE_FLAGS="--target=arm-linux-gnueabi --host=arm-linux-gnueabi --build=i686-linux --with-libtool-sysroot=$SDKTARGETSYSROOT"
    export CFLAGS=" -isystem/home/ankur/ti-yocto/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include  -fstack-protector -O2 -pipe -g -feliminate-unused-debug-types"
    export CXXFLAGS=" -isystem/home/ankur/ti-yocto/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include  -fstack-protector -O2 -pipe -g -feliminate-unused-debug-types"
    export LDFLAGS=" -L/home/ankur/ti-yocto/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/lib -Wl,-rpath-link,/home/ankur/ti-yocto/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/lib -Wl,-O1 -Wl,--hash-style=gnu"
    export CPPFLAGS=" -isystem/home/ankur/ti-yocto/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include  -fstack-protector"
    export OECORE_DISTRO_VERSION="2015.05"
    export OECORE_SDK_VERSION="2015.05"
    export ARCH=arm
    export CROSS_COMPILE=arm-linux-gnueabihf-
    
    source /opt/ti/sysroots/i686-arago-linux/environment-setup.d/qt5.sh
    

  • Hi Ankur,

    Which SDK version do you use?  

    Make sure you have the linux SDK installed & the <TI SDK FOLDER>/linux-devkit/sysroots/i686-arago-linux/usr/bin/ exists.

    Try using: source <TI SDK FOLDER>/linux-devkit/environment-setup and then use the steps described in: http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Hands_on_with_QT 

  • Hi Yordan,

    As I have mentioned above, I am building tisdk using following steps:

    - Cloned oe-layersetup.git

    used "arago-daisy-config.txt" with oe-layertool-setup.sh to generate tisdk rootfs using commands:

    - MACHINE=am335x-evm bitbake -k tisdk-rootfs-image

    Then build a toolchain for Qt development using :

    - MACHINE=am335x-evm bitbake -k meta-toolchain-qt5

    regards
    Ankur
  • Hi Ankur,

    Could you post the exact tag from where you cloned the oe-layersetup.git? I suspect the toolchain you've built may be recommended for another version of tisdk rootfs image.

    You can direct your questions to meta-arago & meta-ti mailing lists: arago-project.org/.../meta-arago & lists.yoctoproject.org/.../meta-ti

    Best Regards,
    Yordan
  • Hi,

    I cloned master of oe-layersetup.git

    git clone git://arago-project.org/git/projects/oe-layersetup.git



    And then used "arago-daisy-config.txt" to bitbake tisdk-rootfs-image.

    ./oe-layersetup.sh -f conigs/arago-daisy-config.txt
    MACHINE=am335x-evm bitbake tisdk-rootfs-image



    Wondering amongst following, which is the right command to buildtoolchain ?

    bitbake meta-toolchain
    bitbake meta-toolchain-sdk
    bitbake meta-toolchain-qt5

  • Based on this link, I think you should use the meta-toolchain-sdk. 

    You can also ask for confirmation in the meta-ti or meta-arago mailing lists: http://arago-project.org/wiki/index.php/Main_Page 

    Best Regards, 
    Yordan