Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

port Qt5.13.0 to ARM aarch64 failed



  • I try to port qt5.13.0 to arm(ubuntu 16.04, aarch64), using qt-everywhere-opensource-src-5.13.0.tar.xz, but I got the following error, could someone help me to solve it?

    double-conversion/include/double-conversion -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/forkfd -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/tinycbor/src -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/include -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/include/QtCore -I../../include -I../../include/QtCore -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/include/QtCore/5.13.0 -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/include/QtCore/5.13.0/QtCore -I../../include/QtCore/5.13.0 -I../../include/QtCore/5.13.0/QtCore -I.moc -I.tracegen -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/pcre2/src -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/mkspecs/linux-aarch64-gnu-g++ -o .obj/qstatemachine.o /home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/corelib/statemachine/qstatemachine.cpp
    aarch64-linux-gnu-g++ -c -pipe -O3 -std=c++1y -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -Wvla -Wdate-time -D_REENTRANT -fPIC -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -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 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DPCRE2_CODE_UNIT_WIDTH=16 -isystem /home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/corelib -I. -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/zlib/src -Iglobal -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/harfbuzz/src -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/md5 -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/md4 -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/sha3 -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/double-conversion/include -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/double-conversion/include/double-conversion -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/forkfd -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/tinycbor/src -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/include -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/include/QtCore -I../../include -I../../include/QtCore -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/include/QtCore/5.13.0 -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/include/QtCore/5.13.0/QtCore -I../../include/QtCore/5.13.0 -I../../include/QtCore/5.13.0/QtCore -I.moc -I.tracegen -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/3rdparty/pcre2/src -I/home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/mkspecs/linux-aarch64-gnu-g++ -o .obj/qhistorystate.o /home/firefly/Downloads/qt-everywhere-src-5.13.0/qtbase/src/corelib/statemachine/qhistorystate.cpp
    rm -f libQt5Core.so.5.13.0 libQt5Core.so libQt5Core.so.5 libQt5Core.so.5.13
    aarch64-linux-gnu-g++ -Wl,--no-undefined -Wl,--version-script,QtCore.version -Wl,-O1 -Wl,--enable-new-dtags -shared -Wl,-soname,libQt5Core.so.5 -o libQt5Core.so.5.13.0 .obj/qabstractanimation.o .obj/qvariantanimation.o .obj/qpropertyanimation.o .obj/qanimationgroup.o .obj/qsequentialanimationgroup.o .obj/qparallelanimationgroup.o .obj/qpauseanimation.o .obj/archdetect.o .obj/qendian.o .obj/qglobal.o .obj/qlibraryinfo.o .obj/qmalloc.o .obj/qnumeric.o .obj/qfloat16.o .obj/qoperatingsystemversion.o .obj/qlogging.o .obj/qrandom.o .obj/qhooks.o .obj/minimum-linux.o .obj/qversiontagging.o .obj/qrunnable.o .obj/qthread.o .obj/qthread_unix.o .obj/qatomic.o .obj/qmutex.o .obj/qmutexpool.o .obj/qreadwritelock.o .obj/qsemaphore.o .obj/qthreadpool.o .obj/qthreadstorage.o .obj/qmutex_linux.o .obj/qwaitcondition_unix.o .obj/qexception.o .obj/qfutureinterface.o .obj/qfuturewatcher.o .obj/qresultstore.o .obj/qarraydata.o .obj/qbitarray.o .obj/qbytearray.o .obj/qbytearraylist.o .obj/qbytearraymatcher.o .obj/qcollator.o .obj/qcryptographichash.o .obj/qdatetime.o .obj/qeasingcurve.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/qstringview.o .obj/qtextboundaryfinder.o .obj/qtimeline.o .obj/qunicodetools.o .obj/qvsnprintf.o .obj/qversionnumber.o .obj/qlocale_unix.o .obj/adler32.o .obj/compress.o .obj/crc32.o .obj/deflate.o .obj/gzclose.o .obj/gzlib.o .obj/gzread.o .obj/gzwrite.o .obj/infback.o .obj/inffast.o .obj/inflate.o .obj/inftrees.o .obj/trees.o .obj/uncompr.o .obj/zutil.o .obj/qcollator_posix.o .obj/qtimezone.o .obj/qtimezoneprivate.o .obj/qtimezoneprivate_tz.o .obj/qdatetimeparser.o .obj/qregularexpression.o .obj/qcommandlineoption.o .obj/qcommandlineparser.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/bignum.o .obj/bignum-dtoa.o .obj/cached-powers.o .obj/diy-fp.o .obj/double-conversion.o .obj/fast-dtoa.o .obj/fixed-dtoa.o .obj/strtod.o .obj/qabstractfileengine.o .obj/qbuffer.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/qstorageinfo.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/qfsfileengine.o .obj/qfsfileengine_iterator.o .obj/qfilesystementry.o .obj/qfilesystemengine.o .obj/qfileselector.o .obj/qloggingcategory.o .obj/qloggingregistry.o .obj/qfilesystemwatcher.o .obj/qfilesystemwatcher_polling.o .obj/qfilesystemwatcher_inotify.o .obj/qprocess.o .obj/qprocess_unix.o .obj/qsettings.o .obj/qfsfileengine_unix.o .obj/qfilesystemengine_unix.o .obj/qlockfile_unix.o .obj/qfilesystemiterator_unix.o .obj/forkfd_qt.o .obj/qstandardpaths_unix.o .obj/qstorageinfo_unix.o .obj/qabstractitemmodel.o .obj/qitemselectionmodel.o .obj/qabstractproxymodel.o .obj/qconcatenatetablesproxymodel.o .obj/qidentityproxymodel.o .obj/qsortfilterproxymodel.o .obj/qtransposeproxymodel.o .obj/qstringlistmodel.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/qdeadlinetimer.o .obj/qelapsedtimer.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/qtestsupport_core.o .obj/qcore_unix.o .obj/qeventdispatcher_unix.o .obj/qtimerinfo_unix.o .obj/qelapsedtimer_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/qutfcodec.o .obj/qlatincodec.o .obj/qsimplecodec.o .obj/qtextcodec.o .obj/qisciicodec.o .obj/qtsciicodec.o .obj/qgb18030codec.o .obj/qjpunicode.o .obj/qeucjpcodec.o .obj/qjiscodec.o .obj/qsjiscodec.o .obj/qeuckrcodec.o .obj/qbig5codec.o .obj/qcborstream.o .obj/qcbordiagnostic.o .obj/qcborvalue.o .obj/qdatastream.o .obj/qjson.o .obj/qjsoncbor.o .obj/qjsondocument.o .obj/qjsonobject.o .obj/qjsonarray.o .obj/qjsonvalue.o .obj/qjsonwriter.o .obj/qjsonparser.o .obj/qtextstream.o .obj/qxmlstream.o .obj/qxmlutils.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/qstring_compat.o .obj/qfloat16tables.o .obj/qrc_mimetypes.o .obj/moc_qtransposeproxymodel.o .obj/moc_qmimetype.o -lpthread -lm /home/firefly/Downloads/build_qt/qtbase/lib/libqtpcre2.a /usr/lib/aarch64-linux-gnu/libdl.so
    .obj/qmutex_linux.o: In function QBasicMutex::lockInternal()': qmutex_linux.cpp:(.text+0x0): multiple definition ofQBasicMutex::lockInternal()'
    .obj/qmutex.o:qmutex.cpp:(.text+0x150): first defined here
    .obj/qmutex_linux.o: In function QBasicMutex::lockInternal(int)': qmutex_linux.cpp:(.text+0x60): multiple definition ofQBasicMutex::lockInternal(int)'
    .obj/qmutex.o:qmutex.cpp:(.text+0x2a8): first defined here
    .obj/qmutex_linux.o: In function QBasicMutex::unlockInternal()': qmutex_linux.cpp:(.text+0x1e0): multiple definition ofQBasicMutex::unlockInternal()'
    .obj/qmutex.o:qmutex.cpp:(.text+0x550): first defined here
    collect2: error: ld returned 1 exit status
    Makefile:1244: recipe for target '../../lib/libQt5Core.so.5.13.0' failed
    make[3]: *** [../../lib/libQt5Core.so.5.13.0] Error 1
    make[3]: Leaving directory '/home/firefly/Downloads/build_qt/qtbase/src/corelib'
    Makefile:226: recipe for target 'sub-corelib-make_first' failed
    make[2]: *** [sub-corelib-make_first] Error 2
    make[2]: Leaving directory '/home/firefly/Downloads/build_qt/qtbase/src'
    Makefile:50: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/firefly/Downloads/build_qt/qtbase'
    Makefile:71: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2


  • Lifetime Qt Champion

    Hi,

    What do you mean by port ?
    What configuration options did you use ?

    Ubuntu through Debian already provides a Qt port for arm64.



  • @sgaist
    I want to compile and install qt5.13 in my arm board,but during make the above error happened
    . I look.through the qt code, the macro "QT_LINUX_FUTEX" will decide to use lockinternal
    in qmutex.cpp or in qmutex_linux.cpp , it seems impossible to use both of them, how do you think
    . By the way, I am outside now, I don't think it is relative to my configuration, I WILL send to
    you later



  • This post is deleted!


  • @sgaist
    Hi,the following is my configure, please have a check

    #!/bin/sh

    ../qt-everywhere-src-5.13.0/configure
    -v
    -prefix /usr/local/qt5.13
    -opensource
    -confirm-license
    -shared
    -release
    -make libs
    -xplatform linux-aarch64-gnu-g++
    -no-opengl
    -linuxfb
    -qt-libjpeg
    -qt-libpng
    -qt-zlib
    -no-openssl
    -no-cups
    -no-glib
    -no-iconv
    -no-system-proxies
    -no-separate-debug-info
    -nomake examples -nomake tools -nomake tests
    -no-pkg-config
    -skip qtdeclarative
    -skip qtlocation
    -skip qtpurchasing
    -skip qtwayland
    -skip qtwebchannel
    -skip qtwebengine
    -skip qtwebsockets
    -skip qtwebview
    -skip qtwebglplugin
    -skip qtandroidextras
    -skip qtgamepad
    -skip qtmacextras
    -skip qtwinextras
    -skip qtsensors
    -skip qtconnectivity
    -recheck-all



  • Anyone who had the same situation please help? How should I know what has led to this problem


  • Lifetime Qt Champion

    Are you compiling or cross-compiling ?



  • @sgaist
    I directly compiling on the board .



  • This post is deleted!


  • @lengjianhanshuang said in port Qt5.13.0 to ARM aarch64 failed:

    Hi,the following is my configure

    Could you please also post the output of the configure step?


  • Lifetime Qt Champion

    The why use the xplatform option ?



  • @sgaist
    Hi, thanks for your reply. I use xplatform as I read from the document that xplatform is the same with -device and -device-option.
    Yestoday, I found maybe it is because of the compiler, as qmutex.cpp include "qmutex_linux.cpp", the content of qmutex_linux.cpp will be part of qmutex.cpp, at the same time, the thread.pro has included qmutex_linux into SOURCES also, so there is same content from the two files(qmutex.cpp and qmutex_linux.cpp)



  • @pablo-j-rogina
    Hi the following is the output of my configure, please have a check
    ---------------------------------Configure summary:

    Building on: linux-g++ (arm64, CPU features: neon)
    Building for: linux-aarch64-gnu-g++ (arm64, CPU features: neon)
    Target compiler: gcc 5.4.0
    Configuration: cross_compile compile_examples enable_new_dtags largefile neon shared rpath release c++11 c++14 concurrent dbus no-pkg-config reduce_exports stl
    Build options:
    Mode ................................... release
    Optimize release build for size ........ no
    Building shared libraries .............. yes
    Using C standard ....................... C11
    Using C++ standard ..................... C++14
    Using ccache ........................... no
    Using new DTAGS ........................ yes
    Using precompiled headers .............. no
    Using LTCG ............................. no
    Target compiler supports:
    NEON ................................. yes
    Build parts ............................ libs
    Qt modules and options:
    Qt Concurrent .......................... yes
    Qt D-Bus ............................... yes
    Qt D-Bus directly linked to libdbus .... no
    Qt Gui ................................. yes
    Qt Network ............................. yes
    Qt Sql ................................. yes
    Qt Testlib ............................. yes
    Qt Widgets ............................. yes
    Qt Xml ................................. yes
    Support enabled for:
    Using pkg-config ....................... no
    udev ................................... no
    Using system zlib ...................... no
    Zstandard support ...................... no
    Qt Core:
    DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
    GLib ................................... no
    iconv .................................. no
    ICU .................................... no
    Built-in copy of the MIME database ..... yes
    Tracing backend ........................ <none>
    Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
    Using system PCRE2 ..................... no
    Qt Network:
    getifaddrs() ........................... yes
    IPv6 ifname ............................ yes
    libproxy ............................... no
    Linux AF_NETLINK ....................... yes
    OpenSSL ................................ no
    Qt directly linked to OpenSSL ........ no
    OpenSSL 1.1 ............................ no
    DTLS ................................... no
    OCSP-stapling .......................... no
    SCTP ................................... no
    Use system proxies ..................... no
    Qt Gui:
    Accessibility .......................... yes
    FreeType ............................... yes
    Using system FreeType ................ no
    HarfBuzz ............................... yes
    Using system HarfBuzz ................ no
    Fontconfig ............................. no
    Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
    Using system libjpeg ............... no
    PNG .................................. yes
    Using system libpng ................ no
    EGL .................................... no
    OpenVG ................................. no
    OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
    Vulkan ................................. no
    Session Management ..................... yes
    Features used by QPA backends:
    evdev .................................. yes
    libinput ............................... no
    INTEGRITY HID .......................... no
    mtdev .................................. no
    tslib .................................. no
    xkbcommon .............................. no
    X11 specific:
    XLib ................................. yes
    XCB Xlib ............................. no
    EGL on X11 ........................... no
    QPA backends:
    DirectFB ............................... no
    EGLFS .................................. no
    LinuxFB ................................ yes
    VNC .................................... yes
    Mir client ............................. no
    Qt Sql:
    SQL item models ........................ yes
    Qt Widgets:
    GTK+ ................................... no
    Styles ................................. Fusion Windows
    Qt PrintSupport:
    CUPS ................................... no
    Qt Sql Drivers:
    DB2 (IBM) .............................. no
    InterBase .............................. no
    MySql .................................. no
    OCI (Oracle) ........................... no
    ODBC ................................... no
    PostgreSQL ............................. no
    SQLite2 ................................ no
    SQLite ................................. yes
    Using system provided SQLite ......... no
    TDS (Sybase) ........................... no
    Qt Testlib:
    Tester for item models ................. yes
    Qt SerialBus:
    Socket CAN ............................. yes
    Socket CAN FD .......................... yes
    SerialPort Support ..................... yes
    Further Image Formats:
    JasPer ................................. no
    MNG .................................... no
    TIFF ................................... yes
    Using system libtiff ................. no
    WEBP ................................... yes
    Using system libwebp ................. no
    Qt 3D GeometryLoaders:
    Autodesk FBX ........................... no
    QtXmlPatterns:
    XML schema support ..................... yes
    Qt Multimedia:
    ALSA ................................... no
    GStreamer 1.0 .......................... no
    GStreamer 0.10 ......................... no
    Video for Linux ........................ yes
    OpenAL ................................. no
    PulseAudio ............................. no
    Resource Policy (libresourceqt5) ....... no
    Windows Audio Services ................. no
    DirectShow ............................. no
    Windows Media Foundation ............... no
    Qt Tools:
    QDoc ................................... no

    Note: Also available for Linux: linux-clang linux-icc

    Note: The following modules are not being compiled in this configuration:
    3dcore
    3drender

    WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.

    Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
    On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
    On macOS, you can use Homebrew's llvm package.
    On Windows, you must set LLVM_INSTALL_DIR to the installation path.

    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/qt5.13'.

    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.



  • This topic has been solved in another topic about multiple definition of QBasicMutex::lockInternal



  • @lengjianhanshuang great, two things though:

    1. could you provide a link here to topic
    2. please don't forget to mark your post as solved.




  • @pablo-j-rogina
    But I can't mark this topic as solved....
    there is no such operation to be selected. so must I delete it?


  • Lifetime Qt Champion

    No, taken a look at the "Topic Tools" button.


Log in to reply