Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Native Development

Reply
Developer
BGmot
Posts: 1,010
Registered: ‎11-24-2011
My Carrier: x
Accepted Solution

Qt fails to build

The day before yesterday I cloned git://gitorious.org/qt/qt.git (commit d8473681955bd96f8dd9cb22ad2597a9b7479d80) and can't build it. It builds qmake successfully but when it gets to building moc I get this error:

g++ -Wl,-rpath-link,/Users/eyurchen/dev/BB/qt-arm-48-ndk2.0/qt/lib -headerpad_max_install_names -o ../../../bin/moc release-shared/moc.o release-shared/preprocessor.o release-shared/generator.o release-shared/parser.o release-shared/token.o release-shared/main.o    -L/Users/eyurchen/dev/BB/qt-arm-48-ndk2.0/qt/src/tools/bootstrap -lbootstrap -framework CoreServices
ld: unknown option: -rpath-link
collect2: ld returned 1 exit status
make[1]: *** [../../../bin/moc] Error 1
make[1]: Leaving directory `/Users/eyurchen/dev/BB/qt-arm-48-ndk2.0/qt/src/tools/moc'
make: *** [sub-moc-make_default-ordered] Error 2

Used this configure:

./configure -opensource -confirm-license -qpa -iconv -shared -release -xplatform blackberry-armv7le-qcc -little-endian -arch arm -largefile -nomake examples -xmlpatterns -no-webkit -no-rpath -opengl es2 -reduce-exports -system-sqlite -prefix stage/nto/armle-v7/usr/lib/qt4 -no-neon

 

Anybody?

Thanks.

Please use plain text.
New Contributor
seanharmer
Posts: 3
Registered: ‎09-20-2012
My Carrier: O2

Re: Qt fails to build

Which version of gcc are you using please? Any reason to not use clang? Are you able to build Qt for the desktop (i.e. not cross compiling - although I don't think it has gotten that far yet before you encounter this issue)?

Please use plain text.
Developer
BGmot
Posts: 1,010
Registered: ‎11-24-2011
My Carrier: x

Re: Qt fails to build

>Which version of gcc are you using please?

gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)

>Any reason to not use clang?

I am sorry I have no idea what clan is. I think compiler is choosed durin ./configure run.

>Are you able to build Qt for the desktop (i.e. not cross compiling - although I don't think it has gotten that far yet before you encounter this issue)?

No, I have not tried as I don't need Qt on the host, I need it on Playbook. And Qt build cloned on Aug 30 (last commit 9520674b0f02aac55da6d98a6c56c74ce240cca6) was building without any problem!

 

 

Please use plain text.
Developer
borceg
Posts: 670
Registered: ‎03-21-2012
My Carrier: Vip

Re: Qt fails to build

You're using -no-rpath here:
./configure -opensource -confirm-license -qpa -iconv -shared -release -xplatform blackberry-armv7le-qcc -little-endian -arch arm -largefile -nomake examples -xmlpatterns -no-webkit -no-rpath -opengl es2 -reduce-exports -system-sqlite -prefix stage/nto/armle-v7/usr/lib/qt4 -no-neon

but -rpath-link is needed in g++
Please use plain text.
Developer
BGmot
Posts: 1,010
Registered: ‎11-24-2011
My Carrier: x

Re: Qt fails to build

But I am just following procedure published here http://qt-project.org/wiki/Building-Qt4-for-Blackberry and it worked for me a month ago. Regardless I tried to remove option -no-rpath and reconfigure and interestingly enough got the same error:

g++ -c -pipe -O2 -Wall -W -DQT_MOC -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_TEXTCODEC -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_TEXTSTREAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../../mkspecs/macx-g++ -I. -I. -I. -I../../../include -I../../../include/QtCore -I../../../include/QtXml -I../../xml -o release-shared/main.o main.cpp
g++ -Wl,-rpath-link,/Users/eyurchen/dev/BB/qt-arm-48-ndk2.0/qt/lib -headerpad_max_install_names -o ../../../bin/moc release-shared/moc.o release-shared/preprocessor.o release-shared/generator.o release-shared/parser.o release-shared/token.o release-shared/main.o    -L/Users/eyurchen/dev/BB/qt-arm-48-ndk2.0/qt/src/tools/bootstrap -lbootstrap -framework CoreServices
ld: unknown option: -rpath-link
collect2: ld returned 1 exit status
make[1]: *** [../../../bin/moc] Error 1
make[1]: Leaving directory `/Users/eyurchen/dev/BB/qt-arm-48-ndk2.0/qt/src/tools/moc'
make: *** [sub-moc-make_default-ordered] Error 2

Please use plain text.
Regular Contributor
sporadicsoftware
Posts: 70
Registered: ‎09-30-2011
My Carrier: Sprint

Re: Qt fails to build

I plan on looking into this more tomorrow but I received the same error today after updating from git. I was able to fix it by reverting a patch submitted recently by peter-h regarding blackberry compiler options. 

Please use plain text.
Developer
BGmot
Posts: 1,010
Registered: ‎11-24-2011
My Carrier: x

Re: Qt fails to build

Thanks a lot. The patch fixed the problem.

Please use plain text.