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.

Linux/AM1808: Need help to cross compile qt 5.9 for our current arm tool chain

Part Number: AM1808

Tool/software: Linux

Hello,

I have a hardware that runs on AM1808 with Linux installed as os. For the development, I use QT creator to build an GUI based application that uses the qt 4.7.4 compiler along with ARM toolchain to build an app and installed it on this processor. The processor runs on ARM Linux Kernel 2.6.37 that uses toolchain arm2012.03 with gcc version 4.6.3

Now, I need to update the compiler version of qt that is qt 5.7 or above with the ssame toolchain. Here is the download link from where I get this...

http://download.qt.io/official_releases/qt/5.7/5.7.1/single/qt-everywhere-opensource-src-5.7.1.tar.gz

I successfully download it and now need to configure it according to my current toolchain. For that, I update qmake.cong as below,

#
# qmake configuration for building with arm-linux-gnueabi-g++
#

MAKEFILE_GENERATOR      = UNIX
CONFIG                 += incremental
QMAKE_INCREMENTAL_STYLE = sublib

include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

// modifications to g++.conf

//QMAKE_CC                = arm-linux-gnueabi-gcc

//QMAKE_CXX               = arm-linux-gnueabi-g++

//QMAKE_LINK              = arm-linux-gnueabi-g++

//QMAKE_LINK_SHLIB        = arm-linux-gnueabi-g++

// modifications to linux.conf

//QMAKE_AR                = arm-linux-gnueabi-ar cqs

//QMAKE_OBJCOPY           = arm-linux-gnueabi-objcopy

//QMAKE_NM                = arm-linux-gnueabi-nm -P

//QMAKE_STRIP             = arm-linux-gnueabi-strip

QMAKE_CC                = arm-none-linux-gnueabi-gcc

QMAKE_CXX               = arm-none-linux-gnueabi-g++

QMAKE_LINK              = arm-none-linux-gnueabi-g++

QMAKE_LINK_SHLIB        = arm-none-linux-gnueabi-g++

QMAKE_AR                = arm-none-linux-gnueabi-ar cqs

QMAKE_OBJCOPY           = arm-none-linux-gnueabi-objcopy

QMAKE_STRIP             = arm-none-linux-gnueabi-strip

load(qt_config)


To compile this version i use
./configure -opensource -confirm-license -prefix /usr/local/Qt5 -no-pch -xplatform linux-arm-gnueabi-g++

This is according to our current toolchain and available gcc version. The same like command I used during my old qt installation.

but we found the following error,

System architecture: 'arm' Host architecture: 'i386' arm-none-linux-gnueabi-g++ -c -fvisibility=hidden fvisibility.c Symbol visibility control enabled.

cc1plus: error: unrecognized command line option '-fuse-ld=gold' arm-none-linux-gnueabi-g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."

Symbolic function binding disabled. checking for C++14...

arm-none-linux-gnueabi-g++ -c -pipe -O2 -std=gnu++1y -Wall -W -fPIC -I. -I../../../mkspecs/linux-arm-gnueabi-g++ -o c++14.o c++14.cpp

cc1plus: error: unrecognized command line option '-std=gnu++1y' make: *** [c++14.o] Error 1

C++14 disabled.

checking for default C++ standard edition... arm-none-linux-gnueabi-g++ -pipe -O2 -Wall -W -fPIC -I. -I../../../mkspecs/linux-arm-gnueabi-g++ -o c++default.ii -E c++default.cpp

default C++ standard edition enabled.

checking for 64-bit std::atomic... arm-none-linux-gnueabi-g++ -c -pipe -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/linux-arm-gnueabi-g++ -o atomic64.o atomic64.cpp

cc1plus: error: unrecognized command line option '-std=gnu++11'

make: *** [atomic64.o] Error 1

64-bit std::atomic disabled.

checking for 64-bit std::atomic in -latomic... arm-none-linux-gnueabi-g++ -c -pipe -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/linux-arm-gnueabi-g++ -o atomic64.o atomic64.cpp

cc1plus: error: unrecognized command line option '-std=gnu++11'

make: *** [atomic64.o] Error 1

64-bit std::atomic in -latomic disabled.

checking for std::atomic for function pointers... arm-none-linux-gnueabi-g++ -c -pipe -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/linux-arm-gnueabi-g++ -o atomicfptr.o atomicfptr.cpp cc1plus: error: unrecognized command line option '-std=gnu++11'

make: *** [atomicfptr.o] Error 1

std::atomic for function pointers disabled.

ERROR: detected a std::atomic implementation that fails for function pointers.

Please apply the patch corresponding to your Standard Library vendor, found in /opt/qt-everywhere-opensource-src-5.7.1/qtbase/config.tests/common/atomicfptr

So, this is what I found. Can anyone suggest me a way to resolve this issue?

  • Hi,

    It seems that the tollchaing (arm2012.03 with gcc version 4.6.3, which is quite old by the way) and QT5.9 are not compatible...
    Have you tried providing the xplatform option as desxribed here:
    doc.qt.io/.../configure-options.html
    wiki.qt.io/Building_Qt_for_Embedded_Linux

    Best Regards,
    Yordan
  • Hi Yordan,

    Thanks for the reply, I already go through the link that you provide but it fails as you describe that maybe toolchain is the issue.

    If I want to update my toolchain, where do I find it and what steps to being considered to install this new toolchain?
    Also, If I successfully install this new one what will happen to old toolchain do I need to remove the old or it will overwrite?
  • If I want to update my toolchain, where do I find it and what steps to being considered to install this new toolchain?

    This is a linaro toolchain, so you should be able to find it here:
    www.linaro.org/.../

    If I want to update my toolchain, where do I find it and what steps to being considered to install this new toolchain?

    There should be a prebuilt binary, so other than downloading it there shouldn't be any other steps... unless you want to compile the toolchain yourself, then you need to follow the instructions provided by linaro wiki.linaro.org/.../FAQ and consider the SoC.

    Also, If I successfully install this new one what will happen to old toolchain do I need to remove the old or it will overwrite?

    When you point the environment variables to the newly downloaded toolchain the build will take this new cross compiler. You shouldn't need the old one.

    NOTE: TI has verified the kernel & u-boot to work with arm2012.03, so you you should build the kernel & u-boot with this version... The newer one might also work, but this hasn't been tested.

    Best Regards,
    Yordan
  • Thanks,

    Ok, I will look after it

    Thanks for the support.