Compiling GIMX 5.1 on Gentoo - Bluetooth/mgmt.h Missing

Talk about anything concerning the source code.
Post Reply
Guardian_Chris
Posts: 1
Joined: Wed Oct 21, 2015 11:13 pm

Compiling GIMX 5.1 on Gentoo - Bluetooth/mgmt.h Missing

Post by Guardian_Chris »

Hi folks!

This Sofware looks so awesome. Cant wait to use my GT27 on the PS4 with this Software.

Right now i have two little blocker first, the Source Code will not compile.

Code: Select all

cc -Wall -Wextra -Wno-unused-parameter -s -O3 -Iinclude -I../shared/event/include -I../shared/controller/include -I../shared/async/include -I../shared/gpp -I/usr/include/libxml2 -Iconnectors/btstack/include -Iconnectors/btstack/src  -c -o connectors/linux/bluetooth/bt_mgmt.o connectors/linux/bluetooth/bt_mgmt.c
connectors/linux/bluetooth/bt_mgmt.c:17:28: schwerwiegender Fehler: bluetooth/mgmt.h: Datei oder Verzeichnis nicht gefunden
 #include <bluetooth/mgmt.h>
                            ^
Kompilierung beendet.
<eingebaut>: die Regel für Ziel „connectors/linux/bluetooth/bt_mgmt.o“ scheiterte
make[1]: *** [connectors/linux/bluetooth/bt_mgmt.o] Fehler 1
The make command complains during the compilation that it could not find: bluetooth/mgmt.h
Past some conversations with my favourite search engine i think that gentoo missed the Ubuntu or Fedora equal Package for libbluetooth-dev_4.98-2ubuntu7_amd64.deb.

Then i extract the files, the package include:

Code: Select all

$ ls usr/include/bluetooth/
bluetooth.h  bnep.h  cmtp.h  hci.h  hci_lib.h  hidp.h  l2cap.h  mgmt.h  rfcomm.h  sco.h  sdp.h  sdp_lib.h  uuid.h
First try was to changed Line 17 in core/connectors/linux/bluetooth/bt_mgmt.c to include the mgmt.h from the extrected libbluetooth_dev-4.98 with the md5sum: e6203eed0085e92f95e33026ddaa0236

This did not work it complain about some missing status element:

Code: Select all

cc -Wall -Wextra -Wno-unused-parameter -s -O3 -Iinclude -I../shared/event/include -I../shared/controller/include -I../shared/async/include -I../shared/gpp -I/usr/include/libxml2 -Iconnectors/btstack/include -Iconnectors/btstack/src  -c -o connectors/linux/bluetooth/bt_mgmt.o connectors/linux/bluetooth/bt_mgmt.c
connectors/linux/bluetooth/bt_mgmt.c: In Funktion »mgmt_cmd_complete«:
connectors/linux/bluetooth/bt_mgmt.c:149:15: Fehler: »struct mgmt_ev_cmd_complete« hat kein Element namens »status«
     else if(ev->status)
               ^
connectors/linux/bluetooth/bt_mgmt.c:159:15: Fehler: »struct mgmt_ev_cmd_complete« hat kein Element namens »status«
     else if(ev->status)
               ^
connectors/linux/bluetooth/bt_mgmt.c:169:15: Fehler: »struct mgmt_ev_cmd_complete« hat kein Element namens »status«
     else if(ev->status)
               ^
connectors/linux/bluetooth/bt_mgmt.c:181:15: Fehler: »struct mgmt_ev_cmd_complete« hat kein Element namens »status«
     else if(ev->status)
               ^
connectors/linux/bluetooth/bt_mgmt.c: In Funktion »mgmt_load_link_keys«:
connectors/linux/bluetooth/bt_mgmt.c:284:15: Fehler: »struct mgmt_link_key_info« hat kein Element namens »addr«
     bacpy(&key->addr.bdaddr, bdaddrs+i);
               ^
connectors/linux/bluetooth/bt_mgmt.c:285:8: Fehler: »struct mgmt_link_key_info« hat kein Element namens »addr«
     key->addr.type = BDADDR_BREDR;
