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

building from "git clone git://code.qt.io/qt/qtconnectivity.git -b 5.6" fails



  • while trying to accomplish

      ~/raspi/qt5/bin/qmake -r
    

    onto "git clone git://code.qt.io/qt/qtconnectivity.git -b 5.6" error is received:

           Checking for bluez... no
           Checking for bluez_le... no
    

    and I have

    pkg-config --modversion bluez
    5.35
    

    error comes from

    !packagesExist($$PKGCONFIG_LIB): error("$$PKGCONFIG_LIB development package not found")
    

    of /home/hap/raspi/qt5/mkspecs/features/link_pkgconfig.prf

    all right, after doing

       export PKG_CONFIG_PATH="/usr/lib/pkgconfig"
    

    this eeror is changed to "-lbluetooth is not found" and so is bluetooth/bluetooth.h

    Happens on both x64 and x86 Ubuntu 15.10
    qmake was made from git clone git://code.qt.io/qt/qtbase.git -b 5.6

    Please don't tell me to create qmake from 5.5

    How do I compile qtconnectivity?..



  • does this https://dev.openwrt.org/ticket/2238 relate to problem? - I don't have bluez.pc in /usr/lib/pkgconfig/, I have it in /usr/lib/i386-linux-gnu/pkgconfig



  • made qmake from 5.5 source. Result with it is even worse:
    Checking for bluez... no
    Checking for bluez_le... no
    Checking for btapi10_2_1... no
    Checking for libbb2... no



  • so, after doing

    1. export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig/"
    2. putting bluetooth folder (with bluetooth.h) into both qtconnectivity/config.tests/bluez and /home/hap/raspi/Qt-5.6/qtconnectivity/config.tests/bluez_le

    the only problem left is

     error: cannot find -lbluetooth
     collect2: error: ld returned 1 exit status
     Makefile:64: recipe for target 'bluez' failed
    

    let's look at

    ldconfig -p | grep bluetooth
    libgnome-bluetooth.so.13 (libc6,x86-64) => /usr/lib/libgnome-bluetooth.so.13
    libgnome-bluetooth.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgnome-bluetooth.so.0
    libbluetooth.so.3 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libbluetooth.so.3
    libbluetooth.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libbluetooth.so
    

    and where should I put them?..



  • dear moderators, can this question be transferred to https://forum.qt.io/category/49/qtonpi ?


  • Lifetime Qt Champion

    Hi,

    Move done



  • solution's quite obvious - libbluetooth-dev must be installed on rpi first, then its files should be synced to

    ~/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig/bluez.pc

    ~/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libbluetooth.a
    ~/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libbluetooth.so
    ~/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libbluetooth.so.3
    ~/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libbluetooth.so.3.17.11

    ~/raspi/sysroot/usr/include/bluetooth/bluetooth.h

    and then compiling qtconnectivity goes without any adventures


  • Lifetime Qt Champion

    Good !

    Then since you have it building now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)



  • @Haponov Could you please tell us how we can sync libbluetooth-dev to bluez.pc, libbluetooth.a , ... files?



  • @AGol
    to be clear - I was talking about http://wiki.qt.io/RaspberryPi2EGLFS

    such,

    1. on RPI, once you do

       sudo apt-get install libbluetooth-dev bluetooth blueman bluez libusb-dev libdbus-1-dev bluez-hcidump joystick bluez-tools
      

    all the needed bluez.pc, libbluetooth.a , ... files are created on your RPI. (I've written even more installs than needed for these files, just in case)
    2) do
    rsync -avz pi@IP:/lib sysroot
    rsync -avz pi@IP:/usr/include sysroot/usr
    rsync -avz pi@IP:/usr/lib sysroot/usr
    rsync -avz pi@IP:/opt/vc sysroot/opt

    and then you can compile qtconnectivity on your Ubuntu PC for RPI


Log in to reply