This is my latest toolchain file version: <a href="http://quickgit.kde.org/?p=scratch%2Flpapp%2Fwikireader.git&a=blob&h=5c6c4dbda324a8285f99115c3de7d45e441d47ca&hb=f296afed1993d7c28edd5f9adcfd41465667d823&f=frontends%2Fblackberry%2Fcmake%2FToolchain-QNX-8.0.0.cmake">http://quickgit.kde.org/?p=scratch%2Flpapp%2Fwikireader.git&a=blob&h=5c6c4dbda324a8285f99115c3de7d45e441d47ca&hb=f296afed1993d7c28edd5f9adcfd41465667d823&f=frontends%2Fblackberry%2Fcmake%2FToolchain-QNX-8.0.0.cmake</a><br>
<br>At least, it is clear now what I should achieve, but the CMAKE_C(XX)_FLAGS* do not seem to work as I would expect them to.<br><br><div class="gmail_quote">On Wed, Jan 16, 2013 at 11:20 PM, Laszlo Papp <span dir="ltr"><<a href="mailto:lpapp@kde.org" target="_blank">lpapp@kde.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Bill!<br><br>This works: echo "int main() { return 0; }" > main.cpp && qcc -Vgcc_ntoarmv7le main.cpp -l QtCore -L /opt/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib/qt4/lib/ -o cmake-test<br>
<br>This does not work: echo "int main() { return 0; }" > main.cpp && ntoarmv7-g++ main.cpp -lQtCore -L/opt/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib/qt4/lib/ -o cmake-test<br>
<br>This is the qcc documentation which is just a wrapper around the preprocessor, compiler, linker, and assembler:<br><br><a href="http://developer.blackberry.com/native/reference/bb10/com.qnx.doc.neutrino.utilities/topic/q/qcc.html" target="_blank">http://developer.blackberry.com/native/reference/bb10/com.qnx.doc.neutrino.utilities/topic/q/qcc.html</a><br>
<br>Now I am getting this:<br><br>cd /home/lpapp/Projects/qt/wikireader/build/frontends/blackberry && /usr/bin/cmake -E cmake_link_script CMakeFiles/wikireader.dir/link.txt --verbose=1<br>/opt/bbndk/host_10_0_9_404/linux/x86/usr/bin/qcc -Wall -fPIC CMakeFiles/wikireader.dir/main.cpp.o CMakeFiles/wikireader.dir/wikimodel.cpp.o CMakeFiles/wikireader.dir/qrc_wikireader.cxx.o CMakeFiles/wikireader.dir/wikireader_automoc.cpp.o -o wikireader /opt/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib/qt4/lib/libQtCore.so /opt/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib/qt4/lib/libQtNetwork.so /opt/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib/qt4/lib/libQtXml.so /opt/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib/qt4/lib/libQtGui.so /opt/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib/qt4/lib/libQtDeclarative.so /opt/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib/libbbcascades.so -Wl,-rpath,/opt/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib/qt4/lib:/opt/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib <br>
/opt/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib/qt4/lib/libQtCore.so: could not read symbols: File in wrong format<br>cc: /opt/bbndk/host_10_0_9_404/linux/x86/usr/bin/ntox86-ld error 1<br>make[2]: *** [frontends/blackberry/wikireader] Error 1<br>
make[2]: Leaving directory `/home/lpapp/Projects/qt/wikireader/build'<br>make[1]: *** [frontends/blackberry/CMakeFiles/wikireader.dir/all] Error 2<br>make[1]: Leaving directory `/home/lpapp/Projects/qt/wikireader/build'<br>
make: *** [all] Error 2<br><br>For some reason, "-Vgcc_ntoarmv7le" does not take any effect in the toolchain file. Do you have an idea why that could happen? Should I use "CMAKE_EXE_LINKER_FLAGS" or something else? -Wl would be the linker for qcc, and "ntox86-ld" is the wrong one, not the arm variant.<span class="HOEnZb"><font color="#888888"><br>
<br>Laszlo</font></span><div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Wed, Jan 16, 2013 at 9:40 PM, Bill Hoffman <span dir="ltr"><<a href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 1/16/2013 4:05 PM, Laszlo Papp wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
At least I cannot reproduce the crash with the following skeleton:<br>
<br>
</blockquote></div>
You should look at the compile/link lines. First I would look at the link lines:<br>
<br>
This is the qmake one:<br>
<br>
qcc -Vgcc_ntoarmv7le -lang-c++ -Wl,-rpath-link,/home/taylor/<u></u>Development/bbndk/target_10_0_<u></u>9_2318/qnx6/armle-v7/lib -Wl,-rpath-link,/home/taylor/<u></u>Development/bbndk/target_10_0_<u></u>9_2318/qnx6/armle-v7/usr/lib -Wl,-rpath-link,/home/taylor/<u></u>Development/bbndk/target_10_0_<u></u>9_2318/qnx6/armle-v7/usr/lib/<u></u>qt4/lib -o o.le-v7-g/WikiReader o.le-v7-g/.obj/main.o o.le-v7-g/.obj/wikimodel.o o.le-v7-g/.obj/moc_wikimodel.o -L/home/taylor/Development/<u></u>bbndk/target_10_0_9_2318/qnx6/<u></u>armle-v7/lib -L/home/taylor/Development/<u></u>bbndk/target_10_0_9_2318/qnx6/<u></u>armle-v7/usr/lib -L/home/taylor/Development/<u></u>bbndk/target_10_0_9_2318/qnx6/<u></u>armle-v7/usr/lib/qt4/lib -L/home/taylor/Development/<u></u>bbndk/target_10_0_9_2318/qnx6/<u></u>/usr/lib/qt4/lib -lbbcascades -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lsqlite3 -lz -lQtXmlPatterns -lQtGui -lQtXml -lQtNetwork -lsocket -lQtCore -lm -lbps<br>
<br>
<br>
This is the cmake one:<br>
<br>
/opt/bbndk/host_10_0_9_404/<u></u>linux/x86/usr/bin/ntoarmv7-c++ -Wall -fPIC -Wall -fPIC -g3 -ggdb -O0 CMakeFiles/wikireader.dir/<u></u>main.cpp.o CMakeFiles/wikireader.dir/<u></u>wikimodel.cpp.o CMakeFiles/wikireader.dir/qrc_<u></u>wikireader.cxx.o CMakeFiles/wikireader.dir/<u></u>wikireader_automoc.cpp.o -o wikireader /opt/bbndk/target_10_0_9_1673/<u></u>qnx6/armle-v7/usr/lib/qt4/lib/<u></u>libQtCore.so /opt/bbndk/target_10_0_9_1673/<u></u>qnx6/armle-v7/usr/lib/qt4/lib/<u></u>libQtNetwork.so /opt/bbndk/target_10_0_9_1673/<u></u>qnx6/armle-v7/usr/lib/qt4/lib/<u></u>libQtXml.so /opt/bbndk/target_10_0_9_1673/<u></u>qnx6/armle-v7/usr/lib/qt4/lib/<u></u>libQtGui.so /opt/bbndk/target_10_0_9_1673/<u></u>qnx6/armle-v7/usr/lib/qt4/lib/<u></u>libQtDeclarative.so -lbbcascades -Wl,-rpath,/opt/bbndk/target_<u></u>10_0_9_1673/qnx6/armle-v7/usr/<u></u>lib/qt4/lib<br>
<br>
<br>
<br>
Right off the bat they are using different compilers to link. I would try to get the CMake one to match the qmake one by hand and see if you can fix the problem. Once you figure out the magic command line that makes it work, then we can figure out how to get CMake to produce the same command line.<br>
<br>
BTW, same thing with the compile lines. CMake does c++ and qmake does gcc -lang-c++.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
cat ../../cmake-test/main.cpp<br>
int main() {return 0;}<br>
cat ../../cmake-test/CMakeLists.<u></u>txt<br>
add_executable(cmake-test main.cpp)<br>
<br>
I am running out of the quick ideas soon. Anything else to try?<br>
<br>
On Wed, Jan 16, 2013 at 2:12 PM, Laszlo Papp <<a href="mailto:lpapp@kde.org" target="_blank">lpapp@kde.org</a><br></div><div>
<mailto:<a href="mailto:lpapp@kde.org" target="_blank">lpapp@kde.org</a>>> wrote:<br>
<br>
Interesting finding! It happened to PySide as well on this platform<br>
which may help with proceeding:<br>
<a href="http://www.engcorp.com/pipermail/blackberry-python/2013/000016.html" target="_blank">http://www.engcorp.com/<u></u>pipermail/blackberry-python/<u></u>2013/000016.html</a><br>
<br>
<br>
On Wed, Jan 16, 2013 at 10:31 AM, Laszlo Papp <<a href="mailto:lpapp@kde.org" target="_blank">lpapp@kde.org</a><br></div><div>
<mailto:<a href="mailto:lpapp@kde.org" target="_blank">lpapp@kde.org</a>>> wrote:<br>
<br>
I have just tried to add the following libraries to the linkage<br>
even if they seem unnecessary: -lz -lsocket -lm -lbps, but it is<br>
still crashing. :'(<br>
<br>
I have also tried to save out the wikireader.core file of mine,<br>
and run through an arm gdb on the host, but it did not provide<br>
too much information sadly even with a debug build:<br>
<br>
(gdb) core wikireader.core<br>
[New LWP 1]<br>
Program terminated with signal 11, Segmentation fault.<br>
#0 0x01d27380 in ?? ()<br>
(gdb) thread apply all bt<br>
<br>
Thread 1 (LWP 1):<br>
#0 0x01d27380 in ?? ()<br>
#1 0x00000000 in ?? ()<br>
(gdb)<br>
<br>
How can we proceed?<br>
<br>
Laszlo<br>
<br>
<br>
<br>
<br>
<br></div>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
<br>
</blockquote>
<br>
<br>
-- <br>
Bill Hoffman<br>
Kitware, Inc.<br>
28 Corporate Drive<br>
Clifton Park, NY 12065<br>
<a href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a><br>
<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>
<a href="tel:518%20881-4905" value="+15188814905" target="_blank">518 881-4905</a> (Direct)<br>
<a href="tel:518%20371-3971%20x105" value="+15183713971" target="_blank">518 371-3971 x105</a><br>
Fax <a href="tel:%28518%29%20371-4573" value="+15183714573" target="_blank">(518) 371-4573</a><br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</blockquote></div><br>
</div></div></blockquote></div><br>