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

Qt Cross-Compilation Build Make Error



  • After running make -j4, everything was going well for quite some time then this happened

    make[3]: Leaving directory '/opt/qt5pi/qt5build/qtbase/src/gui'
    make[2]: Leaving directory '/opt/qt5pi/qt5build/qtbase/src'
    Makefile:50: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/opt/qt5pi/qt5build/qtbase'
    Makefile:84: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2

    Can anyone help? Thanks in Advance!


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Restart the build without the -j option so you will see exactly where it fails.



  • @SGaist after I reconfigured and ran make only, I got errors:-

    In file included from /opt/qt5pi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/qglobal.h:1:0,
    from /opt/qt5pi/qt-everywhere-src-5.13.1/qtbase/src/corelib/global/qt_pch.h:56:
    /opt/qt5pi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:121:49: error: static assertion failed: Required feature library for file /opt/qt5pi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/../../src/corelib/plugin/qlibrary.h not available.

    define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)

                                                 ^
    

    /opt/qt5pi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:87:36: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
    #define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " FILE " not available.")
    ^
    /opt/qt5pi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/../../src/corelib/plugin/qlibrary.h:45:1: note: in expansion of macro ‘QT_REQUIRE_CONFIG’
    QT_REQUIRE_CONFIG(library);
    ^
    Makefile:28857: recipe for target '.obj/qsslsocket_opensslpre11.o' failed
    make[3]: *** [.obj/qsslsocket_opensslpre11.o] Error 1
    make[3]: Leaving directory '/opt/qt5pi/qt5build/qtbase/src/network'
    Makefile:276: recipe for target 'sub-network-make_first' failed
    make[2]: *** [sub-network-make_first] Error 2
    make[2]: Leaving directory '/opt/qt5pi/qt5build/qtbase/src'
    Makefile:50: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/opt/qt5pi/qt5build/qtbase'
    Makefile:84: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2

    I am building Qt for Raspberry Pi 3 B+ on Ubuntu 18.04 LTS x64
    Qt Version: Qt 5.13.1

    What should I do further?


  • Lifetime Qt Champion

    There's usually more lines about the exact error.



  • @SGaist Edited!



  • @SGaist Re-Edited!



  • @SGaist in Qt Cross-Compilation Build Make Error:

    In file included from /opt/qt5pi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/qglobal.h:1:0,
    from /opt/qt5pi/qt-everywhere-src-5.13.1/qtbase/src/corelib/global/qt_pch.h:56:
    /opt/qt5pi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:121:49: error: static assertion failed: Required feature library for file /opt/qt5pi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/../../src/corelib/plugin/qlibrary.h not available.
    define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
    ^

    /opt/qt5pi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:87:36: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
    #define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " FILE " not available.")
    ^
    /opt/qt5pi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/../../src/corelib/plugin/qlibrary.h:45:1: note: in expansion of macro ‘QT_REQUIRE_CONFIG’
    QT_REQUIRE_CONFIG(library);
    ^
    Makefile:28857: recipe for target '.obj/qsslsocket_opensslpre11.o' failed
    make[3]: *** [.obj/qsslsocket_opensslpre11.o] Error 1
    make[3]: Leaving directory '/opt/qt5pi/qt5build/qtbase/src/network'
    Makefile:276: recipe for target 'sub-network-make_first' failed
    make[2]: *** [sub-network-make_first] Error 2
    make[2]: Leaving directory '/opt/qt5pi/qt5build/qtbase/src'
    Makefile:50: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/opt/qt5pi/qt5build/qtbase'
    Makefile:84: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2

    Here is the full error log!


  • Lifetime Qt Champion

    What options did you pass to configure ?
    What version of OpenSSL are you using ?



  • @SGaist OpenSSL Version: OpenSSL 1.1.1
    ../qt-everywhere-src-5.13.1/configure -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf- -sysroot /opt/qt5pi/sysroot -prefix /usr/local/qt5pi -opensource -confirm-license -skip qtscript -nomake examples -no-compile-examples -make libs -pkg-config -no-use-gold-linker -v -qpa eglfs -no-gbm -qt-pcre -evdev -system-freetype -no-gtk -glib


  • Lifetime Qt Champion

    Maybe a silly question but you do have OpenSSL built for your target in the sysroot ?



  • @SGaist Yes I do, I went through the qt-src folder and found out the missing file was as result of the missing directories and files in there.

    Though currently I am building make for Qt 5.12.3 Version using the same configure command with a slight change using linux-rasp-pi-g++ instead based on this tutorial: (https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/)
    So far there have been no error.


  • Lifetime Qt Champion

    I would recommend building the latest of the series. There have been several releases since 5.12.3.



  • @SGaist I was also looking for tested configurations built with OpenGL with EGLFS following this link (https://wiki.qt.io/RaspberryPi 2EGLFS) but thanks for the support.
    I have successfully ran both make and make install now.
    Don't know if it's against the rules here or yours but how can I get in touch with you, if it is possible? via Social media! - Send me a reply on this here sudden8317@gmail.com

    Above all!!
    Thanks again for your support!!!


Log in to reply