0

I try to compile bluez-utils-3.36, but after a try to configure the package, the error message: configure: error: Bluetooth library is required appeared.

The problem: i am not allowed to update or install anything on this machine, only compile. So i think the only way is to point at the libraries. So i wrote ./configure -help and found two Options:

  BLUEZ_CFLAGS    C compiler flags for BLUEZ, overriding pkg-config

  BLUEZ_LIBS      linker flags for BLUEZ, overriding pkg-config

So i added them to my command and complemented the path:

./configure --prefix=/home/black/test/ltib/rootfs BLUEZ_CFLAGS=-I~/home/black/test/bluetooth/bluez-libs-3.36/include BLUEZ_LIBS="-L~/home/black/test/bluetooth/bluez-libs-3.36/src/.libs -lbluetooth"

Now it worked with no errors.

But if i execute the command make then i get alot of errors, e.g.:

glib-helper.c:34:33: error: bluetooth/bluetooth.h: Datei oder Verzeichnis nicht gefunden
glib-helper.c:35:30: error: bluetooth/rfcomm.h: Datei oder Verzeichnis nicht gefunden
glib-helper.c:36:29: error: bluetooth/l2cap.h: Datei oder Verzeichnis nicht gefunden
glib-helper.c:37:27: error: bluetooth/sco.h: Datei oder Verzeichnis nicht gefunden
glib-helper.c:38:27: error: bluetooth/sdp.h: Datei oder Verzeichnis nicht gefunden
glib-helper.c:39:31: error: bluetooth/sdp_lib.h: Datei oder Verzeichnis nicht gefunden

Datei oder Verzeichnis nicht gefunden is german and means: folder or file not found

How can i solve this?

  • 1
    [DISCLAIMER: I don't know whether bluez-libs-3.36 is compatible with bluez-5.33] Did you actually make and install bluez-libs-3.36, or just unpack the archive? Although it appears to contain the bluetooth headers, they are not within an appropriate directory structure <prefix>/include/bluetooth/. You should be able to install it in your home directory by specifying --prefix=$HOME to the configure script. Then you can tell the bluez configure script to look in $HOME for bluetooth: either via the indicated variables or by setting PKG_CONFIG_PATH to include $HOME/lib/pkgconfig/ – steeldriver Aug 6 '15 at 14:12
  • Im sorry, i made a mistake, i confused``bluez-5.33` with bluez-utils-3.36 i changed it in the question. No i did not make or install. I am not allowed to install anything, thats the problem. – Black Aug 7 '15 at 6:40
2

I think there is a problem with the paths you are supplying to the configure command:

./configure --prefix=/home/black/test/ltib/rootfs \
BLUEZ_CFLAGS=-I~/home/black/test/bluetooth/bluez-libs-3.36/include \
BLUEZ_LIBS="-L~/home/black/test/bluetooth/bluez-libs-3.36/src/.libs -lbluetooth"

When the ~ character has not preceding whitespace, it doesn't expand to the path to your home directory. Consider the output of:

$ echo  -I~/foo
-I~/foo

Versus:

$ echo  -I ~/foo
-I /home/lars/foo

You can simply replace ~ with $HOME. Even with that fix, your paths look suspect:

~/home/black/test/bluetooth/bluez-libs-3.36/include

Assuming that your username is black, this would expand to:

/home/black/home/black/test/...

Which seems likely to be incorrect.

Try fixing the -I and -L paths and re-running configure.

  • Thank you very much, i did not knew this. I changed it like this: -L~/test/bluetooth/... but it still won't compile, same errors. I compiled the glib Package and got a file called libglib-2.0.so. Can i instruct the Makefile somehow to use it? I have to tell the compiler somehow where to find these missing files. Any ideas? – Black Aug 6 '15 at 12:54
  • I mean Linker, not compiler, sry. – Black Aug 7 '15 at 6:24
0

I found the solution by myselve. Copy the folder "include" from bluez-libs-3.36 and move the copy to bluez-utils-3.36\common. Then rename the copied folder from "include" to "bluetooth". Now it should compile without errors.

  • Thx to larsks for helping me with the path problem – Black Aug 7 '15 at 8:53
  • cd bluez-libs-3.36/common ; ln -s ../include bluetooth – Rui F Ribeiro Aug 31 '18 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.