Cross-compile in Qt 5.6 problem



  • Hi, I just doing all from this site: https://wiki.qt.io/Raspberry_Pi_Beginners_Guide
    The only difference is that I have "raspbian-jessie" instead of "raspbian-wheeze"
    I have some problems with "make" in step "Compiling qtbase". I can .configure and I see this:

    INPUT:
    sudo ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
    
    OUTPUT:
    This is the Qt Open Source Edition.
    
    You are licensed to use this software under the terms of
    the Lesser GNU General Public License (LGPL) versions 2.1.
    You are also licensed to use this software under the terms of
    the GNU Lesser General Public License (LGPL) versions 3.
    
    You have already accepted the terms of the Open Source license.
    
    Running configuration tests (phase 1)...
    Done running configuration tests.
    Creating qmake...
    Done.
    Running configuration tests (phase 2)...
    Note: PKG_CONFIG_LIBDIR automatically set to /mnt/rasp-pi-rootfs/usr/lib/pkgconfig:/mnt/rasp-pi-rootfs/usr/share/pkgconfig:/mnt/rasp-pi-rootfs/usr/lib/arm-linux-gnueabihf/pkgconfig
    Note: PKG_CONFIG_SYSROOT_DIR automatically set to /mnt/rasp-pi-rootfs
    WARNING: Unable to find file .device.vars
    WARNING: Unable to find file .device.vars
    Done running configuration tests.
    
       Configure summary
    
    Building on:   linux-g++ (x86_64, CPU features: mmx sse sse2)
    Building for:  devices/linux-rasp-pi-g++ (arm, CPU features: none detected)
    Platform notes:
    
                - Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
            
    Build options:
      Configuration .......... accessibility audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile dbus egl eglfs eglfs_brcm enable_new_dtags evdev eventfd freetype full-config getaddrinfo getifaddrs harfbuzz iconv inotify ipv6ifname large-config largefile linuxfb medium-config minimal-config mremap nis opengl opengles2 openssl openvg pcre png posix_fallocate precompile_header qpa qpa reduce_exports release release_tools rpath shared small-config system-jpeg system-zlib threadsafe-cloexec 
      Build parts ............  libs
      Mode ................... release; optimized tools
      Using sanitizer(s)...... none
      Using C++ standard ..... c++11
      Using gold linker....... no
      Using new DTAGS ........ yes
      Using PCH .............. yes
      Using LTCG ............. no
      Target compiler supports:
        Neon ................. no
    
    Qt modules and options:
      Qt D-Bus ............... yes (loading dbus-1 at runtime)
      Qt Concurrent .......... yes
      Qt GUI ................. yes
      Qt Widgets ............. yes
      Large File ............. yes
      QML debugging .......... yes
      Use system proxies ..... no
    
    Support enabled for:
      Accessibility .......... yes
      ALSA ................... no
      CUPS ................... no
      Evdev .................. yes
      FontConfig ............. no
      FreeType ............... yes (bundled copy)
      Glib ................... no
      GStreamer .............. no
      GTK theme .............. no
      HarfBuzz ............... yes (bundled copy)
      Iconv .................. yes
      ICU .................... no
      Image formats: 
        GIF .................. yes (plugin, using bundled copy)
        JPEG ................. yes (plugin, using system library)
        PNG .................. yes (in QtGui, using bundled copy)
      libinput................ no
      Logging backends: 
        journald ............... no
        syslog   ............... no
      mtdev .................. no
      Networking: 
        getaddrinfo .......... yes
        getifaddrs ........... yes
        IPv6 ifname .......... yes
        libproxy.............. no
        OpenSSL .............. yes (loading libraries at run-time)
      NIS .................... yes
      OpenGL / OpenVG: 
        EGL .................. yes
        OpenGL ............... yes (OpenGL ES 2.0+)
        OpenVG ............... yes-auto
      PCRE ................... yes (bundled copy)
      pkg-config ............. yes 
      PulseAudio ............. no
      QPA backends: 
        DirectFB ............. no
        EGLFS ................ yes
          EGLFS i.MX6 ........ no
          EGLFS i.MX6 Wayland. no
          EGLFS EGLDevice .... no
          EGLFS GBM .......... no
          EGLFS Mali ......... no
          EGLFS Raspberry Pi . yes
          EGLFS X11 .......... no
        LinuxFB .............. yes
        Mir client............ no
        XCB .................. no
      Session management ..... yes
      SQL drivers: 
        DB2 .................. no
        InterBase ............ no
        MySQL ................ no
        OCI .................. no
        ODBC ................. no
        PostgreSQL ........... no
        SQLite 2 ............. no
        SQLite ............... yes (plugin, using bundled copy)
        TDS .................. no
      tslib .................. no
      udev ................... no
      xkbcommon-x11........... no
      xkbcommon-evdev......... no
      zlib ................... yes (system library)
    
    
    NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1.
    Configure with '-qreal float' to create a build that is binary compatible with 5.1.
    
    NOTE: -optimized-tools is not useful in -release mode.
    
    
    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into /usr/local/qt5pi
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    
    

    now I doing "make", and at the start everything go fine:

    INPUT:
    make
    OUTPUT:
    cd src/ && ( test -e Makefile || /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/bin/qmake /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/src.pro -o Makefile ) && make -f Makefile 
    make[1]: Entering directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src'
    /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/bin/qmake -o Makefile src.pro
    cd corelib/ && ( test -e Makefile.qtzlib || /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/bin/qmake /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/corelib/qtzlib.pro -o Makefile.qtzlib ) && make -f Makefile.qtzlib 
    make[2]: Entering directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/corelib'
    /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/bin/qmake -o Makefile.qtzlib qtzlib.pro
    make[2]: Nothing to be done for 'first'.
    make[2]: Leaving directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/corelib'
    cd tools/bootstrap/ && ( test -e Makefile || /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/bin/qmake /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/tools/bootstrap/bootstrap.pro -o Makefile ) && make -f Makefile 
    make[2]: Entering directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/tools/bootstrap'
    make[2]: Nothing to be done for 'first'.
    make[2]: Leaving directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/tools/bootstrap'
    cd tools/moc/ && ( test -e Makefile || /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/bin/qmake /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/tools/moc/moc.pro -o Makefile ) && make -f Makefile 
    make[2]: Entering directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/tools/moc'
    make[2]: Nothing to be done for 'first'.
    make[2]: Leaving directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/tools/moc'
    cd tools/rcc/ && ( test -e Makefile || /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/bin/qmake /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/tools/rcc/rcc.pro -o Makefile ) && make -f Makefile 
    make[2]: Entering directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/tools/rcc'
    make[2]: Nothing to be done for 'first'.
    make[2]: Leaving directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/tools/rcc'
    cd 3rdparty/pcre/ && ( test -e Makefile || /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/bin/qmake /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/3rdparty/pcre/pcre.pro -o Makefile ) && make -f Makefile 
    make[2]: Entering directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/3rdparty/pcre'
    /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/bin/qmake -o Makefile pcre.pro
    make[2]: Nothing to be done for 'first'.
    make[2]: Leaving directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/3rdparty/pcre'
    cd corelib/ && ( test -e Makefile || /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/bin/qmake /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/corelib/corelib.pro -o Makefile ) && make -f Makefile 
    make[2]: Entering directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/corelib'
    /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/bin/qmake -o Makefile corelib.pro
    /home/michal/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -include .pch/Qt5Core -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/rasp-pi-rootfs -O3 -std=c++0x -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.6.0 -I../../include/QtCore/5.6.0/QtCore -Iglobal -I../3rdparty/pcre -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/devices/linux-rasp-pi-g++ -o .obj/qlibraryinfo.o global/qlibraryinfo.cpp
    rm -f libQt5Core.so.5.6.0 libQt5Core.so libQt5Core.so.5 libQt5Core.so.5.6
    /home/michal/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link,/mnt/rasp-pi-rootfs/opt/vc/lib -Wl,-rpath-link,/mnt/rasp-pi-rootfs/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/mnt/rasp-pi-rootfs/lib/arm-linux-gnueabihf -mfloat-abi=hard --sysroot=/mnt/rasp-pi-rootfs -Wl,--no-undefined -Wl,--version-script,QtCore.version -Wl,-O1 -Wl,--enable-new-dtags -shared -Wl,-soname,libQt5Core.so.5 -o libQt5Core.so.5.6.0 .obj/qstring_compat.o .obj/qabstractanimation.o .obj/qvariantanimation.o .obj/qpropertyanimation.o .obj/qanimationgroup.o .obj/qsequentialanimationgroup.o .obj/qparallelanimationgroup.o .obj/qpauseanimation.o .obj/qatomic_unix.o .obj/qglobal.o .obj/qglobalstatic.o .obj/qlibraryinfo.o .obj/qmalloc.o .obj/qnumeric.o .obj/qlogging.o .obj/qhooks.o .obj/qversiontagging.o .obj/qatomic.o .obj/qexception.o .obj/qresultstore.o .obj/qfutureinterface.o .obj/qfuturewatcher.o .obj/qmutex.o .obj/qreadwritelock.o .obj/qrunnable.o .obj/qmutexpool.o .obj/qsemaphore.o .obj/qthread.o .obj/qthreadpool.o .obj/qthreadstorage.o .obj/qthread_unix.o .obj/qwaitcondition_unix.o .obj/qarraydata.o .obj/qbitarray.o .obj/qbytearray.o .obj/qbytearraylist.o .obj/qbytearraymatcher.o .obj/qcollator.o .obj/qcommandlineoption.o .obj/qcommandlineparser.o .obj/qcryptographichash.o .obj/qdatetime.o .obj/qdatetimeparser.o .obj/qeasingcurve.o .obj/qelapsedtimer.o .obj/qfreelist.o .obj/qhash.o .obj/qline.o .obj/qlinkedlist.o .obj/qlist.o .obj/qlocale.o .obj/qlocale_tools.o .obj/qpoint.o .obj/qmap.o .obj/qmargins.o .obj/qmessageauthenticationcode.o .obj/qcontiguouscache.o .obj/qrect.o .obj/qregexp.o .obj/qrefcount.o .obj/qringbuffer.o .obj/qshareddata.o .obj/qsharedpointer.o .obj/qsimd.o .obj/qsize.o .obj/qstring.o .obj/qstringbuilder.o .obj/qstringlist.o .obj/qtextboundaryfinder.o .obj/qtimeline.o .obj/qtimezone.o .obj/qtimezoneprivate.o .obj/qunicodetools.o .obj/qvector.o .obj/qvsnprintf.o .obj/qversionnumber.o .obj/qelapsedtimer_unix.o .obj/qlocale_unix.o .obj/qtimezoneprivate_tz.o .obj/qcollator_posix.o .obj/qregularexpression.o .obj/harfbuzz-buffer.o .obj/harfbuzz-gdef.o .obj/harfbuzz-gsub.o .obj/harfbuzz-gpos.o .obj/harfbuzz-impl.o .obj/harfbuzz-open.o .obj/harfbuzz-stream.o .obj/harfbuzz-shaper-all.o .obj/qharfbuzz.o .obj/qabstractfileengine.o .obj/qbuffer.o .obj/qdatastream.o .obj/qdataurl.o .obj/qtldurl.o .obj/qdebug.o .obj/qdir.o .obj/qdiriterator.o .obj/qfile.o .obj/qfiledevice.o .obj/qfileinfo.o .obj/qipaddress.o .obj/qiodevice.o .obj/qlockfile.o .obj/qnoncontiguousbytedevice.o .obj/qprocess.o .obj/qstorageinfo.o .obj/qtextstream.o .obj/qtemporarydir.o .obj/qtemporaryfile.o .obj/qresource.o .obj/qresource_iterator.o .obj/qsavefile.o .obj/qstandardpaths.o .obj/qurl.o .obj/qurlidna.o .obj/qurlquery.o .obj/qurlrecode.o .obj/qsettings.o .obj/qfsfileengine.o .obj/qfsfileengine_iterator.o .obj/qfilesystemwatcher.o .obj/qfilesystemwatcher_polling.o .obj/qfilesystementry.o .obj/qfilesystemengine.o .obj/qfileselector.o .obj/qloggingcategory.o .obj/qloggingregistry.o .obj/qfsfileengine_unix.o .obj/qfilesystemengine_unix.o .obj/qlockfile_unix.o .obj/qprocess_unix.o .obj/qfilesystemiterator_unix.o .obj/forkfd_qt.o .obj/qstandardpaths_unix.o .obj/qstorageinfo_unix.o .obj/qfilesystemwatcher_inotify.o .obj/qabstractitemmodel.o .obj/qabstractproxymodel.o .obj/qitemselectionmodel.o .obj/qidentityproxymodel.o .obj/qsortfilterproxymodel.o .obj/qstringlistmodel.o .obj/qjson.o .obj/qjsondocument.o .obj/qjsonobject.o .obj/qjsonarray.o .obj/qjsonvalue.o .obj/qjsonwriter.o .obj/qjsonparser.o .obj/qfactoryinterface.o .obj/qpluginloader.o .obj/qfactoryloader.o .obj/quuid.o .obj/qlibrary.o .obj/qelfparser_p.o .obj/qmachparser.o .obj/qlibrary_unix.o .obj/qabstracteventdispatcher.o .obj/qabstractnativeeventfilter.o .obj/qbasictimer.o .obj/qeventloop.o .obj/qcoreapplication.o .obj/qcoreevent.o .obj/qmetaobject.o .obj/qmetatype.o .obj/qmetaobjectbuilder.o .obj/qmimedata.o .obj/qobject.o .obj/qobjectcleanuphandler.o .obj/qsignalmapper.o .obj/qsocketnotifier.o .obj/qtimer.o .obj/qtranslator.o .obj/qvariant.o .obj/qcoreglobaldata.o .obj/qsharedmemory.o .obj/qsystemsemaphore.o .obj/qpointer.o .obj/qmath.o .obj/qsystemerror.o .obj/qcore_unix.o .obj/qcrashhandler.o .obj/qeventdispatcher_unix.o .obj/qtimerinfo_unix.o .obj/qsharedmemory_posix.o .obj/qsharedmemory_systemv.o .obj/qsharedmemory_unix.o .obj/qsystemsemaphore_posix.o .obj/qsystemsemaphore_systemv.o .obj/qsystemsemaphore_unix.o .obj/qisciicodec.o .obj/qlatincodec.o .obj/qsimplecodec.o .obj/qtextcodec.o .obj/qtsciicodec.o .obj/qutfcodec.o .obj/qgb18030codec.o .obj/qjpunicode.o .obj/qeucjpcodec.o .obj/qjiscodec.o .obj/qsjiscodec.o .obj/qeuckrcodec.o .obj/qbig5codec.o .obj/qiconvcodec.o .obj/qstatemachine.o .obj/qabstractstate.o .obj/qstate.o .obj/qfinalstate.o .obj/qhistorystate.o .obj/qabstracttransition.o .obj/qsignaltransition.o .obj/qeventtransition.o .obj/qmimedatabase.o .obj/qmimetype.o .obj/qmimemagicrulematcher.o .obj/qmimetypeparser.o .obj/qmimemagicrule.o .obj/qmimeglobpattern.o .obj/qmimeprovider.o .obj/qxmlstream.o .obj/qxmlutils.o .obj/qrc_mimetypes.o .obj/moc_qabstractanimation_p.o .obj/moc_qnamespace.o .obj/moc_qthread.o .obj/moc_qthreadpool.o .obj/moc_qfuturewatcher.o .obj/moc_qeasingcurve.o .obj/moc_qlocale.o .obj/moc_qtimeline.o .obj/moc_qfile.o .obj/moc_qfiledevice.o .obj/moc_qiodevice.o .obj/moc_qnoncontiguousbytedevice_p.o .obj/moc_qtextstream_p.o .obj/moc_qtemporaryfile.o .obj/moc_qsavefile.o .obj/moc_qsettings.o .obj/moc_qfilesystemwatcher_p.o .obj/moc_qfilesystemwatcher_polling_p.o .obj/moc_qfilesystemwatcher_inotify_p.o .obj/moc_qabstractitemmodel.o .obj/moc_qstringlistmodel.o .obj/moc_qpluginloader.o .obj/moc_qlibrary.o .obj/moc_qfactoryloader_p.o .obj/moc_qabstracteventdispatcher.o .obj/moc_qeventloop.o .obj/moc_qcoreapplication.o .obj/moc_qcoreevent.o .obj/moc_qmimedata.o .obj/moc_qsocketnotifier.o .obj/moc_qtimer.o .obj/moc_qtranslator.o .obj/moc_qobjectcleanuphandler.o .obj/moc_qsharedmemory.o .obj/moc_qeventdispatcher_unix_p.o .obj/moc_qabstractstate.o .obj/moc_qstate.o .obj/moc_qfinalstate.o .obj/moc_qhistorystate.o .obj/moc_qhistorystate_p.o .obj/moc_qabstracttransition.o .obj/moc_qsignaltransition.o .obj/moc_qeventtransition.o  -lpthread -lz -L/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/lib -lqtpcre -lm -ldl -lrt 
    
    
    

    but after this I have errors

    /home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/lib/libqtpcre.a: could not read symbols: File format not recognized
    collect2: error: ld returned 1 exit status
    make[2]: *** [../../lib/libQt5Core.so.5.6.0] Error 1
    Makefile:1285: recipe for target '../../lib/libQt5Core.so.5.6.0' failed
    make[2]: Leaving directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src/corelib'
    Makefile:195: recipe for target 'sub-corelib-make_first' failed
    make[1]: *** [sub-corelib-make_first] Error 2
    make[1]: Leaving directory '/home/michal/Qt/Qt5.6.0/5.6/Src/qtbase/src'
    Makefile:45: recipe for target 'sub-src-make_first' failed
    make: *** [sub-src-make_first] Error 2
    

    I would be very grateful if someone can help me with this errors.



  • Problem solved, I just change Qt from 5.6 to 5.7 and fixQualifiedLibraryPaths from https://wiki.qt.io/Raspberry_Pi_Beginners_Guide to sysroot-relativelinks.py from https://wiki.qt.io/RaspberryPi2EGLFS.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.