Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 5.5.1, libmysqlclient problem in embedded Debian device
QtWS25 Last Chance

Qt 5.5.1, libmysqlclient problem in embedded Debian device

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
libmysqlclientembeddedbeaglebone bbb
5 Posts 2 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    luca
    wrote on 30 Dec 2015, 17:47 last edited by
    #1

    Hi all,
    I'm building Qt 5.5.1 on my BBB with the latest Debian image.
    I installed on the board the required packages:

    apt-get install libmysqlclient-dev
    

    Then on my PC I cross compiled asa always:

    ./configure -opensource -confirm-license -no-pch -prefix /opt/qt551-bbbhf -release -force-debug-info -device linux-bbbhf-g++ -make libs -nomake tests -nomake examples -device-option CROSS_COMPILE=/opt/arm-toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/bbbhf
    

    I need Mysql plugin but I get:

    SQL drivers: 
        DB2 .................. no
        InterBase ............ no
        MySQL ................ no
        OCI .................. no
        ODBC ................. no
        PostgreSQL ........... no
        SQLite 2 ............. no
        SQLite ............... yes (plugin, using bundled copy)
        TDS .................. no
    
    

    if I check the configure messages I can see:

    InterBase disabled.
    MySQL (thread-safe) auto-detection... ()
    /opt/arm-toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/mnt/bbbhf -O2 -g -Wall -W -fPIC  -I. -I/usr/include/mysql -I../../../mkspecs/devices/linux-bbbhf-g++ -o mysql.o ../mysql/mysql.cpp
    /opt/arm-toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/mnt/bbbhf -o mysql_r mysql.o   -lrt --sysroot=/mnt/bbbhf -L/usr/lib64 -lpthread -lz -lm -lssl -lcrypto -ldl -lmysqlclient_r 
    /usr/lib64/librt.so: file not recognized: File format not recognized
    collect2: error: ld returned 1 exit status
    gmake: *** [mysql_r] Error 1
    MySQL (thread-safe) disabled.
    MySQL (thread-unsafe) auto-detection... ()
    /opt/arm-toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/mnt/bbbhf -O2 -g -Wall -W -fPIC  -I. -I/usr/include/mysql -I../../../mkspecs/devices/linux-bbbhf-g++ -o mysql.o mysql.cpp
    /opt/arm-toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/mnt/bbbhf -o mysql mysql.o   -lrt --sysroot=/mnt/bbbhf -L/usr/lib64 -lpthread -lz -lm -lssl -lcrypto -ldl -lmysqlclient 
    /usr/lib64/librt.so: file not recognized: File format not recognized
    collect2: error: ld returned 1 exit status
    gmake: *** [mysql] Error 1
    MySQL (thread-unsafe) disabled.
    
    

    It seems that it try to find arm library on my PC : -L/usr/lib64 but I think that's a configuration bug.
    I remember that there wasn't that problem with previous Qt versions.

    What do you think about? How can I get Mysql plugin working on my BeagleBone Black?

    Thanks!

    Luca

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 30 Dec 2015, 21:33 last edited by
      #2

      Hi,

      While that is pretty strange, one workaround to try is to build Qt like that, and then build the MySQL plugin by hand like shown in the documentation.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      L 1 Reply Last reply 31 Dec 2015, 09:33
      0
      • S SGaist
        30 Dec 2015, 21:33

        Hi,

        While that is pretty strange, one workaround to try is to build Qt like that, and then build the MySQL plugin by hand like shown in the documentation.

        L Offline
        L Offline
        luca
        wrote on 31 Dec 2015, 09:33 last edited by
        #3

        After configuring Qt I get a new Makefile in:

        qt-everywhere-opensource-src-5.5.1/qtbase/config.tests/unix/mysql/
        

        that contain the -L/usr/lib64 that generate the problem.
        On the top of the Makefile there is:

        # Command: /mnt/temporanea/qt-everywhere-opensource-src-5.5.1/qtbase/bin/qmake -nocache -spec /mnt/temporanea/qt-everywhere-opensource-src-5.5.1/qtbase/mkspecs/devices/linux-bbbhf-g++ 'CONFIG+= cross_compile force_debug_info compile_examples shared' CONFIG+=android_app 'CONFIG-=debug_and_release app_bundle lib_bundle' 'LIBS*=--sysroot=/mnt/bbbhf "-L/usr/lib64" "-lmysqlclient" "-lpthread" "-lz" "-lm" "-lssl" "-lcrypto" "-ldl"' LIBS+= 'INCLUDEPATH*= "/usr/include/mysql"' 'QMAKE_CXXFLAGS*=--sysroot=/mnt/bbbhf' QMAKE_CXXFLAGS+= -o Makefile mysql.pro
        

        Where can I find in Qt source the point where that Makefile is generated so that I can eventually find the problem?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 31 Dec 2015, 21:19 last edited by
          #4

          /qt5-root-folder/qtbase/config.tests

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • L Offline
            L Offline
            luca
            wrote on 2 Jan 2016, 15:59 last edited by
            #5

            I just filled a bug report on:

            https://bugreports.qt.io/browse/QTBUG-50244

            1 Reply Last reply
            0

            1/5

            30 Dec 2015, 17:47

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved