Installing Qt 4.8 for Phytec-Wega (embedded linux) board (arm-cortexa8-linux-gnueabihf cross-compiler)
-
I have a 64-bit Ubuntu 14.04 LTS (within VirtualBox). I have already installed basic Qt from online installer (qt 5.x). Now I want to install also qt 4.8 from source since there is already such a runtime on phytec device. I'd like to test first cross-compiled app to transfer to the device and successfully run it. I already manged it without any error for using default ./config (without any parameters), and make, and make install. I could run it on the host linux but on the device there was an error upon executing saying something like: unexpected ")" in line 2. Now, what happens trying to install embedded version of the qt4.8:
First, I used these parameters for qt 4.8 configuration (within the root folder of the unpacked qt 4.8):
sudo ./configure -v -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -little-endian -host-big-endian -prefix /home/phytec/qt4.8-arm
And it doesn't fail (no error).Second, using
sudo make
it returns:
make[1]: arm-cortexa8-linux-gnueabihf-g++: Command not found
make[1]: *** [.obj/release-shared-emb-arm/qabstractanimation.o] Error 127
make[1]: Leaving directory `/home/branko/Downloads/qt-everywhere-opensource-src-4.8.6/src/corelib'
make: *** [sub-corelib-make_default-ordered] Error 2What else have I done?
I used arm-cortesa8-linux-gnueabihf cross compiler as suggested from Phytec (although we have PD13.0.0, and it was taken from PD14.0.0 folder).
I appended into profile under /etc
export PATH=$PATH:/home/branko/arm-cortexa8-linux-gnueabihf/bin
export ARCH=arm
export CROSS_COMPILE=arm-cortexa8-linux-gnueabihf- # COULD THIS BE A PROBLEM !?Then I changed that withing qmake.conf (mkspecs/qws/linux-arm-gnueabi-g++/)
QMAKE_CC = arm-cortexa8-linux-gnueabihf-gcc
QMAKE_CXX = arm-cortexa8-linux-gnueabihf-g++
QMAKE_LINK = arm-cortexa8-linux-gnueabihf-g++
QMAKE_LINK_SHLIB = arm-cortexa8-linux-gnueabihf-g++modifications to linux.conf
QMAKE_AR = arm-cortexa8-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY = arm-cortexa8-linux-gnueabihf-objcopy
QMAKE_STRIP = arm-cortexa8-linux-gnueabihf-strip
In the first try I used in all six lines without "hf" (so only gnueabi)I was using make clean and then make confclean trying different possibilities.
So, pls help. What was wrong?
Thnx in advance
Branko -
Hi and welcome to devnet,
Looks like you don't have your cross-compiler in your PATH. So either update your PATH environment variable in e.g. your .profile file or give the full path to it in your mkspec
Hope it helps
-
Thanks for the hint, SGaist.
I finally tried to run it (the cross-compiler) manually without parameters and it responded as there is no such file or directory.
And the reason is I try to execute 32-bit executable on the 64-bit Ubuntu (file ... command showed it). I installed support for 32-bit runtime on a 64-bit Ubuntu and now it is recognised as an executable. Although I will see what happens with a qt 4.8 installation.
I'll let you know.
-
After I used absolute paths in qmake.conf (as QMAKE_CXX = /home/branko/arm-cortexa8-linux-gnueabihf/bin/arm-cortexa8-linux-gnueabihf-g++ etc.) I don't get previous error any more (that the cross compiler file is missing).
Now I get this error:
-lpthread -lm -ldl
.obj/release-shared-emb-arm/qtconcurrentiteratekernel.o: In functiongetticks()': qtconcurrentiteratekernel.cpp:(.text+0x2c): undefined reference to
clock_gettime'
collect2: error: ld returned 1 exit status
make[1]: *** [../../lib/libQtCore.so.4.8.6] Error 1
make[1]: Leaving directory `/home/branko/Downloads/qt-everywhere-opensource-src-4.8.6/src/corelib'
make: *** [sub-corelib-make_default-ordered] Error 2What could be the reason for this?
Thanks,
Branko -
This was put out before the error:
rm -f libQtCore.so.4.8.6 libQtCore.so libQtCore.so.4 libQtCore.so.4.8
/home/branko/arm-cortexa8-linux-gnueabihf/bin/arm-cortexa8-linux-gnueabihf-g++ -Wl,-rpath-link,/home/branko/Downloads/qt-everywhere-opensource-src-4.8.6/lib -Wl,--no-undefined -Wl,-e,qt_core_boilerplate -Wl,-O1 -Wl,-rpath,/home/phytec/qt4.8-arm/lib -Wl,-rpath,/home/phytec/qt4.8-arm/lib -shared -Wl,-soname,libQtCore.so.4 -o libQtCore.so.4.8.6 .obj/release-shared-emb-arm/qabstractanimation.o .obj/release-shared-emb-arm/qvariantanimation.o .obj/release-shared-emb-arm/qpropertyanimation.o .obj/release-shared-emb-arm/qanimationgroup.o .obj/release-shared-emb-arm/qsequentialanimationgroup.o .obj/release-shared-emb-arm/qparallelanimationgroup.o .obj/release-shared-emb-arm/qpauseanimation.o .obj/release-shared-emb-arm/qatomic_arm.o .obj/release-shared-emb-arm/qfuture.o .obj/release-shared-emb-arm/qfutureinterface.o .obj/release-shared-emb-arm/qfuturesynchronizer.o .obj/release-shared-emb-arm/qfuturewatcher.o .obj/release-shared-emb-arm/qrunnable.o .obj/release-shared-emb-arm/qtconcurrentfilter.o .obj/release-shared-emb-arm/qtconcurrentmap.o .obj/release-shared-emb-arm/qtconcurrentresultstore.o .obj/release-shared-emb-arm/qtconcurrentthreadengine.o .obj/release-shared-emb-arm/qtconcurrentiteratekernel.o .obj/release-shared-emb-arm/qtconcurrentexception.o .obj/release-shared-emb-arm/qthreadpool.o .obj/release-shared-emb-arm/qglobal.o .obj/release-shared-emb-arm/qlibraryinfo.o .obj/release-shared-emb-arm/qmalloc.o .obj/release-shared-emb-arm/qnumeric.o .obj/release-shared-emb-arm/qatomic.o .obj/release-shared-emb-arm/qmutex.o .obj/release-shared-emb-arm/qreadwritelock.o .obj/release-shared-emb-arm/qmutexpool.o .obj/release-shared-emb-arm/qsemaphore.o .obj/release-shared-emb-arm/qthread.o .obj/release-shared-emb-arm/qthreadstorage.o .obj/release-shared-emb-arm/qmutex_unix.o .obj/release-shared-emb-arm/qthread_unix.o .obj/release-shared-emb-arm/qwaitcondition_unix.o .obj/release-shared-emb-arm/qbitarray.o .obj/release-shared-emb-arm/qbytearray.o .obj/release-shared-emb-arm/qbytearraymatcher.o .obj/release-shared-emb-arm/qcryptographichash.o .obj/release-shared-emb-arm/qdatetime.o .obj/release-shared-emb-arm/qeasingcurve.o .obj/release-shared-emb-arm/qelapsedtimer.o .obj/release-shared-emb-arm/qhash.o .obj/release-shared-emb-arm/qline.o .obj/release-shared-emb-arm/qlinkedlist.o .obj/release-shared-emb-arm/qlist.o .obj/release-shared-emb-arm/qlocale.o .obj/release-shared-emb-arm/qlocale_tools.o .obj/release-shared-emb-arm/qpoint.o .obj/release-shared-emb-arm/qmap.o .obj/release-shared-emb-arm/qmargins.o .obj/release-shared-emb-arm/qcontiguouscache.o .obj/release-shared-emb-arm/qrect.o .obj/release-shared-emb-arm/qregexp.o .obj/release-shared-emb-arm/qshareddata.o .obj/release-shared-emb-arm/qsharedpointer.o .obj/release-shared-emb-arm/qsimd.o .obj/release-shared-emb-arm/qsize.o .obj/release-shared-emb-arm/qstring.o .obj/release-shared-emb-arm/qstringbuilder.o .obj/release-shared-emb-arm/qstringlist.o .obj/release-shared-emb-arm/qtextboundaryfinder.o .obj/release-shared-emb-arm/qtimeline.o .obj/release-shared-emb-arm/qvector.o .obj/release-shared-emb-arm/qvsnprintf.o .obj/release-shared-emb-arm/qelapsedtimer_unix.o .obj/release-shared-emb-arm/qlocale_unix.o .obj/release-shared-emb-arm/adler32.o .obj/release-shared-emb-arm/compress.o .obj/release-shared-emb-arm/crc32.o .obj/release-shared-emb-arm/deflate.o .obj/release-shared-emb-arm/gzclose.o .obj/release-shared-emb-arm/gzlib.o .obj/release-shared-emb-arm/gzread.o .obj/release-shared-emb-arm/gzwrite.o .obj/release-shared-emb-arm/infback.o .obj/release-shared-emb-arm/inffast.o .obj/release-shared-emb-arm/inflate.o .obj/release-shared-emb-arm/inftrees.o .obj/release-shared-emb-arm/trees.o .obj/release-shared-emb-arm/uncompr.o .obj/release-shared-emb-arm/zutil.o .obj/release-shared-emb-arm/harfbuzz-buffer.o .obj/release-shared-emb-arm/harfbuzz-gdef.o .obj/release-shared-emb-arm/harfbuzz-gsub.o .obj/release-shared-emb-arm/harfbuzz-gpos.o .obj/release-shared-emb-arm/harfbuzz-impl.o .obj/release-shared-emb-arm/harfbuzz-open.o .obj/release-shared-emb-arm/harfbuzz-stream.o .obj/release-shared-emb-arm/harfbuzz-shaper-all.o .obj/release-shared-emb-arm/qharfbuzz.o .obj/release-shared-emb-arm/qabstractfileengine.o .obj/release-shared-emb-arm/qbuffer.o .obj/release-shared-emb-arm/qdatastream.o .obj/release-shared-emb-arm/qdataurl.o .obj/release-shared-emb-arm/qtldurl.o .obj/release-shared-emb-arm/qdebug.o .obj/release-shared-emb-arm/qdir.o .obj/release-shared-emb-arm/qdiriterator.o .obj/release-shared-emb-arm/qfile.o .obj/release-shared-emb-arm/qfileinfo.o .obj/release-shared-emb-arm/qiodevice.o .obj/release-shared-emb-arm/qnoncontiguousbytedevice.o .obj/release-shared-emb-arm/qprocess.o .obj/release-shared-emb-arm/qtextstream.o .obj/release-shared-emb-arm/qtemporaryfile.o .obj/release-shared-emb-arm/qresource.o .obj/release-shared-emb-arm/qresource_iterator.o .obj/release-shared-emb-arm/qurl.o .obj/release-shared-emb-arm/qsettings.o .obj/release-shared-emb-arm/qfsfileengine.o .obj/release-shared-emb-arm/qfsfileengine_iterator.o .obj/release-shared-emb-arm/qfilesystemwatcher.o .obj/release-shared-emb-arm/qfilesystementry.o .obj/release-shared-emb-arm/qfilesystemengine.o .obj/release-shared-emb-arm/qfsfileengine_unix.o .obj/release-shared-emb-arm/qfilesystemengine_unix.o .obj/release-shared-emb-arm/qprocess_unix.o .obj/release-shared-emb-arm/qfilesystemiterator_unix.o .obj/release-shared-emb-arm/qfilesystemwatcher_inotify.o .obj/release-shared-emb-arm/qfilesystemwatcher_dnotify.o .obj/release-shared-emb-arm/qpluginloader.o .obj/release-shared-emb-arm/qfactoryloader.o .obj/release-shared-emb-arm/quuid.o .obj/release-shared-emb-arm/qlibrary.o .obj/release-shared-emb-arm/qelfparser_p.o .obj/release-shared-emb-arm/qlibrary_unix.o -
.obj/release-shared-emb-arm/qabstracteventdispatcher.o .obj/release-shared-emb-arm/qabstractitemmodel.o .obj/release-shared-emb-arm/qbasictimer.o .obj/release-shared-emb-arm/qeventloop.o .obj/release-shared-emb-arm/qcoreapplication.o .obj/release-shared-emb-arm/qcoreevent.o .obj/release-shared-emb-arm/qmetaobject.o .obj/release-shared-emb-arm/qmetatype.o .obj/release-shared-emb-arm/qmimedata.o .obj/release-shared-emb-arm/qobject.o .obj/release-shared-emb-arm/qobjectcleanuphandler.o .obj/release-shared-emb-arm/qsignalmapper.o .obj/release-shared-emb-arm/qsocketnotifier.o .obj/release-shared-emb-arm/qtimer.o .obj/release-shared-emb-arm/qtranslator.o .obj/release-shared-emb-arm/qvariant.o .obj/release-shared-emb-arm/qcoreglobaldata.o .obj/release-shared-emb-arm/qsharedmemory.o .obj/release-shared-emb-arm/qsystemsemaphore.o .obj/release-shared-emb-arm/qpointer.o .obj/release-shared-emb-arm/qmath.o .obj/release-shared-emb-arm/qsystemerror.o .obj/release-shared-emb-arm/qcore_unix.o .obj/release-shared-emb-arm/qcrashhandler.o .obj/release-shared-emb-arm/qsharedmemory_unix.o .obj/release-shared-emb-arm/qsystemsemaphore_unix.o .obj/release-shared-emb-arm/qeventdispatcher_unix.o .obj/release-shared-emb-arm/qisciicodec.o .obj/release-shared-emb-arm/qlatincodec.o .obj/release-shared-emb-arm/qsimplecodec.o .obj/release-shared-emb-arm/qtextcodec.o .obj/release-shared-emb-arm/qtsciicodec.o .obj/release-shared-emb-arm/qutfcodec.o .obj/release-shared-emb-arm/qtextcodecplugin.o .obj/release-shared-emb-arm/qfontlaocodec.o .obj/release-shared-emb-arm/qgb18030codec.o .obj/release-shared-emb-arm/qjpunicode.o .obj/release-shared-emb-arm/qeucjpcodec.o .obj/release-shared-emb-arm/qjiscodec.o .obj/release-shared-emb-arm/qsjiscodec.o .obj/release-shared-emb-arm/qeuckrcodec.o .obj/release-shared-emb-arm/qbig5codec.o .obj/release-shared-emb-arm/qfontjpcodec.o .obj/release-shared-emb-arm/qstatemachine.o .obj/release-shared-emb-arm/qabstractstate.o .obj/release-shared-emb-arm/qstate.o .obj/release-shared-emb-arm/qfinalstate.o .obj/release-shared-emb-arm/qhistorystate.o .obj/release-shared-emb-arm/qabstracttransition.o .obj/release-shared-emb-arm/qsignaltransition.o .obj/release-shared-emb-arm/qeventtransition.o .obj/release-shared-emb-arm/qxmlstream.o .obj/release-shared-emb-arm/qxmlutils.o .obj/release-shared-emb-arm/moc_qabstractanimation_p.o .obj/release-shared-emb-arm/moc_qfuturewatcher.o .obj/release-shared-emb-arm/moc_qthreadpool.o .obj/release-shared-emb-arm/moc_qnamespace.o .obj/release-shared-emb-arm/moc_qthread.o .obj/release-shared-emb-arm/moc_qeasingcurve.o .obj/release-shared-emb-arm/moc_qlocale.o .obj/release-shared-emb-arm/moc_qtimeline.o .obj/release-shared-emb-arm/moc_qfile.o .obj/release-shared-emb-arm/moc_qiodevice.o .obj/release-shared-emb-arm/moc_qnoncontiguousbytedevice_p.o .obj/release-shared-emb-arm/moc_qtemporaryfile.o .obj/release-shared-emb-arm/moc_qsettings.o .obj/release-shared-emb-arm/moc_qfilesystemwatcher_p.o .obj/release-shared-emb-arm/moc_qfilesystemwatcher_inotify_p.o .obj/release-shared-emb-arm/moc_qfilesystemwatcher_dnotify_p.o .obj/release-shared-emb-arm/moc_qpluginloader.o .obj/release-shared-emb-arm/moc_qlibrary.o .obj/release-shared-emb-arm/moc_qfactoryloader_p.o .obj/release-shared-emb-arm/moc_qabstracteventdispatcher.o .obj/release-shared-emb-arm/moc_qabstractitemmodel.o .obj/release-shared-emb-arm/moc_qeventloop.o .obj/release-shared-emb-arm/moc_qcoreapplication.o .obj/release-shared-emb-arm/moc_qcoreevent.o .obj/release-shared-emb-arm/moc_qmimedata.o .obj/release-shared-emb-arm/moc_qsocketnotifier.o .obj/release-shared-emb-arm/moc_qtimer.o .obj/release-shared-emb-arm/moc_qtranslator.o .obj/release-shared-emb-arm/moc_qobjectcleanuphandler.o .obj/release-shared-emb-arm/moc_qsharedmemory.o .obj/release-shared-emb-arm/moc_qeventdispatcher_unix_p.o .obj/release-shared-emb-arm/moc_qtextcodecplugin.o .obj/release-shared-emb-arm/moc_qabstractstate.o .obj/release-shared-emb-arm/moc_qstate.o .obj/release-shared-emb-arm/moc_qfinalstate.o .obj/release-shared-emb-arm/moc_qhistorystate.o .obj/release-shared-emb-arm/moc_qabstracttransition.o .obj/release-shared-emb-arm/moc_qsignaltransition.o .obj/release-shared-emb-arm/moc_qeventtransition.o -L/home/branko/Downloads/qt-everywhere-opensource-src-4.8.6/lib -lpthread -lm -ldl
-
Which version of libc are you linking to ?
-
I'm not quite sure if I know what you are asking ...
ldd --version says 2.19
That confirms also the test program:
#include <stdio.h>
#include <gnu/libc-version.h>
int main (void) { puts (gnu_get_libc_version ()); return 0; }
And a g++ compiler has the version: 4.8.2 (g++ --version)If you mean cross-compiler (arm-cortexa8-linux-gnueabihf-g++):
The cross-compiler's version is (arm-cortexa8-linux-gnueabihf-g++ --version): 4.7.3
arm-cortexa8-linux-gnueabihf-g++ (OSELAS.Toolchain-2012.12.1 linaro-4.7-2012.11) 4.7.3 20121106 (prerelease)on >> arm-cortexa8-linux-gnueabihf-g++ -print-libgcc-file-name << I get:
/home/branko/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/libgcc.a -
I don't know how to get the version of the cross compiler's libc.
ldd doesn't return it as it doesn't recognise it as a suitable librarey:/home/branko/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/libgcc.a
returns:
/home/branko/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/libgcc.a: command not foundldd /home/branko/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/libgcc.a
says
not a dynamic executablePls guys, help
Branko