I'm trying to write a simple console Qt/C++ app for the Beagle Bone Black. The Debian 8 image has Qt 5.3.2 installed. The Qt installed in the SDK gave me cross compile errors, so I cross-compiled Qt 5.6.2 from source myself. This required version 5.6+ because of a hard-float issue, and then some bug-fixing and hacking to get to work.
When I compile the application and run it on the BBB, it says:
./BeagleBoneTestCrossCompile
./BeagleBoneTestCrossCompile: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: no version information available (required by ./BeagleBoneTestCrossCompile)
./BeagleBoneTestCrossCompile: relocation error: ./BeagleBoneTestCrossCompile: symbol _ZN6QDebugD1Ev, version Qt_5 not defined in file libQt5Core.so.5 with link time reference
These versioned symbols confuse me greatly. With objdump -TC
I can see that my compiled Qt 5.6 has them (one example line):
000d910d g DF .text 00000088 Qt_5 QChar::hasMirrored(unsigned int)
But, the version installed in the Debian BBB image doesn't:
000c8bb0 g DF .text 00000074 Base QChar::hasMirrored(unsigned int)
Nor does the version installed on a X86_64 Ubuntu 16.04 server:
0000000000132a30 g DF .text 0000000000000064 Base QChar::hasMirrored(unsigned int)
However, the version installed in my home-dir with the online installer, just for x86_64, does have the Qt_5
version:
0000000000130ec0 g DF .text 000000000000005e Qt_5 QChar::hasMirrored(unsigned int)
Then I tried to just include my cross-compiled Qt 5.6 with my app, but then it goes up the chain:
> LD_LIBRARY_PATH=libs ./BeagleBoneTestCrossCompile
./BeagleBoneTestCrossCompile: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by libs/libQt5Core.so.5)
In the past, I have compiled x86 software with my local Qt, with Qt_5
version tags, and run it on Ubuntu 16.04 servers without the version tags, and it loaded the *.so
files just fine. So, why is this suddenly a problem, and how do I run Qt apps with the shipped Qt libraries?
Apparently, I misread some symbols. Qt 5.6 is the first version to be built with the Qt_5
versioned symbols. The older ones have Base
. So, building with 5.6+, needs 5.6+ to run.
I was able to cross compile Qt 5.5 (the soft/hardfloat bug is still there, but easier to fix), and the application runs.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.