[SOLVED]Qt for Embedded Linux: Getting error“.obj/release-static-emb-arm/qdiriterator.o” when I make
-
When I installed Qt4.8.4 for Embedded Linux,I got some errors.Now I hope someone can help me!
I'm using "armv4l-unknown-linux-g++" instead of "linux-arm-g++",and I have set PATH in the Linux. When I used "which" and "whereis", I could get PATH's right values.
Then I made a new directory in the "mkspecs/qws",named as "armv4l-unknown-linux-g++",and I built a new "qmake.conf", Specific content as follows:
@include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)modifications to g++.conf
QMAKE_CC = armv4l-unknown-linux-gcc
QMAKE_CXX = armv4l-unknown-linux-g++
QMAKE_LINK = armv4l-unknown-linux-g++
QMAKE_LINK_SHLIB = armv4l-unknown-linux-g++modifications to linux.conf
QMAKE_AR = armv4l-unknown-linux-ar cqs
QMAKE_OBJCOPY = armv4l-unknown-linux-objcopy
QMAKE_STRIP = armv4l-unknown-linux-stripload(qt_config)@
Then I ran
@ export QMAKESPEC=~/program/qt-everywhere-commercial-src-4.8.4/mkspecs/qws/armv4l-unknown-linux-g++.@
and
@./configure -prefix /opt/qt-4.8.4-arm -embedded arm -little-endian -xplatform qws/armv4l-unknown-linux-g++@everything is ok.But when I ran "make",I got the errors as follows:
@make[1]: *** [.obj/release-static-emb-arm/qdiriterator.o] Error 1
make[1]: Leaving directory“~/program/qt-everywhere-commercial-src-4.8.4/src/tools/bootstrap”
make: *** [sub-tools-bootstrap-make_default-ordered] Error 2@
So how to solve the problem?Thanks~! -
Hi and welcome to DevNet,
Could you post a bit more of your error log ? These three lines don't say much to help
-
[quote author="SGaist" date="1366616934"]Hi and welcome to DevNet,
Could you post a bit more of your error log ? These three lines don't say much to help[/quote]
I've reinstalled the arm-linux-gcc,the above issue is resolved.Then I reran "./configure" command:
@./configure -prefix /opt/qt-4.8.4-arm -embedded arm -no-largefile -qt-sql-sqlite -no-svg -webkit -no-3dnow -no-sse -no-cups -iconv -no-xmlpatterns -nomake demo -xplatform qws/linux-arm-g++ -little-endian -qt-freetype -armfpa -qt-gfx-linuxfb -qt-kbd-linuxinput -qt-mouse-linuxtp -qt-mouse-tslib -no-glib -I/opt/host/tslib/include -L/opt/host/tslib/lib
@
then ran "make",I got the message:@cd src/corelib/ && make -f Makefile
make[1]: Entering directory/opt/qt-everywhere-commercial-src-4.8.4/src/corelib' /opt/qt-everywhere-commercial-src-4.8.4/bin/moc -DQT_SHARED -DQT_EDITION=QT_EDITION_DESKTOP -DQT_EVAL -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DELF_INTERPRETER=\"/lib/ld-linux.so.2\" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -I../../mkspecs/qws/linux-arm-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -Iglobal -I.moc/release-shared-emb-arm animation/qabstractanimation.h -o .moc/release-shared-emb-arm/moc_qabstractanimation.cpp arm-linux-g++ -c -pipe -I/opt/host/tslib/include -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_EDITION=QT_EDITION_DESKTOP -DQT_EVAL -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DELF_INTERPRETER=\"/lib/ld-linux.so.2\" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -I../../mkspecs/qws/linux-arm-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -Iglobal -I.moc/release-shared-emb-arm -o .obj/release-shared-emb-arm/qabstractanimation.o animation/qabstractanimation.cpp In file included from ../../include/QtCore/qatomic_armv5.h:1, from ../../src/corelib/arch/qatomic_arm.h:48, from ../../include/QtCore/qatomic_arm.h:1, from ../../src/corelib/arch/qatomic_arch.h:34, from ../../include/QtCore/qatomic_arch.h:1, from ../../src/corelib/thread/qbasicatomic.h:205, from ../../include/QtCore/qbasicatomic.h:1, from ../../src/corelib/thread/qatomic.h:24, from ../../include/QtCore/qatomic.h:1, from ../../src/corelib/tools/qbytearray.h:23, from ../../include/QtCore/qbytearray.h:1, from ../../src/corelib/tools/qstring.h:24, from ../../include/QtCore/qstring.h:1, from ../../src/corelib/kernel/qobject.h:26, from ../../include/QtCore/qobject.h:1, from animation/qabstractanimation.h:23, from animation/qabstractanimation.cpp:123: ../../src/corelib/arch/qatomic_armv5.h: In member function
int
QBasicAtomicInt::fetchAndStoreOrdered(int)':
../../src/corelib/arch/qatomic_armv5.h:214: error:count' undeclared (first use this function) ../../src/corelib/arch/qatomic_armv5.h:214: error: (Each undeclared identifier is reported only once for each function it appears in.) In file included from ../../include/QtCore/qobject.h:1, from animation/qabstractanimation.h:23, from animation/qabstractanimation.cpp:123: ../../src/corelib/kernel/qobject.h: In function
T qFindChild(const QObject*,
const QString&)':
../../src/corelib/kernel/qobject.h:334: error: syntax error before>' token ../../src/corelib/kernel/qobject.h: In function
QList<T> qFindChildren(const
QObject*, const QString&)':
../../src/corelib/kernel/qobject.h:339: error: syntax error before>' token ../../src/corelib/kernel/qobject.h: In function
QList<T> qFindChildren(const
QObject*, const QRegExp&)':
../../src/corelib/kernel/qobject.h:346: error: syntax error before>' token make[1]: *** [.obj/release-shared-emb-arm/qabstractanimation.o] Error 1 make[1]: Leaving directory
/opt/qt-everywhere-commercial-src-4.8.4/src/corelib'
make: *** [sub-corelib-make_default-ordered] Error 2
@
So how to fix it ,any help is appreciated! -
Did you also run a confclean before ? Just to be sure that there are no old compiled object lying around
-
[quote author="SGaist" date="1366715316"]Did you also run a confclean before ? Just to be sure that there are no old compiled object lying around[/quote]
yes I do,but still wrong.
I was told that the error was caused by gcc,some versions are very strict in syntax check.So I changed to gcc-4.1.2 and arm-linux-gcc-4.3.2.The above error was gone,but I got a new error...
I inputted the command:
@./configure -prefix /opt/qt-4.8.4-arm -opensource -embedded arm -no-largefile -qt-sql-sqlite -no-svg -webkit -no-3dnow -no-sse -no-cups -iconv -no-xmlpatterns -nomake demo -force-pkg-config -xplatform qws/linux-arm-g++ -little-endian -qt-freetype -armfpa -qt-gfx-linuxfb -qt-kbd-linuxinput -qt-mouse-linuxtp -qt-mouse-tslib -no-glib -I/opt/tools/tslib/include -L/opt/tools/tslib/lib@
then I inputted command "make",I got the error:
@
../../JavaScriptCore/heap/Handle.h:82: warning: cast from 'JSC::JSCell*' to 'WebCore::JSDOMWrapper*' increases required alignment of target type
../../JavaScriptCore/heap/Handle.h: In static member function 'static T* JSC::HandleTypes<T>::getFromSlot(JSC::JSValue*) [with T = WebCore::JSDOMWindowShell]':
../../JavaScriptCore/heap/Handle.h:155: instantiated from 'typename JSC::HandleTypes<T>::ExternalType JSC::Handle<T>::get() const [with T = WebCore::JSDOMWindowShell]'
../../WebCore/bindings/js/ScriptController.h:79: instantiated from here
../../JavaScriptCore/heap/Handle.h:82: warning: cast from 'JSC::JSCell*' to 'WebCore::JSDOMWindowShell*' increases required alignment of target type
rm -f libQtWebKit.so.4.9.3 libQtWebKit.so libQtWebKit.so.4 libQtWebKit.so.4.9
arm-linux-g++ -Wl,-rpath-link,/opt/qt-everywhere-opensource-src-4.8.4/lib -fno-exceptions -Wl,--gc-sections -Wl,--no-undefined -Wl,--no-undefined -Wl,-O1 -Wl,-rpath,/opt/qt-4.8.4-arm/lib -Wl,-rpath,/opt/qt-4.8.4-arm/lib -shared -Wl,-soname,libQtWebKit.so.4 -o libQtWebKit.so.4.9.3 .obj/release-shared-emb-arm/MathMLNames.o .obj/release-shared-emb-arm/MathMLElementFactory.o .obj/release-shared-emb-arm/SVGNames.o
....
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgio-2.0
collect2: ld returned 1 exit status
make[2]: *** [../../../../../../lib/libQtWebKit.so.4.9.3] Erro 1
make[2]: Leaving directory/opt/qt-everywhere-opensource-src-4.8.4/src/3rdparty/webkit/Source/WebKit/qt' make[1]: *** [sub-WebKit-qt-QtWebKit-pro-make_default-ordered] Error 2 make[1]: Leaving directory
/opt/qt-everywhere-opensource-src-4.8.4/src/3rdparty/webkit/Source'
make: *** [sub-webkit-make_default-ordered] Error 2
@
I found "libgio-2.0.so" in "/usr/lib",so I copied it to "/usr/local/arm/4.3.2/lib",then inputted "make" again, then got
@
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/libgio-2.0.so when searching for -lgio-2.0
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgio-2.0
collect2: ld returned 1 exit status
@
then I downloaded the lastest release glib,but the error was still. I wanted to erase the libgio-2.0.so in "Makefile",but I failed to find it.
I am troubled by this problem for a few days,so how to solve it?
Best regards -
That's very wrong, you copied a x86 or x86_64 lib in your tool chain directory, you need to have the arm version.
You have to either find a precompiled version of libgio for arm or cross-compile it yourself
-
Thanks! I've solved the problem!
-
hqJma, how did you solve the problem?
I am having the same problem:
I am in the directory where my Qt embedded source files are. I do:
@./configure -embedded -opensource -confirm-license -verbose -qvfb
make@But then I get this error from make:
@.obj/release-shared-emb-x86/qtextcodec.o: In function
setup()': qtextcodec.cpp:(.text+0x23cc): undefined reference to
QIconvCodec::QIconvCodec()'
collect2: ld returned 1 exit status
make[1]: *** [../../lib/libQtCore.so.4.8.4] Error 1
make[1]: Leaving directory `/home/cstjean/qt/src/corelib'
make: *** [sub-corelib-make_default-ordered] Error 2@SGalst, how do you find a precompiled version of libgio for arm or cross-compile it? I am really inexperienced when it comes to linux installations.
-
You have several possibilities, in general I try to get the same set as the one that will be on the target (debian for example)
-
Would you mind elaborating? Such as, exactly which libraries should I be installing? I know nothing about libgio. I am very much a novice to all of this.
Edit: I'm asking because I've googled things like "ubuntu libgio" and "ubuntu gio" and I didn't find something that seemed like it was obviously like what I was looking for.
-
The short version: all those you are missing to complete your build.
Go to the debian package site and search for libgio
-
To anyone looking to solve a similar issue, I am on Ubuntu so I had to install gnome. I uninstalled my embedded Qt and started over again and it worked just fine.