BluetoothBLEClient icon indicating copy to clipboard operation
BluetoothBLEClient copied to clipboard

Compilation issue

Open digital-cinema-arts opened this issue 5 years ago • 2 comments

Hello,

While running make Makefile I get the following error:

gcc -c -g -Ibluez-5.50 -Ibluez-5.50/gdbus -I/usr/include/dbus-1.0 -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -o obj/ble.o ble.c ble.c:39:33: fatal error: src/shared/mainloop.h: No such file or directory #include "src/shared/mainloop.h" ^

I don't find any file called mainloop.h in any bluez related directories. Help would be appreciated.

digital-cinema-arts avatar Jun 09 '19 02:06 digital-cinema-arts

I resolved this error by following the directions at the very beginning of the Setup section:

wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.49.tar.xz
tar xvf bluez-5.49.tar.xz

raxod502 avatar Apr 02 '21 19:04 raxod502

After that I got the following error:

% make all
gcc -c -g -Ibluez-5.49 -Ibluez-5.49/gdbus -I/usr/include/dbus-1.0 -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -o obj/ble.o ble.c
In file included from bluez-5.49/gdbus/gdbus.h:31,
                 from ble.c:40:
/usr/include/dbus-1.0/dbus/dbus.h:29:10: fatal error: dbus/dbus-arch-deps.h: No such file or directory
   29 | #include <dbus/dbus-arch-deps.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:80: obj/ble.o] Error 1

Which I resolved by running as:

% make all SYS_LIB=/usr/lib/x86_64-linux-gnu

raxod502 avatar Apr 02 '21 19:04 raxod502