Missing bluez and bluetooth dev package ?
-
After coding for Bluetooth for few months I had to "rebuild" / change my OS. .
Now I am STILL getting missing bluez and dev AFTER I have tried to install them...
What is going on ?Is this a versions problem - Ubuntu or QT issue ? Or both ?
PS There is an issue (bug reported) with D_BUss so I do NOT WANT to upgrade to the latest Ubuntu versio0n /generic.
q3@q3-desktop:~$ sudo apt install bluez
[sudo] password for q3:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
bluez is already the newest version (5.64-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
q3@q3-desktop:~$ -
What is going on ?
You rebuilt your environment and left things out. Most likely because you never knew what was in your environment to start with.
Project ERROR: Unknown module(s) in QT: bluetooth
This error comes from qmake. You have not installed the bluetooth module in the version of the (unspecified) Qt library you are compiling against.
If your Qt version was installed using the binary installer then:
- Open Qt Maintenance tool
- Installed the "Qt Connectivity" additional library for your Qt version(s)
If you are building using the Qt libraries provided by Ubuntu then:
- Install qtconnectivity5-dev
Project ERROR: bluez development package not found
This message seems to be coming from your PRO file directly.
Install the BlueZ development package: libbluetooth-dev -
@ChrisW67 I think I found a hack to fix this. I am "importing " the project and it compiles just find.
And you are correct - I did not installed Qt connectivity - did not do "additional libraries".NOT SOLVED
SEE NEXT POST
-
NOT SOLVED
Here are all kits installed...
I did check "connectivity" component - also installed
still getting this errorHowever , this shows only one kit
Do I need to add the others , especially 5.12 ... ?
HOW ??? -
You only need one Qt version (with the correct modules/libraries installed). Can you build and run the bluetooth scanner example unmodified? You should have it already installed and can load it from QtCreator's 'Welcome' tab.
-
@mchinand Thanks, it is so easy after using QT for years for old fart to forget the basics.
Like "install git"....
so - here come a stupid question - after "git" is ready to roll I get "configure project " - automatically....
Trying to build (first) existing project - from ".pro" I see I am missing CONFIGURATION of most of the kits.HOW do I configure this old .pro project build in DIFFERENT settings?
-
@AnneRanch I think I need to go back and fix my Ubuntu OS.
-
@AnneRanch You need the Qt connectivity package installed in any version of Qt you are using to build your project. If you are going to build your project with "Desktop Qt 5.15.2 GCC 64bit" then that Qt kit must have the required module. If you are going to use "Desktop Qt 6.4.0 GCC 64bit" then that Qt kit must have the required module. I trust you see the pattern here.
If you try to build your project with another Qt that does not have the Qt Connectivity module then you will fail with the sort of error message here.
Your screen shot of the Build & Run panel shows two different kits that your project has been configured with. You currently have the "Desktop" kit selected. This is almost certainly the auto-detected system Qt, which almost certainly does not have requisite Qt Connectivity module installed. Your error messages probably came from an attempt to build with that kit but, as usually for your posts, you never really provide sufficient information for anyone to be sure.
The other kit your project has been configured for is called "Desktop Qt 6.4.0 GCC 64bit" (one of the four kits that likely came from the binary installer). Only you can tell whether that particular Qt version has the Qt Connectivity module or not.
-
@ChrisW67
I have found another resource which suggest to add libluetooth-dev packageAt this point I have few questions / observations
"bluez" in whatever format is a integral part of Linux , hence system commands , likes "bluetoothctl" works without any other configuration
QT "links / uses " OS resources , hence it has access to "bluez"
I did have "missing blues " errors at one point.Installing bluez and bbluetooth-dev did not solve anything - hence what is the purpose of installing it ?
The "connectivity" component is NOT present in all QT version BUT I have an option to "use all kits " which apparently is superfluous feature if I do not end up with QT version which includes "connectivity ".
-
Have you installed the libbluetooth-dev package (e.g., with
sudo apt install libbluetooth-dev
)?Have you installed the Qt connectivity library for whichever Qt version you are using with the Qt maintenancetool (see @ChrisW67 screenshot above)?
I wouldn't worry about your code/project until you can build and run Qt's bluetooth scanner example. This way you are eliminating any errors in your code/project file. Your code will not work until you can run the Qt bluetooth examples.
-
@mchinand said in Missing bluez and bluetooth dev package ?:
sudo apt install libbluetooth-dev
q1@q1-desktop:~$ sudo apt install libbluetooth-dev
[sudo] password for q1:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libbluetooth-dev is already the newest version (5.64-0ubuntu1).
The following packages were automatically installed and are no longer required:
libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded....and getting this error on ANY kits - including 6.4.0.
:-1: error: Project ERROR: libbluetooth-dev development package not found
-
@ChrisW67 Sorry - I do not have a "small program" and logically if I run a small program and I get SAME error it is pretty much futile step backwards. And it it works (without an error ) - how will it help me to solve my problem? That is not how I troubleshoot. I had perfectly working program and had to change the OS ...now my program keep failing to compile Bluetooth and so far nobody has given a suggestion where / what I have missed in my new setup.
Where is the missing piece ?
"bluez" in OS kernel - have no control over that - verified , and it is installed
Bluetooth development library - verified - it is installed
kit containing "connectivity " - selected kit which has "connectivity" component
"bluetooth" module selected in .pro file - that NEVER changed -
@AnneRanch said in Missing bluez and bluetooth dev package ?:
Sorry - I do not have a "small program" and logically if I run a small program and I get SAME error it is pretty much futile step backwards. And it it works (without an error ) - how will it help me to solve my problem?
This exercise of creating a small program that reproduces the problem helps because:
- It forces you remove any extra stuff that may be confusing the situation and distill the problem down to essential components.
- It may well result in you stumbling across exactly what was causing the problem.
- If it does not result in you identifying the problem, then it is something you can share with us so that we have some visibility of exactly what you are doing.
I asked for something that does not work. If you are unable to reproduce the failure then the difference between the minimal, working program and the current failing situation contains the answer you seek.