building from "git clone git:// -b 5.6" fails

  • while trying to accomplish

      ~/raspi/qt5/bin/qmake -r

    onto "git clone git:// -b 5.6" error is received:

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

    and I have

    pkg-config --modversion bluez

    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:// -b 5.6

    Please don't tell me to create qmake from 5.5

    How do I compile qtconnectivity?..

  • does this 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 (libc6,x86-64) => /usr/lib/ (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/ (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/ (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/

    and where should I put them?..

  • dear moderators, can this question be transferred to ?

  • Lifetime Qt Champion


    Move done

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




    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


    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