nettlep / gobbledegook

Standalone D-Bus-based BlueZ BLE GATT server for C/C++
BSD 3-Clause "New" or "Revised" License
162 stars 73 forks source link

Glib Lib #38

Open sauadwaya opened 4 years ago

sauadwaya commented 4 years ago

Anyone knows how to update the Glib library to a version higher than 2.44 on Linux?

rogermorrell commented 4 years ago

I has the same problem trying to run the build on raspberry Pi with the latest Linux and glib-2.0. It has the -2.0 but not as high s 2.44 I have not looked at the code in detail yet but was wondering why a graphic library would be needed. I thought it was a command line program.

sauadwaya commented 4 years ago

I think glib is used in this project for more efficient data structure handling in C. So the way I fixed this problem was to just get a brand new SD card, install Raspbian OS from the website. I think it would automatically come with a GLIB version of 2.58.3 in the new SD card (if not just do an update). Then locate the glib-2.0 folder in the old SD card (where glib wont update beyond 2.42 I think), and replace it with the glib-2.0 folder in the new SD card. Doing this would show a bunch of warnings about deprecated stuff, but it would compile and run fine.

rogermorrell commented 4 years ago

sauadwaya, thanks for the suggestion. I tried this, well what I did was just create Raspbian SD card from the website. did a apt-get upgrade and then put GGK in my projects directory and ran the configure && make again and it failed again with the glib-2.0 not found

I did a find and could not find a GLIB file or folder with a .o library anywhere . I found 2 glib-2.0 folders , one in /usr/lib/arm....bihf/ this folder has 3 executable files one is glib-compile-schemas the others gio-..... The other glib-2.0 in /usr/share had one further folder with mainly xml files.

I'm clearly missing something basic any suggestions ?

As a side comment I have done a number of other compiles in the system - that don't use glib and they work ok

Roger

rogermorrell commented 4 years ago

I figured it out to use GLIB you need the dev version l did a adp-get install on these (for this and some other approaches) libboost-thread-dev libbluetooth-dev libglib2.0-dev

and that made the configure script work

oliverocean commented 2 years ago

@rogermorrell thanks so much for posting your results. Over a year later and super helpful!

FYI, on a BeagleBone Black running Debian 9.13 (stretch), I was able to finally compile by installing libbluetooth-dev and libglib2.0-dev, as suggested above.