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

Linux i386 Cross Compile... missing Qt5 libs



  • Hi all,

    My dev environment is LinuxMint x64 & Qt Creator.
    Im attempting to cross-compile my Qt app for Linux i386.

    I've installed all the i386 tools/libs i can think of, and setup the new 32bit "kit" in QtCreator.
    Everything looks fine there.

    On compiling the app, on the last step of linking, i get:

    g++ -m32 -Wl,-O1 -Wl,--gc-sections -flto -o cftest_32 main.o mainwindow.o keypad635dialog.o display635dialog.o packetcoms.o temperature635dialog.o fan635dialog.o dow635dialog.o io635dialog.o cfserialportenum.o cfserialcoms.o keypad631dialog.o display631dialog.o serpak_coms.o fifo.o eerrors.o packetlogframe.o livedisplaydialog.o portscombobox.o cfserial_portenum.o cfmoduleversion.o qrc_images.o moc_mainwindow.o moc_keypad635dialog.o moc_display635dialog.o moc_packetcoms.o moc_temperature635dialog.o moc_fan635dialog.o moc_dow635dialog.o moc_io635dialog.o moc_cfserialcoms.o moc_keypad631dialog.o moc_display631dialog.o moc_serpak_coms.o moc_packetlogframe.o moc_livedisplaydialog.o moc_portscombobox.o   -ludev -lQt5Widgets -L/usr/X11R6/lib64 -lQt5Gui -lQt5Core -lGL -lpthread 
    /usr/bin/ld: cannot find -lQt5Widgets
    /usr/bin/ld: cannot find -lQt5Gui
    /usr/bin/ld: cannot find -lQt5Core
    Makefile:251: recipe for target 'cftest_32' failed
    collect2: error: ld returned 1 exit status
    make: *** [cftest_32] Error 1
    04:27:54: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project cftest (kit: Desktop_i386)
    When executing step "Make"
    

    I have these installed:

    root@qt5-dev:~# dpkg -l | grep libqt5 | grep i386
    ii  libqt5core5a:i386                           5.5.1+dfsg-16ubuntu7.5                       i386         Qt 5 core module
    ii  libqt5dbus5:i386                            5.5.1+dfsg-16ubuntu7.5                       i386         Qt 5 D-Bus module
    ii  libqt5gui5:i386                             5.5.1+dfsg-16ubuntu7.5                       i386         Qt 5 GUI module
    ii  libqt5network5:i386                         5.5.1+dfsg-16ubuntu7.5                       i386         Qt 5 network module
    ii  libqt5widgets5:i386                         5.5.1+dfsg-16ubuntu7.5                       i386         Qt 5 widgets module
    

    What libs am i missing here?

    Thanks in advance!



  • @MWPau

    I assume this is happening when try to cross-compile your app.
    Have you cross-compiled also Qt source for use with your cross-compiled app?


  • Lifetime Qt Champion

    Hi,

    Did you also setup a Qt version for your i386 installed Qt ?



  • @koahnig
    As shown this happens when g++/ld is attempting to link to the 32bit Qt libs which apparently dont exist on the system.
    But dpkg shows that they are installed.

    There should be no need for me to compile Qt source at all. Just as there wasnt to compile the 64bit version.


Log in to reply