Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Cross compiling Qt 5.5.1 for armhf on Ubuntu 15.10
I'm trying to cross compile Qt 5.5.1 for armhf on Ubuntu 15.10.
I've downloaded qt 5.5.1 and extracted it in a directory.
I have installed all the required packages. (I think.)
I copied the arm-linux-gnueabi-g++ and named it arm-linux-gnueabihf-g++.
I changed "arm-linux-gnueabihf-g++/qmake.conf" so that it looks like this:
# # qmake configuration for building with arm-linux-gnueabihf-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-gnueabihf-gcc QMAKE_CXX = arm-linux-gnueabihf-g++ QMAKE_LINK = arm-linux-gnueabihf-g++ QMAKE_LINK_SHLIB = arm-linux-gnueabihf-g++ # modifications to linux.conf QMAKE_AR = arm-linux-gnueabihf-ar cqs QMAKE_OBJCOPY = arm-linux-gnueabihf-objcopy QMAKE_NM = arm-linux-gnueabihf-nm -P QMAKE_STRIP = arm-linux-gnueabihf-strip load(qt_config)
And I run this command in the qt-everywhere-opensource-src-5.5.1 directory:
./configure -opensource -confirm-license -platform linux-arm-gnueabihf-g++ -release -prefix /usr/local/Qt-5.5.1-arm -qt-xcb -L/usr/arm-linux-gnueabihf/lib -v
But I get the following error:
qt-everywhere-opensource-src-5.5.1/qtbase/bin/qmake: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
I have checked and /usr/arm-linux-gnueabihf/lib/libstdc++.so.6 does exist.
What am I doing wrong?
Hi and welcome to devnet,
You are missing a space between
-Land the path.
Hello and thank you!
I added a space where you suggested, but unfortunately it didn't help.
I must be doing (or not doing) some other thing wrong.
I come across the name "fixQualifiedLibraryPaths" time after time, is that something that would help?
Is is universal or device specific?
I have tried some more now, still I get the same error.
I noticed that it seems that ./configure knows about the path to the library, it's one of the first outputs from the configuration:
Precompiled-headers support enabled. arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c Symbol visibility control enabled. arm-linux-gnueabihf-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)." #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)." ^ Symbolic function binding disabled. DEFAULT_INCDIRS="/usr/arm-linux-gnueabihf/include/c++/5 /usr/arm-linux-gnueabihf/include/c++/5/arm-linux-gnueabihf /usr/arm-linux-gnueabihf/include/c++/5/backward /usr/lib/gcc-cross/arm-linux-gnueabihf/5/include /usr/lib/gcc-cross/arm-linux-gnueabihf/5/include-fixed /usr/arm-linux-gnueabihf/include /usr/include " DEFAULT_LIBDIRS="/usr/lib/gcc-cross/arm-linux-gnueabihf/5 /usr/arm-linux-gnueabihf/lib /lib /usr/lib " Creating qmake...
I noticed an error message, but it seems it have been for a while.
I put the output from configure in a pastebin:
http://pastebin.com/ujQVwN7h (This will work in 1 month from today.)
Are you cross-compiling for the Raspberry Pi ?
In any case, what do you get if your run ldd on qmake ?
It's not a raspberry pi, but it is a small SBC.
I manage to solve the problem, I had missed the "-xplatform" argument.
Good catch !
I missed that one on your configure line.
Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)