First i thought its because that GIMX need the 4.x Version and the other files on my System using Version 5.33. Because of other dependencies its not so easy to downgrade my whole system.

Here are some addition Informations:

Code: Select all

net-wireless/bluez
     Available versions:  4.101-r9 5.33(0/3) ~5.34(0/3) ~5.35(0/3) {alsa cups debug gstreamer hid2hci +obex pcmcia (+)readline selinux systemd test test-programs +udev usb ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" PYTHON_TARGETS="python2_7"}
     Installed versions:  5.33(13:54:42 21.09.2015)(cups obex readline systemd udev -debug -selinux -test ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
     Homepage:            http://www.bluez.org
     Description:         Bluetooth Tools and System Daemons for Linux

$ eix curl
net-misc/curl
     Available versions:  7.42.1^t ~7.42.1-r1^t 7.43.0^t ~7.44.0^t ~7.44.0-r1^t ~7.45.0^t {adns http2 idn ipv6 kerberos ldap metalink rtmp samba ssh ssl static-libs test threads ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" CURL_SSL="axtls gnutls libressl nss +openssl polarssl winssl" ELIBC="Winnt"}
     Installed versions:  7.43.0^t(20:57:54 22.07.2015)(ipv6 ssl -adns -http2 -idn -kerberos -ldap -metalink -rtmp -samba -ssh -static-libs -test -threads ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" CURL_SSL="openssl -axtls -gnutls -nss -polarssl -winssl" ELIBC="-Winnt")
     Homepage:            http://curl.haxx.se/
     Description:         A Client that groks URLs
The final Question is: How could i compile the sourcecode with the right bluez Version?

I am not sure how the bluez Stack Version belongs to the Kernel/driver or Software that try to handle the Bluetooth Key Request. Just want to ask before i do something stupid.

Oh by the way i tried to download the GIMX-5.1.deb Package, extracting that files and running GIMIX-launcher, that complained about a missing curl-gnutls. Its because my curl use openssl instead of gnutls.

Thank you for reading!
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Compiling GIMX 5.1 on Gentoo - Bluetooth/mgmt.h Missing

Post by Matlo »

Hi,
I moved the topic to the dev section.
For some reasons Raspbian Jessie also misses this header, and to fix this I pushed mgmt.h into core/include/connectors/rpi/.
You can edit core/connectors/linux/bluetooth/bt_mgmt.c and replace these lines:

Code: Select all

#ifndef __ARM_ARCH_6__
#include <bluetooth/mgmt.h>
#else
#include <connectors/rpi/bluetooth/mgmt.h>
#endif
with:

Code: Select all

#include <connectors/rpi/bluetooth/mgmt.h>
This header file may not be the right one for your system, but it won't hurt as you won't use the bluetooth connection method.
GIMX creator
cajuil
Posts: 11
Joined: Sat Jan 23, 2016 9:39 am

Re: Compiling GIMX 5.1 on Gentoo - Bluetooth/mgmt.h Missing

Post by cajuil »

I arrived pretty late to this thread I see. Not trying to revive it either, but I do want to share my experience or knowledge on this subject.
-------------------------------------------------------

Note: :arrow: I'm running Ubuntu 15.10 (Wily) 32bit (as of the time of writing) inside a Virtual Machine (Virtual Box).

I don't know if this will work for Gentoo or any other Linux distro, so YMMV.

So I had the same problem, and this is what I did:

You want to install these two packages:
libbluetooth3 and libbluetooth-dev, this last one includes mgmt.h library. (Which is not found in Ubuntu 15.10 but it's found in Ubuntu 15.04 (Vivid) oddly enough)

Both I downloaded from this mirror:
http://mirrors.kernel.org/ubuntu/pool/m ... 5_i386.deb
http://mirrors.kernel.org/ubuntu/pool/m ... 5_i386.deb
Note: These are 32bit.

I had previously installed libbluetooth3, and when I tried to uninstall it, it wanted to remove more than just the package so I had to try something else.
So I did a:

Code: Select all

sudo dpkg -i --force-overwrite libbluetooth3_4.101-0ubuntu25_i386.deb

Anyway, hope this helps.
Post Reply