Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Qt5 adding mkspecs
ltillier last edited by VRonin
I would like to create a graphic interface on a embedded linux with an ARM architecture using Qt.
So I downloaded the source code of Qt5 (the tar.gz for Linux).
I have extracted the files.
Before running ./configure with the correct configuration options, I have to add in the qtbase/mkspecs/ directory the configuration of my toolchain. And I think this where I'm wrong.
I created in /mkspecs directory a new directory "arm-v5t-g++" with the name of my toolchain, that is quite similar to linux-arm-gnueabi-g++
And in that new folder I have created a qmake.conf and qplatformdefs.h file.
The qplatformdefs is the same as the one of linux-arm-gnueabi-g++.
Here is the qmake.conf
MAKEFILE_GENERATOR = UNIX CONFIG += incremental gdb_dwarf_index 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-v5t-gcc QMAKE_CXX = arm-v5t-gcc QMAKE_LINK = arm-v5t-gcc QMAKE_LINK_SHLIB = arm-v5t-gcc QMAKE_INCDIR =/home/arm/v5t/target/usr/include QMAKE_LIBDIR =/home/arm/v5t/target/usr/lib QMAKE_LIBS = -lpng # modifications to linux.conf QMAKE_AR = arm-v5t-ar cqs QMAKE_OBJCOPY = arm-v5t-objcopy QMAKE_STRIP = arm-v5t-strip load(qt_config)
And then I run ./configure -xplatform linux-arm ...
But I have got errors
/home/Qt5/qt-everywhere-opensource-src-5.0.1/qtbase/configure: line 2638: arm-v5t-g++: command not found
May someone helps me ?
I don't know where I have made a mistake and I can not find help for embedded system with Qt5.
I think that your arm-v5t-g++ is not in your PATH so it can't be called. You need to update your PATH (perhaps inside your bashrc/profile etc...)
Hope it helps
Thanks you for your advice. That worked out !
But I got a new error when I run the ./confgiure ...options...
arm-v5t-g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
/free/montavista/pro/devkit/arm/v5t_le/bin/../lib/gcc/armv5tl-montavista-linuxeabi/3.4.3/../../../../armv5tl-montavista-linuxeabi/bin/ld: unrecognized option '-Bsymbolic-functions'
Regarding the --help of arm-v5t-g++, the syntax seems good
@-Wl,<options> Pass comma-separated <options> on to the linker@
I can't figure out from where comes that issue.
At first sight, I would say the age of your compiler (3.4.3 is around 7 years old).
You should get a recent cross-compiler (gcc is currently at 4.7.2 and the oldest maintained version is 4.6.3)
Ok and is there anyway to disable Bsymbolic functions with the configure options ?
The minimal arm gcc for Qt4.8 is already 4.1.1. I don't know yet for Qt5, so 3.4.3 won't be able to compile Qt5.
Ok thanks for your help