undefined reference to `_ZN6QFlagsIN18QRegularExpression11MatchOptionEEC4E5QFlag'



  • Hello!
    I cross-compile Qt-5.5.1 for ODROID-C2 board.
    Follow qt configuration:

       Configure summary
    
    Building on:   linux-g++ (x86_64, CPU features: mmx sse sse2)
    Building for:  devices/linux-arm-amlogic-s905-g++ (arm64, CPU features: none detected)
    Platform notes:
    
                - Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
            
    qmake vars .......... styles += mac fusion windows DEFINES += QT_NO_MTDEV DEFINES += QT_NO_LIBUDEV DEFINES += QT_NO_EVDEV DEFINES += QT_NO_TSLIB DEFINES += QT_NO_LIBINPUT QMAKE_INCDIR_EGL = /amlogic/usr/include/directfb/egl /amlogic/usr/include/directfb  QMAKE_LIBS_EGL = -L/amlogic/usr/lib/dfb-egl -lEGL -lDFBEGL -ldirectfb -lpthread -lz -lfusion -ldirect -lpthread  QMAKE_CFLAGS_EGL = -D_REENTRANT -I/amlogic/usr/include/directfb  QMAKE_CFLAGS_DIRECTFB = -D_REENTRANT -I/amlogic/usr/include/directfb  QMAKE_LIBS_DIRECTFB = -ldirectfb -lpthread -lz -lfusion -ldirect -lpthread  INCLUDEPATH +=  "/amlogic/usr/include" LIBS +=  -L"/amlogic/usr/lib" sql-drivers =  sql-plugins =  sqlite qmake switches ......... 
    
    Build options:
      Configuration .......... accessibility audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile directfb egl enable_new_dtags eventfd full-config getaddrinfo getifaddrs harfbuzz icu inotify ipv6ifname large-config largefile linuxfb medium-config minimal-config mremap no-gif openssl png posix_fallocate precompile_header qpa qpa reduce_exports release rpath shared small-config system-freetype system-jpeg system-png system-zlib
      Build parts ............ libs examples
      Mode ................... release
      Using sanitizer(s)...... none
      Using C++11 ............ yes
      Using gold linker....... no
      Using new DTAGS ........ yes
      Using PCH .............. yes
      Target compiler supports:
    
    Qt modules and options:
      Qt D-Bus ............... no
      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 .................. no
      FontConfig ............. no
      FreeType ............... yes (system library)
      Glib ................... no
      GStreamer .............. no
      GTK theme .............. no
      HarfBuzz ............... yes (bundled copy)
      Iconv .................. no
      ICU .................... yes
      Image formats: 
        GIF .................. no
        JPEG ................. yes (plugin, using system library)
        PNG .................. yes (in QtGui, using system library)
      journald ............... no
      libinput................ no
      mtdev .................. no
      Networking: 
        getaddrinfo .......... yes
        getifaddrs ........... yes
        IPv6 ifname .......... yes
        libproxy.............. no
        OpenSSL .............. yes (loading libraries at run-time)
      NIS .................... no
      OpenGL / OpenVG: 
        EGL .................. yes
        OpenGL ............... no
        OpenVG ............... no
      PCRE ................... system
      pkg-config ............. yes 
      PulseAudio ............. no
      QPA backends: 
        DirectFB ............. yes
        EGLFS ................ no
          EGLFS i.MX6....... . no
          EGLFS KMS .......... no
          EGLFS Mali ......... no
          EGLFS Raspberry Pi . no
          EGLFS X11 .......... no
        LinuxFB .............. yes
        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)
    

    Unfortunately make exit with error:

    make[3]: Entering directory '/tmp/qt/qtbase/src/corelib'
    rm -f libQt5Core.so.5.5.1 libQt5Core.so libQt5Core.so.5 libQt5Core.so.5.5
    aarch64-linux-gnu-g++ -Wl,--no-undefined -Wl,-O1 -Wl,--enable-new-dtags -shared -Wl,-soname,libQt5Core.so.5 -o libQt5Core.so.5.5.1
    .............
    oc_qhistorystate.o .obj/moc_qabstracttransition.o .obj/moc_qsignaltransition.o .obj/moc_qeventtransition.o  -L/amlogic/usr/lib -lpthread -lz -licui18n -licuuc -licudata -lpcre16 -lm -ldl -lrt 
    .obj/qstring.o: In function `operator<<(QDataStream&, QString const&)':
    qstring.cpp:(.text+0x119c8): undefined reference to `_ZN6QFlagsIN18QRegularExpression11MatchOptionEEC4E5QFlag'
    .obj/qstring.o: In function `operator>>(QDataStream&, QString&)':
    qstring.cpp:(.text+0x12098): undefined reference to `_ZN6QFlagsIN18QRegularExpression11MatchOptionEEC4E5QFlag'
    .obj/qcryptographichash.o: In function `sha1ProcessChunk(Sha1State*, unsigned char const*)':
    qcryptographichash.cpp:(.text+0x24368): undefined reference to `sha1FinalizeState(Sha1State*)'
    collect2: error: ld returned 1 exit status
    

    Library directory:

    # ls -F /amlogic/usr/lib/
    alsa-lib/                  libicudata.so.57@    libpcre32.a
    dfb-egl/                   libicudata.so.57.1*  libpcre32.la*
    directfb-1.8-0/            libicui18n.so@       libpcre32.so@
    engines/                   libicui18n.so.57@    libpcre32.so.0@
    icu/                       libicui18n.so.57.1*  libpcre32.so.0.0.5*
    lib++dfb-1.8.so.0@         libicuio.so@         libpcrecpp.a
    lib++dfb-1.8.so.0.0.0*     libicuio.so.57@      libpcrecpp.la*
    lib++dfb.la*               libicuio.so.57.1*    libpcrecpp.so@
    lib++dfb.so@               libicule.so@         libpcrecpp.so.0@
    libDFBEGL-1.8.so.0@        libicule.so.57@      libpcrecpp.so.0.0.1*
    libDFBEGL-1.8.so.0.0.0*    libicule.so.57.1*    libpcreposix.a
    libDFBEGL.la*              libiculx.so@         libpcreposix.la*
    libDFBEGL.so@              libiculx.so.57@      libpcreposix.so@
    libasound.la*              libiculx.so.57.1*    libpcreposix.so.0@
    libasound.so@              libicutest.so@       libpcreposix.so.0.0.3*
    libasound.so.2@            libicutest.so.57@    libpng.a@
    libasound.so.2.0.0*        libicutest.so.57.1*  libpng.la@
    libcrypto.a                libicutu.so@         libpng.so@
    libcrypto.so@              libicutu.so.57@      libpng15.a
    libcrypto.so.1.0.0*        libicutu.so.57.1*    libpng15.la*
    libdirect-1.8.so.0@        libicuuc.so@         libpng15.so@
    libdirect-1.8.so.0.0.0*    libicuuc.so.57@      libpng15.so.15@
    libdirect.la*              libicuuc.so.57.1*    libpng15.so.15.18.0*
    libdirect.so@              libjpeg.a            libssl.a
    libdirectfb-1.8.so.0@      libjpeg.la*          libssl.so@
    libdirectfb-1.8.so.0.0.0*  libjpeg.so@          libssl.so.1.0.0*
    libdirectfb.la*            libjpeg.so.62@       libturbojpeg.a
    libdirectfb.so@            libjpeg.so.62.2.0*   libturbojpeg.la*
    libfreetype.a              libpcre.a            libturbojpeg.so@
    libfreetype.la*            libpcre.la*          libturbojpeg.so.0@
    libfreetype.so@            libpcre.so@          libturbojpeg.so.0.1.0*
    libfreetype.so.6@          libpcre.so.1@        libz.a
    libfreetype.so.6.12.3*     libpcre.so.1.2.5*    libz.so@
    libfusion-1.8.so.0@        libpcre16.a          libz.so.1@
    libfusion-1.8.so.0.0.0*    libpcre16.la*        libz.so.1.2.8*
    libfusion.la*              libpcre16.so@        pkgconfig/
    libfusion.so@              libpcre16.so.0@
    libicudata.so@             libpcre16.so.0.2.5*
    

    Where can found QFlagsIN18QRegularExpression11MatchOptionEEC4E5QFlag?
    Thank you and excuse my bad english.


  • Moderators

    QRegularExpression is part of QtCore.
    Can you post everything between

    aarch64-linux-gnu-g++ -Wl,--no-undefined -Wl,-O1 -Wl,--enable-new-dtags -shared -Wl,-soname,libQt5Core.so.5 -o libQt5Core.so.5.5.1
    

    and

    .............
    oc_qhistorystate.o .obj/moc_qabstracttransition.o .obj/moc_qsignaltransition.o .obj/moc_qeventtransition.o  -L/amlogic/usr/lib -lpthread -lz -licui18n -licuuc -licudata -lpcre16 -lm -ldl -lrt 
    .obj/qstring.o: In function `operator<<(QDataStream&, QString const&)':
    


  • @jsulm thank you for your reply!
    Follow full console output:

    make[3]: Entering directory '/tmp/qt/qtbase/src/corelib'
    rm -f libQt5Core.so.5.5.1 libQt5Core.so libQt5Core.so.5 libQt5Core.so.5.5
    aarch64-linux-gnu-g++ -Wl,--no-undefined -Wl,-O1 -Wl,--enable-new-dtags -shared -Wl,-soname,libQt5Core.so.5 -o libQt5Core.so.5.5.1 .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/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/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/qlocale_icu.o .obj/qcollator_icu.o .obj/qtimezoneprivate_icu.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/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/qicucodec.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_qabstracttransition.o .obj/moc_qsignaltransition.o .obj/moc_qeventtransition.o  -L/amlogic/usr/lib -lpthread -lz -licui18n -licuuc -licudata -lpcre16 -lm -ldl -lrt 
    .obj/qstring.o: In function `operator<<(QDataStream&, QString const&)':
    qstring.cpp:(.text+0x119c8): undefined reference to `_ZN6QFlagsIN18QRegularExpression11MatchOptionEEC4E5QFlag'
    .obj/qstring.o: In function `operator>>(QDataStream&, QString&)':
    qstring.cpp:(.text+0x12098): undefined reference to `_ZN6QFlagsIN18QRegularExpression11MatchOptionEEC4E5QFlag'
    .obj/qcryptographichash.o: In function `sha1ProcessChunk(Sha1State*, unsigned char const*)':
    qcryptographichash.cpp:(.text+0x24368): undefined reference to `sha1FinalizeState(Sha1State*)'
    collect2: error: ld returned 1 exit status
    


  • Disable precompiled headers solve problem.


Log in to reply
 

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