[Solved] build eror for Qt 5.3.2 for arm-linux-none-gnueabi



  • I had previously built Qt and needed to add openssl support. After building openssl and making the necessary configure change, I encounter the build error:

    In file included from ../../include/QtGui/5.3.2/QtGui/qpa/qplatformtheme.h:1:0,
    from kernel/qplatformintegration.cpp:47:
    ../../include/QtGui/5.3.2/QtGui/qpa/../../../../../src/gui/kernel/qplatformtheme.h:299:59: error: 'QKeySequence::StandardKey' has not been declared
    make[3]: *** [.obj/qplatformintegration.o] Error 1

    I have tried make clean, and even erasing the entire project and repeating the tar extract. I looked around the net and found one reference to this but their solution was effectively to not build the offending module.

    My configure is:

    ./configure -release -no-qml-debug -prefix ../Libs/QtArm -opensource -confirm-license -shared -no-largefile -gui -widgets -plugin-sql-mysql -openssl-linked -continue -xplatform arm-none-linux-gnueabi-g++ -platform linux-g++ -device-option CROSS_COMPILE=/opt/CodeSourcery/bin/arm-none-linux-gnueabi- -no-compile-examples -no-warnings-are-errors -no-pch -no-dbus -no-sse2 -no-cups -no-nis -no-xcb -no-eglfs -linuxfb -no-kms -no-opengl -system-proxies -qtlibinfix arm -l rt -qpa linuxfb -fontconfig -qt-freetype -I /home/jandle/Documents/Code/openssl-1.0.2c/include/ -silent -L /home/isaw/lib -no-feature-XMLSCHEMA -no-feature-DBUS -no-feature-STATEMACHINE -no-feature-ANIMATION -no-feature-UNDOVIEW -no-feature-UNDOGROUP -no-feature-UNDOCOMMAND -no-feature-SYSTEMTRAYICON -no-feature-DESKTOPSERVICES -no-feature-FSCOMPLETER -no-feature-COMPLETER -no-feature-NETWORKDISKCACHE -no-feature-SOCKS5 -no-feature-NETWORKPROXY -no-feature-BIG_CODECS -no-feature-TRANSLATION -no-feature-FREETYPE -no-feature-PAINT_DEBUG -no-feature-CUPS -no-feature-PRINTER -no-feature-PDF -no-feature-PICTURE -no-feature-IMAGE_HEURISTIC_MASK -no-feature-IMAGEFORMAT_XPM -no-feature-IMAGEFORMAT_XBM -no-feature-IMAGEFORMAT_PPM -no-feature-MOVIE -no-feature-IMAGEFORMATPLUGIN -no-feature-STYLE_WINDOWSMOBILE -no-feature-STYLE_WINDOWSCE -no-feature-STYLE_FUSION -no-feature-STYLE_WINDOWSVISTA -no-feature-STYLE_WINDOWSXP -no-feature-STYLE_WINDOWS -no-feature-DIRMODEL -no-feature-PRINTPREVIEWDIALOG -no-feature-PRINTDIALOG -no-feature-COLORDIALOG -no-feature-PRINTPREVIEWWIDGET -no-feature-SIZEGRIP -no-feature-WHATSTHIS -no-feature-STATUSTIP -no-feature-TOOLTIP -no-feature-SYNTAXHIGHLIGHTER -no-feature-GRAPHICSEFFECT -no-feature-CONTEXTMENU -no-feature-DOCKWIDGET -no-feature-LCDNUMBER -no-feature-SPLITTER -no-feature-SPLASHSCREEN -no-feature-TEXTBROWSER -no-feature-DOM -no-feature-PROCESS -no-feature-XMLSTREAMWRITER -no-feature-XMLSTREAM -no-feature-SYSTEMSEMAPHORE -no-feature-EFFECTS -no-feature-WHEELEVENT -no-feature-CLIPBOARD -no-feature-CURSOR -no-feature-SHORTCUT -no-feature-DRAGANDDROP -no-feature-TEXTODFWRITER -no-feature-TEXTHTMLPARSER -qt-zlib



  • Did you make sure to completely clean your build directory? I've encountered issues like that on a reconfigure.

    Do a make distclean before you configure/make. However distclean takes forever, so you might just remove your qt build dir completely and unzip/untar it from the source again to know you are starting with a fresh copy.

    Edit: oops, reading is important! Just noticed you said you tried this. Can you try running the same configure (on a clean directory) as you did before ssl and see if that still compiles? Something else may have changed. Occasionally some Qt builds also have issues with parallelization so you can also try making sure you only use 1 job, slower but sometimes it works on weird stuff like that, use make -j1 to test that.

    Also this post may help if you don't need GUI stuff.



  • I have tried a number of restarts, but unfortunately this has been an hour or two at a time over several weeks. I'll look for the parallelization setting.

    another note is that the previous time it built, it was by repeating make (incrementally) until it succeeded. This does sound like parallelization. The error persists every time I try. The 'QKeySequence::StandardKey' enum is part of the class and the headers appear to be correct, but my C++ is rusty. The offending line is:

    virtual QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const;

    in QPlatformTheme class. I was considering some hack even, but know that using a placeholder type for 'key' will break C++ name decoration at link.

    EDIT: make -j1 has the same result.


  • Lifetime Qt Champion

    Hi,

    Might be -no-feature-SHORTCUT that is causing this



  • I wouldn't write a hack just yet. SGaist has a good point. Maybe try dropping all those -no-feature lines and see what happens.

    I have in the past written some hacks in windows/mingw to get Qt to build but it's always a last resort and can affect the stability of Qt. Then later on when your apps have issues you'll never know if it was that little hack you wrote or not. :)

    If you are making over and over then that is definitely a parallelization issue. But if a make -j1 on a clean tar extract didn't work then it's not the only issue.

    Finally, you could dig around in the code to see where QKeySequence::StandardKey is defined and try to figure out why it wasn't included in your build.

    Priority wise I'd try SGaist's idea of issues with -no-feature(s).



  • @SGaist - the NO SHORTCUT appears to have been an issue. It compiled through to linking and I get an error but don't see any explanation. I re-issued make to get a shorter output listing. Is there an option I should set to get a more detailed explanation?

    jandle@jca-VirtualBox-U32:~/Documents/Code/QtArm$ make
    cd qtbase/ && ( test -e Makefile || /home/jandle/Documents/Code/QtArm/qtbase/bin/qmake /home/jandle/Documents/Code/QtArm/qtbase/qtbase.pro -o Makefile ) && make -f Makefile
    make[1]: Entering directory /home/jandle/Documents/Code/QtArm/qtbase' cd src/ && ( test -e Makefile || /home/jandle/Documents/Code/QtArm/qtbase/bin/qmake /home/jandle/Documents/Code/QtArm/qtbase/src/src.pro -o Makefile ) && make -f Makefile make[2]: Entering directory/home/jandle/Documents/Code/QtArm/qtbase/src'
    cd tools/bootstrap/ && ( test -e Makefile || /home/jandle/Documents/Code/QtArm/qtbase/bin/qmake /home/jandle/Documents/Code/QtArm/qtbase/src/tools/bootstrap/bootstrap.pro -o Makefile ) && make -f Makefile
    make[3]: Entering directory /home/jandle/Documents/Code/QtArm/qtbase/src/tools/bootstrap' make[3]: Nothing to be done forfirst'.
    make[3]: Leaving directory /home/jandle/Documents/Code/QtArm/qtbase/src/tools/bootstrap' cd tools/moc/ && ( test -e Makefile || /home/jandle/Documents/Code/QtArm/qtbase/bin/qmake /home/jandle/Documents/Code/QtArm/qtbase/src/tools/moc/moc.pro -o Makefile ) && make -f Makefile make[3]: Entering directory/home/jandle/Documents/Code/QtArm/qtbase/src/tools/moc'
    make[3]: Nothing to be done for first'. make[3]: Leaving directory/home/jandle/Documents/Code/QtArm/qtbase/src/tools/moc'
    cd tools/rcc/ && ( test -e Makefile || /home/jandle/Documents/Code/QtArm/qtbase/bin/qmake /home/jandle/Documents/Code/QtArm/qtbase/src/tools/rcc/rcc.pro -o Makefile ) && make -f Makefile
    make[3]: Entering directory /home/jandle/Documents/Code/QtArm/qtbase/src/tools/rcc' make[3]: Nothing to be done forfirst'.
    make[3]: Leaving directory /home/jandle/Documents/Code/QtArm/qtbase/src/tools/rcc' cd corelib/ && ( test -e Makefile || /home/jandle/Documents/Code/QtArm/qtbase/bin/qmake /home/jandle/Documents/Code/QtArm/qtbase/src/corelib/corelib.pro -o Makefile ) && make -f Makefile make[3]: Entering directory/home/jandle/Documents/Code/QtArm/qtbase/src/corelib'
    rm -f libQt5Corearm.so.5.3.2 libQt5Corearm.so libQt5Corearm.so.5 libQt5Corearm.so.5.3
    linking ../../lib/libQt5Corearm.so.5.3.2
    collect2: ld returned 1 exit status
    make[3]: *** [../../lib/libQt5Corearm.so.5.3.2] Error 1
    make[3]: Leaving directory /home/jandle/Documents/Code/QtArm/qtbase/src/corelib' make[2]: *** [sub-corelib-make_first] Error 2 make[2]: Leaving directory/home/jandle/Documents/Code/QtArm/qtbase/src'
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory `/home/jandle/Documents/Code/QtArm/qtbase'
    make: *** [module-qtbase-make_first] Error 2
    jandle@jca-VirtualBox-U32:~/Documents/Code/QtArm$



  • @ambershark - Thanks. i always listen to him. Not sure the prototypes of this system would have made it out last quarter without his previous help.



  • So your output from above doesn't actually include an error from the linker. I've never seen that. Very weird.

    There isn't a way to get any more details out of g++ but it should have given you an actual error.

    Maybe try cutting out the nested makes and just cd into QtArm/qtbase/src/corelib and then just make from there, make sure it only uses a single job, force it with -j1 if you need to.

    That might get some more information.

    Also the suspicious lines are:

    rm -f libQt5Corearm.so.5.3.2 libQt5Corearm.so libQt5Corearm.so.5 libQt5Corearm.so.5.3
    linking ../../lib/libQt5Corearm.so.5.3.2
    collect2: ld returned 1 exit status
    make[3]: *** [../../lib/libQt5Corearm.so.5.3.2] Error 1
    

    It looks like it is removing any previously generated libQt5Corearm* and relinking it in ../../lib/libQt5Corearmr.so.5.3.2. And for some reason that fails but there is no reason given. I would check things like permissions to that directory and file. Maybe you ran as root one time. I would also check hard drive space df -h and make sure you have plenty of space on your drive. Just some shots in the dark with such limited info.

    Post back if you can find some more information on the problem.

    I will also say I share your pain, I've been building Qt with mingw/msys2 under windows lately for one of my contracting clients and of course nothing works right. So my fight has been very similar. Mine are always with windows though since I'm a linux user 99% of the time. I finally got it but it took me 3 hours when it should have taken 20 minutes, lol.



  • incrementally solved... disk full. I did a make -k and the compiler throws a disk full error but the linker does not.

    Jumping through gparted and virtualbox hoops to increase disk space and if I encounter a new, different error I'll start a new thread.



  • Yay one of my "shots in the dark" worked, lol. I have had similar weird things like that happen to me in case you couldn't tell. :)

    Linux acts really weird when it's disks fill up.

    Same with running out of memory. You get some seriously weird errors if anything at all from the compiler/linker.

    Glad it's solved.



  • spoiled by windows... I expected the Ubuntu trash to empty itself. 13GB of trash later I can build, no problem.

    openssl 1.0.2.c --> BlueTiger's ESMTP library --> sending email from my arm device.

    now to figure out an inconsistent issue with openssl for win64 missing openssl32.lib in the install (but the dll is there and it worked last night!?)

    .


Log in to reply
 

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