QtSerialBus Install failures on Cross Compile for Raspberry Pi



  • I have a VM running Ubuntu 16.10 x64. I followed the cross compile instructions from RaspberryPi2EGLFS.

    I followed these instructions except I compiled and installed qt-everywhere-opensource-src-5.9.0 in my Ubuntu VM.

    My config statement is:

    ./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v -no-use-gold-linker
    

    This runs without errors and then make also runs without errors but when I perform a make install I get errors for QtSerialBus:

    ...
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtbase/bin/qmake -install qinstall file /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/cmake/Qt5SerialBus/Qt5SerialBus_PeakCanBusPlugin.cmake /home/esp32/raspi/qt5pi/lib/cmake/Qt5SerialBus/Qt5SerialBus_PeakCanBusPlugin.cmake
    make[5]: Leaving directory '/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src/plugins/canbus/peakcan'
    cd tinycan/ && ( test -e Makefile || /home/esp32/qt-everywhere-opensource-src-5.9.0/qtbase/bin/qmake -o Makefile /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src/plugins/canbus/tinycan/tinycan.pro ) && make -f Makefile install
    make[5]: Entering directory '/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src/plugins/canbus/tinycan'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtbase/bin/qmake -install qinstall program ../../../../plugins/canbus/libqttinycanbus.so /home/esp32/raspi/qt5pi/plugins/canbus/libqttinycanbus.so
    /home/esp32/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-strip --strip-unneeded /home/esp32/raspi/qt5pi/plugins/canbus/libqttinycanbus.so
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtbase/bin/qmake -install qinstall file /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/cmake/Qt5SerialBus/Qt5SerialBus_TinyCanBusPlugin.cmake /home/esp32/raspi/qt5pi/lib/cmake/Qt5SerialBus/Qt5SerialBus_TinyCanBusPlugin.cmake
    make[5]: Leaving directory '/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src/plugins/canbus/tinycan'
    make[4]: Leaving directory '/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src/plugins/canbus'
    make[3]: Leaving directory '/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src/plugins'
    cd tools/ && ( test -e Makefile || /home/esp32/qt-everywhere-opensource-src-5.9.0/qtbase/bin/qmake -o Makefile /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src/tools/tools.pro ) && make -f Makefile install
    make[3]: Entering directory '/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src/tools'
    cd canbusutil/ && ( test -e Makefile || /home/esp32/qt-everywhere-opensource-src-5.9.0/qtbase/bin/qmake -o Makefile /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src/tools/canbusutil/canbusutil.pro ) && make -f Makefile install
    make[4]: Entering directory '/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src/tools/canbusutil'
    /home/esp32/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link,/home/esp32/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/esp32/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/esp32/raspi/sysroot/lib/arm-linux-gnueabihf -mfloat-abi=hard --sysroot=/home/esp32/raspi/sysroot -Wl,--gc-sections -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../lib -Wl,-rpath-link,/home/esp32/qt-everywhere-opensource-src-5.9.0/qtbase/lib -Wl,-rpath-link,/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialport/lib -o ../../../bin/canbusutil .obj/main.o .obj/readtask.o .obj/canbusutil.o .obj/sigtermhandler.o .obj/moc_readtask.o .obj/moc_canbusutil.o .obj/moc_sigtermhandler.o   -L/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib -lQt5SerialBus -L/home/esp32/qt-everywhere-opensource-src-5.9.0/qtbase/lib -lQt5Core -lpthread 
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QHostAddress::~QHostAddress()@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QHostAddress::QHostAddress(QString const&)@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QTcpServer::close()@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QTcpServer::acceptError(QAbstractSocket::SocketError)@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QAbstractSocket::peerName() const@Qt_5'
    /home/esp32/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libQt5Network.so.5: undefined reference to `QNonContiguousByteDevice::disableReset()'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QAbstractSocket::staticMetaObject@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QAbstractSocket::peerPort() const@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QAbstractSocket::error(QAbstractSocket::SocketError)@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QAbstractSocket::peerAddress() const@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QTcpServer::listen(QHostAddress const&, unsigned short)@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QTcpSocket::QTcpSocket(QObject*)@Qt_5'
    /home/esp32/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libQt5Network.so.5: undefined reference to `qIsEffectiveTLD(QString const&)'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QAbstractSocket::state() const@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QTcpServer::staticMetaObject@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `operator<<(QDebug, QHostAddress const&)@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QTcpServer::newConnection()@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QTcpServer::errorString() const@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QAbstractSocket::disconnected()@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QTcpServer::isListening() const@Qt_5'
    /home/esp32/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libQt5Network.so.5: undefined reference to `qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*)'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QAbstractSocket::connected()@Qt_5'
    /home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/lib/libQt5SerialBus.so: undefined reference to `QTcpServer::QTcpServer(QObject*)@Qt_5'
    collect2: error: ld returned 1 exit status
    Makefile:93: recipe for target '../../../bin/canbusutil' failed
    make[4]: *** [../../../bin/canbusutil] Error 1
    make[4]: Leaving directory '/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src/tools/canbusutil'
    Makefile:57: recipe for target 'sub-canbusutil-install_subtargets' failed
    make[3]: *** [sub-canbusutil-install_subtargets] Error 2
    make[3]: Leaving directory '/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src/tools'
    Makefile:110: recipe for target 'sub-tools-install_subtargets' failed
    make[2]: *** [sub-tools-install_subtargets] Error 2
    make[2]: Leaving directory '/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus/src'
    Makefile:59: recipe for target 'sub-src-install_subtargets' failed
    make[1]: *** [sub-src-install_subtargets] Error 2
    make[1]: Leaving directory '/home/esp32/qt-everywhere-opensource-src-5.9.0/qtserialbus'
    Makefile:270: recipe for target 'module-qtserialbus-install_subtargets' failed
    make: *** [module-qtserialbus-install_subtargets] Error 2
    

    I thought I had this working before but my config was -device linux-rasp-pi2-g++ and now I changed it to linux-rasp-pi3-g++

    I also ran:

    sudo apt-get remove libqt5*
    

    as well as completely removing the qt-everywhere-opensource-src-5.9.0 directory and re-extracting the files so I would know I was starting from scratch.

    I've been spinning my wheels for a 2 days now so hopefully someone has some idea other than to not compile QtSerialBus.

    Thanks,
    George


Log in to reply
 

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