Open littleboot opened 1 year ago
Same problem with me :-(
to fix build fail #2
change the Makefile for the compilation to be -
$(CC) $(BASE).c $(CFLAG) $(INC) $(LIB) -o $(BASE)
@ophirHav I will try this out tomorrow (actually I already gave up so many thanks for your reply). Can you elaborate a bit?
so changing line 9 of the makefile from:
$(CC) $(CFLAG) $(INC) $(LIB) -o $(BASE) $(BASE).c
To:
$(CC) $(BASE).c $(CFLAG) $(INC) $(LIB) -o $(BASE)
It seems you only changed the order of the parameters passed to gcc, does this mean original make file was always incorrect or did gcc change or something. How did you arrive at this fix if I may ask?
Update: It works now, I can compile the program without errors, thank you very much!
worked for me as well :-)
Newer versions of GCC have made the order of arguments relevant for linking and optimization purposes. That's why your sources should go first and then reference libraries the code uses.
I had to replace line 3 of the Makefile to use pkg-config to build on Ubuntu 22.04 :
INC = -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -I /usr/include/gdk-pixbuf-2.0
with
INC = $(shell pkg-config --cflags glib-2.0) $(shell pkg-config --cflags gdk-pixbuf-2.0)
I had to replace line 3
For Ubuntu 24.04 also, this worked
Yup, it built. Anyone else having the problem where it outputs [I] Connecting to the lamp [E] Failed to set advertising parameters!
? I also tried running as root, but that didn't work. Also it doesn't make the light blink, and lights are unresponsive.
Hello I'm trying to build 'lampify' but I'm unable to do so, I've tried building on Linux mint and Kali linux both fail the same way.
System info
Linux tom-mint 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Install dependencies:
sudo apt install libbluetooth-dev libnotify-dev make gcc
Missing deps not listed in readme
git
Clone repo in downloads folder
cd ~/Downloads git clone https://github.com/MasterDevX/lampify.git cd lampify
Try building
make
Build fail 1
Fix
Seems the missing header file is located at a different location in my system:
/usr/lib/x86_64-linux-gnu/glib-2.0/include
Fix: add the missing path to the MakefileBuild fail 2
I don't know how to fix this issue, it seems the hci functions are depreciated in Bluez, this might be causing the problem. I have no clue on how to fix this, I hope someone is able to help