Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. cannot find -lqtpcre2, how to skip it?
Forum Updated to NodeBB v4.3 + New Features

cannot find -lqtpcre2, how to skip it?

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 2 Posters 1.9k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    r3d9u11
    wrote on last edited by r3d9u11
    #1

    Hello, I tried to cross-compile Qt 5.11.2 for imx6 via arm-linux-gnueabi, but have got exception:

    -L/home/imx6/Qt5_ARM/cache/qt-everywhere-src-5.11.2/qtbase/lib -lqtpcre2 -ldl 
    /usr/bin/ld.gold: error: cannot find -lqtpcre2
    .obj/qregularexpression.o:qregularexpression.cpp:function safe_pcre2_match_16(pcre2_real_code_16 const*, unsigned short const*, int, int, int, pcre2_real_match_data_16*, pcre2_real_match_context_16*): error: undefined reference to 'pcre2_match_16'
    .obj/qregularexpression.o:qregularexpression.cpp:function safe_pcre2_match_16(pcre2_real_code_16 const*, unsigned short const*, int, int, int, pcre2_real_match_data_16*, pcre2_real_match_context_16*): error: undefined reference to 'pcre2_jit_stack_create_16'
    .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::~QRegularExpressionPrivate(): error: undefined reference to 'pcre2_code_free_16'
    .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::cleanCompiledPattern(): error: undefined reference to 'pcre2_code_free_16'
    .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::getPatternInfo(): error: undefined reference to 'pcre2_pattern_info_16'
    .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::getPatternInfo(): error: undefined reference to 'pcre2_pattern_info_16'
    .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::getPatternInfo(): error: undefined reference to 'pcre2_pattern_info_16'
    ...
    ...
    ...
    .obj/qregularexpression.o:qregularexpression.cpp:function safe_pcre2_match_16(pcre2_real_code_16 const*, unsigned short const*, int, int, int, pcre2_real_match_data_16*, pcre2_real_match_context_16*): error: undefined reference to 'pcre2_match_16'
    .obj/qregularexpression.o:qregularexpression.cpp:function QThreadStorage<QPcreJitStackPointer*>::deleteData(void*): error: undefined reference to 'pcre2_jit_stack_free_16'
    collect2: error: ld returned 1 exit status
    Makefile:1146: recipe for target '../../lib/libQt5Core.so.5.11.2' failed
    make[3]: *** [../../lib/libQt5Core.so.5.11.2] Error 1
    make[3]: Leaving directory '/home/imx6/Qt5_ARM/cache/qt-everywhere-src-5.11.2/qtbase/src/corelib'
    Makefile:237: recipe for target 'sub-corelib-install_subtargets' failed
    make[2]: *** [sub-corelib-install_subtargets] Error 2
    make[2]: Leaving directory '/home/imx6/Qt5_ARM/cache/qt-everywhere-src-5.11.2/qtbase/src'
    Makefile:60: recipe for target 'sub-src-install_subtargets' failed
    make[1]: *** [sub-src-install_subtargets] Error 2
    make[1]: Leaving directory '/home/imx6/Qt5_ARM/cache/qt-everywhere-src-5.11.2/qtbase'
    Makefile:95: recipe for target 'module-qtbase-install_subtargets' failed
    make: *** [module-qtbase-install_subtargets] Error 2
    

    Here is config options:

    build_e qt                          \
        -opensource -confirm-license    \
        $Qt_DEVICE_ARG                  \
        $Qt_DEVICE_OPT_ARG              \
        -sysroot ${SYSROOT}             \
        -no-gcc-sysroot                 \
        -prefix /                       \
        -no-pcre                        \
        -no-opengl                      \
        -no-pch                         \
        -no-xcb                         \
        -no-cups                        \
        -skip qtactiveqt                \
        -skip qtconnectivity            \
        -skip qtdoc                     \
        -skip qtenginio                 \
        -skip qtgraphicaleffects        \
        -skip qtimageformats            \
        -skip qtlocation                \
        -skip qtsensors                 \
        -skip qtsvg                     \
        -skip qtpcre2                   \
        -nomake tools                   \
        -nomake tests                   \
        -nomake examples                \
        -v
    

    How to skip prce2 (or fix the problem)? Thanks!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Either disable QRegularExpression completely or don't pass any value related to pcre.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      R 2 Replies Last reply
      0
      • SGaistS SGaist

        Hi,

        Either disable QRegularExpression completely or don't pass any value related to pcre.

        R Offline
        R Offline
        r3d9u11
        wrote on last edited by r3d9u11
        #3

        @SGaist thanks for help! seems that I tried to pass invalid device options, think this is root of trouble.
        but now I've got another exception for another topic.

        1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Either disable QRegularExpression completely or don't pass any value related to pcre.

          R Offline
          R Offline
          r3d9u11
          wrote on last edited by r3d9u11
          #4

          @SGaist Sorry, I'm afraid that I hurried to close issue I have got that exception, again:

          ...
          ...
          ...
          e.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_qmimetype.o  -lpthread -lm -L/mnt/data/LinuxHome/Software/qt5/cache/qt-everywhere-src-5.11.3/qtbase/lib -lqtpcre2 -ldl 
          /usr/lib/gcc-cross/arm-linux-gnueabi/5/../../../../arm-linux-gnueabi/bin/ld.gold: error: cannot find -lqtpcre2
          .obj/qregularexpression.o:qregularexpression.cpp:function safe_pcre2_match_16(pcre2_real_code_16 const*, unsigned short const*, int, int, int, pcre2_real_match_data_16*, pcre2_real_match_context_16*): error: undefined reference to 'pcre2_match_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function safe_pcre2_match_16(pcre2_real_code_16 const*, unsigned short const*, int, int, int, pcre2_real_match_data_16*, pcre2_real_match_context_16*): error: undefined reference to 'pcre2_jit_stack_create_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function safe_pcre2_match_16(pcre2_real_code_16 const*, unsigned short const*, int, int, int, pcre2_real_match_data_16*, pcre2_real_match_context_16*): error: undefined reference to 'pcre2_match_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::~QRegularExpressionPrivate(): error: undefined reference to 'pcre2_code_free_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::cleanCompiledPattern(): error: undefined reference to 'pcre2_code_free_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::getPatternInfo(): error: undefined reference to 'pcre2_pattern_info_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::getPatternInfo(): error: undefined reference to 'pcre2_pattern_info_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::getPatternInfo(): error: undefined reference to 'pcre2_pattern_info_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::getPatternInfo(): error: undefined reference to 'pcre2_config_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::compilePattern(): error: undefined reference to 'pcre2_code_free_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::compilePattern(): error: undefined reference to 'pcre2_compile_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::optimizePattern(QRegularExpressionPrivate::OptimizePatternOption): error: undefined reference to 'pcre2_jit_compile_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::captureIndexForName(QStringView) const: error: undefined reference to 'pcre2_substring_number_from_name_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpression::~QRegularExpression(): error: undefined reference to 'pcre2_code_free_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpression::isValid() const: error: undefined reference to 'pcre2_compile_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpression::errorString() const: error: undefined reference to 'pcre2_get_error_message_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpression::patternErrorOffset() const: error: undefined reference to 'pcre2_compile_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpression::optimize() const: error: undefined reference to 'pcre2_jit_compile_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionMatch::captured(QStringView) const: error: undefined reference to 'pcre2_substring_number_from_name_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionMatch::capturedView(QStringView) const: error: undefined reference to 'pcre2_substring_number_from_name_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionMatch::capturedRef(QStringView) const: error: undefined reference to 'pcre2_substring_number_from_name_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const: error: undefined reference to 'pcre2_match_context_create_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const: error: undefined reference to 'pcre2_jit_stack_assign_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const: error: undefined reference to 'pcre2_match_data_create_from_pattern_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const: error: undefined reference to 'pcre2_get_ovector_pointer_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const: error: undefined reference to 'pcre2_match_data_free_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const: error: undefined reference to 'pcre2_match_context_free_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const: error: undefined reference to 'pcre2_pattern_info_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QRegularExpression::match(QString const&, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>) const: error: undefined reference to 'pcre2_compile_16'
          .obj/qregularexpression.o:qregularexpression.cpp:function QThreadStorage<QPcreJitStackPointer*>::deleteData(void*): error: undefined reference to 'pcre2_jit_stack_free_16'
          collect2: error: ld returned 1 exit status
          Makefile:1211: recipe for target '../../lib/libQt5Core.so.5.11.3' failed
          make[3]: *** [../../lib/libQt5Core.so.5.11.3] Error 1
          make[3]: Leaving directory '/mnt/data/LinuxHome/Software/qt5/cache/qt-everywhere-src-5.11.3/qtbase/src/corelib'
          Makefile:236: recipe for target 'sub-corelib-install_subtargets' failed
          make[2]: *** [sub-corelib-install_subtargets] Error 2
          make[2]: Leaving directory '/mnt/data/LinuxHome/Software/qt5/cache/qt-everywhere-src-5.11.3/qtbase/src'
          Makefile:60: recipe for target 'sub-src-install_subtargets' failed
          make[1]: *** [sub-src-install_subtargets] Error 2
          make[1]: Leaving directory '/mnt/data/LinuxHome/Software/qt5/cache/qt-everywhere-src-5.11.3/qtbase'
          Makefile:95: recipe for target 'module-qtbase-install_subtargets' failed
          make: *** [module-qtbase-install_subtargets] Error 2
          

          Compiler:

          $ arm-linux-gnueabi-g++ --version
          arm-linux-gnueabi-g++ (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
          

          Qt 5.11.3
          Qt configuration:

              -opensource -confirm-license   \
              -xplatform linux-arm-gnueabi-g++ \
              -sysroot /home/eugene/Software/qt5/sysroot              \
              -prefix /                      \
              -no-opengl                     \
              -v
          
          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Did you do a cleanup before calling configure again ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            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