Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. qmutex_linux.cpp:multiple definition of 'QBasicMutex::lockInternal(int)'

qmutex_linux.cpp:multiple definition of 'QBasicMutex::lockInternal(int)'

Scheduled Pinned Locked Moved Solved Mobile and Embedded
10 Posts 2 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • LengJianHanShuangL Offline
    LengJianHanShuangL Offline
    LengJianHanShuang
    wrote on last edited by
    #1

    I try to compile and install qt5.13.0 to my arm board(armv8,aarch64) using qt-everywhere-src-5.13.0, but I counted the title's problem, I have no idea what leads to this problem, Anyone please give me some clue on how to solve it, thanks

    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/minimum-linux.o .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/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/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/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 of QBasicMutex::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 of QBasicMutex::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 of QBasicMutex::unlockInternal()'
    .obj/qmutex.o:qmutex.cpp:(.text+0x550): first defined here
    collect2: error: ld returned 1 exit status
    Makefile:1241: 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:63: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2

    BTW, my configure is following

    #!/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

    Follow your dreams

    aha_1980A 1 Reply Last reply
    0
    • aha_1980A aha_1980

      Hi @lengjianhanshuang,

      according to https://wiki.qt.io/Qt_5.13_Release the version 5.13.1 should be released tomorrow.

      Maybe it's worth to wait one day and see if that release works?

      You might also want to ask your question on the Interest mailing list, which is monitored by the developers. This forum is more user orientated.

      Regards

      LengJianHanShuangL Offline
      LengJianHanShuangL Offline
      LengJianHanShuang
      wrote on last edited by
      #10

      @aha_1980
      Hi, I think the problem is because of the compiler.
      As in qmutex.cpp it directly" #include qmutex_linux.cpp", as a result the content of qmutex_linux.cpp will be part of qmutex.cpp.
      And in the thread.pro, the SOURCES +=qmutex.cpp qmutex_linux.cpp, then during link, the two file have same symbols will be detected.
      When I delete qmutex_linux.cpp from SOURCES, there is no problem any more.

      Follow your dreams

      1 Reply Last reply
      0
      • LengJianHanShuangL LengJianHanShuang

        I try to compile and install qt5.13.0 to my arm board(armv8,aarch64) using qt-everywhere-src-5.13.0, but I counted the title's problem, I have no idea what leads to this problem, Anyone please give me some clue on how to solve it, thanks

        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/minimum-linux.o .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/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/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/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 of QBasicMutex::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 of QBasicMutex::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 of QBasicMutex::unlockInternal()'
        .obj/qmutex.o:qmutex.cpp:(.text+0x550): first defined here
        collect2: error: ld returned 1 exit status
        Makefile:1241: 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:63: recipe for target 'module-qtbase-make_first' failed
        make: *** [module-qtbase-make_first] Error 2

        BTW, my configure is following

        #!/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

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #2

        HI @lengjianhanshuang,

        which compiler and version is that?

        Regards

        Qt has to stay free or it will die.

        LengJianHanShuangL 1 Reply Last reply
        0
        • aha_1980A aha_1980

          HI @lengjianhanshuang,

          which compiler and version is that?

          Regards

          LengJianHanShuangL Offline
          LengJianHanShuangL Offline
          LengJianHanShuang
          wrote on last edited by
          #3

          @aha_1980
          aarch64-linux-gnu-g++(Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609

          Follow your dreams

          aha_1980A 1 Reply Last reply
          0
          • LengJianHanShuangL LengJianHanShuang

            @aha_1980
            aarch64-linux-gnu-g++(Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @lengjianhanshuang So do you cross-compile or do you compile Qt on your ARM board?

            And to be sure, you are using ARM 64 bit platform?

            Qt has to stay free or it will die.

            LengJianHanShuangL 3 Replies Last reply
            0
            • aha_1980A aha_1980

              @lengjianhanshuang So do you cross-compile or do you compile Qt on your ARM board?

              And to be sure, you are using ARM 64 bit platform?

              LengJianHanShuangL Offline
              LengJianHanShuangL Offline
              LengJianHanShuang
              wrote on last edited by
              #5

              Hi @aha_1980
              I compile qt directly on my ARM board.
              and I'm using ARM 64 bit platform

              firefly@firefly:~/Downloads/build_qt/qtbase/qmake$ uname -a
              Linux firefly 4.4.167 #21 SMP Wed Apr 3 09:30:52 CST 2019 aarch64 aarch64 aarch64 GNU/Linux


              BestRegards

              Follow your dreams

              1 Reply Last reply
              0
              • aha_1980A aha_1980

                @lengjianhanshuang So do you cross-compile or do you compile Qt on your ARM board?

                And to be sure, you are using ARM 64 bit platform?

                LengJianHanShuangL Offline
                LengJianHanShuangL Offline
                LengJianHanShuang
                wrote on last edited by
                #6

                @aha_1980
                and the cpu is cortex a72

                Follow your dreams

                1 Reply Last reply
                0
                • aha_1980A aha_1980

                  @lengjianhanshuang So do you cross-compile or do you compile Qt on your ARM board?

                  And to be sure, you are using ARM 64 bit platform?

                  LengJianHanShuangL Offline
                  LengJianHanShuangL Offline
                  LengJianHanShuang
                  wrote on last edited by
                  #7

                  @aha_1980
                  This make me really crazy, I am not familiar with compile mechanism, in order to solve the multiple definition,
                  I directly comment out the two function(lockInternal() & unlockInternal()) and other relative functions in qmutex.cpp,
                  at the same time, I remain only "#include "qmutex_linux.cpp" (comment out mac/window) in qmutex.cpp.

                  It is something like:
                  A.h
                  class A
                  {
                  public:
                  void lockInternal();
                  void unlockInternal();
                  }

                  A.cpp
                  //A:: lockInternal() {}
                  // A:: unlockInternal() {}
                  #include "B.cpp"

                  B.cpp
                  A::lockInternal() {}
                  A::unlockInternal() {}

                  when compiling, the multiple definition of lockInternal() & unlockInternal() still pop up.

                  Follow your dreams

                  aha_1980A 1 Reply Last reply
                  0
                  • LengJianHanShuangL LengJianHanShuang

                    @aha_1980
                    This make me really crazy, I am not familiar with compile mechanism, in order to solve the multiple definition,
                    I directly comment out the two function(lockInternal() & unlockInternal()) and other relative functions in qmutex.cpp,
                    at the same time, I remain only "#include "qmutex_linux.cpp" (comment out mac/window) in qmutex.cpp.

                    It is something like:
                    A.h
                    class A
                    {
                    public:
                    void lockInternal();
                    void unlockInternal();
                    }

                    A.cpp
                    //A:: lockInternal() {}
                    // A:: unlockInternal() {}
                    #include "B.cpp"

                    B.cpp
                    A::lockInternal() {}
                    A::unlockInternal() {}

                    when compiling, the multiple definition of lockInternal() & unlockInternal() still pop up.

                    aha_1980A Offline
                    aha_1980A Offline
                    aha_1980
                    Lifetime Qt Champion
                    wrote on last edited by
                    #8

                    Hi @lengjianhanshuang,

                    according to https://wiki.qt.io/Qt_5.13_Release the version 5.13.1 should be released tomorrow.

                    Maybe it's worth to wait one day and see if that release works?

                    You might also want to ask your question on the Interest mailing list, which is monitored by the developers. This forum is more user orientated.

                    Regards

                    Qt has to stay free or it will die.

                    LengJianHanShuangL 2 Replies Last reply
                    0
                    • aha_1980A aha_1980

                      Hi @lengjianhanshuang,

                      according to https://wiki.qt.io/Qt_5.13_Release the version 5.13.1 should be released tomorrow.

                      Maybe it's worth to wait one day and see if that release works?

                      You might also want to ask your question on the Interest mailing list, which is monitored by the developers. This forum is more user orientated.

                      Regards

                      LengJianHanShuangL Offline
                      LengJianHanShuangL Offline
                      LengJianHanShuang
                      wrote on last edited by
                      #9

                      @aha_1980
                      thanks for your information, I will use the new one tomorrow, at the same time I will ask through mail about current version,
                      thanks again.

                      Follow your dreams

                      1 Reply Last reply
                      0
                      • aha_1980A aha_1980

                        Hi @lengjianhanshuang,

                        according to https://wiki.qt.io/Qt_5.13_Release the version 5.13.1 should be released tomorrow.

                        Maybe it's worth to wait one day and see if that release works?

                        You might also want to ask your question on the Interest mailing list, which is monitored by the developers. This forum is more user orientated.

                        Regards

                        LengJianHanShuangL Offline
                        LengJianHanShuangL Offline
                        LengJianHanShuang
                        wrote on last edited by
                        #10

                        @aha_1980
                        Hi, I think the problem is because of the compiler.
                        As in qmutex.cpp it directly" #include qmutex_linux.cpp", as a result the content of qmutex_linux.cpp will be part of qmutex.cpp.
                        And in the thread.pro, the SOURCES +=qmutex.cpp qmutex_linux.cpp, then during link, the two file have same symbols will be detected.
                        When I delete qmutex_linux.cpp from SOURCES, there is no problem any more.

                        Follow your dreams

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved