Solved cannot find -lqtpcre2, how to skip it?
-
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!
-
Hi,
Either disable QRegularExpression completely or don't pass any value related to pcre.
-
@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. -
@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
-
Did you do a cleanup before calling configure again ?