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.

Fail to cross compile qt3d library for AM335x SK

I am trying to cross compile qt3d library using ti-sdk-am335x-evm-06.00.00.00 starter kit. first I tested on helloworld program which is successfully generate arm executable file and give output like followin

arm-linux-gnueabihf-g++  --sysroot=/home/deep/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/armv7ahf-vfp-neon-3.2-oe-linux-gnueabi -Wl,-rpath-link,/home/deep/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/armv7ahf-vfp-neon-3.2-oe-linux-gnueabi/usr/lib -o helloworld helloworld.o    -L/home/deep/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/armv7ahf-vfp-neon-3.2-oe-linux-gnueabi/usr/lib -lQtDeclarativeE -lQtScriptE -lQtSvgE -lQtSqlE -lQtXmlPatternsE -lQtGuiE -lEGL -lIMGegl -lsrv_um -lQtNetworkE -lQtCoreE -lpthread

but when I crosscompile qt3d project using source to environmentsetup file, It uses normal g++ compiler not arm-linux-gnueabi

[linux-devkit]:~qt3d>sudo qmake-qt4

[linux-devkit]:~qt3d>sudo make

g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_BUILD_QT3D_LIB -DQT_NO_EGL -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I../private -Iglobal -Ipainting -Iarrays -Ieffects -Imaterials -Igeometry -Iviewing -Imath3d -Iscene -Inetwork -Igraphicsview -Itextures -Isurfaces -Iapi -I/usr/X11R6/include -I. -o qglnamespace.o global/qglnamespace.cpp
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_BUILD_QT3D_LIB -DQT_NO_EGL -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I../private -Iglobal -Ipainting -Iarrays -Ieffects -Imaterials -Igeometry -Iviewing -Imath3d -Iscene -Inetwork -Igraphicsview -Itextures -Isurfaces -Iapi -I/usr/X11R6/include -I. -o qglabstracteffect.o painting/qglabstracteffect.cpp..........

I can not understand why it does not take arm-linux-gnueabi-g++ compiler

  • Hi,

    How do you setup your environment before executing the make command? Have you tried manually exporting the PATH & CROSS_COMPILE variables to point to the arm-linux-gnueabihf- cross compiler?

    Best Regards,
    Yordan
  • Thanks for reply,

    In Ti's SDK there is one file name environment-setup. So,I give source to that file. This file contain CROSS_COMPILE variables

    deep@deep:~/ti-sdk-am335x-evm-06.00.00.00/linux-devkit$ source environment-setup


    [linux-devkit]:~/ti-sdk-am335x-evm-06.00.00.00/linux-devkit>

  • Hi,

    Can you try using:

    x0155517@mms:~/ti-sdk-am335x-evm-08.00.00.00/linux-devkit$ source environment-setup  

    [linux-devkit]:~/ti-sdk-am335x-evm-08.00.00.00/linux-devkit> export CROSS_COMPILE=arm-linux-gnueabihf-

    And then verify that you have the correct PATH & CROSS_COMPILE:

     [linux-devkit]:~/ti-sdk-am335x-evm-08.00.00.00/linux-devkit> echo $PATH

    /home/x0155517/ti-sdk-am335x-evm-08.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/qtopia:/home/x0155517/ti-sdk-am335x-evm-08.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin:/home/bin:/home/x0155517/bin:/home/x0155517/bin/scripts:/home/x0155517/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

    [linux-devkit]:~/ti-sdk-am335x-evm-08.00.00.00/linux-devkit> echo $CROSS_COMPILE

    arm-linux-gnueabihf-

     And then see if cross-compiling will fail. 

    Also check the following guide for hints on how to setup your environment for cross-compilation: http://processors.wiki.ti.com/index.php/Sitara_Linux_SDK_GCC_Toolchain 

  • Hi,

    Thank you.

    Now I can cross compile though I get some error like

    /home/deep/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lQt3DE
    collect2: error: ld returned 1 exit status
    make[2]: *** [/usr/lib/x86_64-linux-gnu/libQt3DQuickE.so.1.0.0] Error 1
    make[2]: Leaving directory `/home/deep/new/uart/qt3d/src/quick3d'
    make[1]: *** [sub-quick3d-make_default-ordered] Error 2
    make[1]: Leaving directory `/home/deep/new/uart/qt3d/src'
    make: *** [sub-src-make_default-ordered] Error 2

    but anyway many thanks.

  • Hi,

    Check the following guides:
    processors.wiki.ti.com/.../Building_Qt
    processors.wiki.ti.com/.../Sitara_Linux_Training:_Hands_on_with_QT

    You may be missing something in your environment setup.

    Best Regards,
    Yordan