Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

cpp/ble-scan-bracelet not compiling #8

Open
sideralis opened this issue Dec 18, 2016 · 2 comments
Open

cpp/ble-scan-bracelet not compiling #8

sideralis opened this issue Dec 18, 2016 · 2 comments

Comments

@sideralis
Copy link

sideralis commented Dec 18, 2016

When trying to compile with Intel System Studio IoT Edition, I am getting a lot of errors:
docker exec -i c01a0741191ec8070e38d7efba43bf11c58aa18e9a7afc7c8920e19f3e63b808 /bin/bash -c "cd /workspace/BLE_scan_bracelet/Debug && i586-poky-linux-g++ -std=c++1y -I/usr/include/upm -I/usr/include/mraa -O0 -g3 -Wall -c -fmessage-length=0 -std=c++1y --sysroot= -m32 -march=i586 -c -ffunction-sections -fdata-sections -o src/src/ble-scan.o ../src/src/ble-scan.cpp"
In file included from ../src/src/ble-scan.cpp:68:0:
/usr/include/bluetooth/bluetooth.h: In function 'uint64_t bt_get_le64(const void*)':
/usr/include/bluetooth/bluetooth.h:177:9: error: expected identifier before '*' token
return bt_get_unaligned((const uint64_t *) ptr);
^
...
I am not familiar with docker and I don't understand how I can modify the file bluetooth.h to try to debug.

@sideralis
Copy link
Author

sideralis commented Dec 20, 2016

After some investigations, I found that the current docker container is causing the issue. I edit the file /usr/include/bluetooth/bluetooth.h in the docker container by replacing "typeof" by "__typeof__" and it is now compiling.
So the problem may come more from Intel System Studio IoT Edition than from this repository.

@ObjSal
Copy link

ObjSal commented Jan 17, 2017

@sideralis your suggestion actually works, Thanks!

For reference here's a link to the patch:
http://git.kernel.org/cgit/bluetooth/bluez.git/commit/lib/bluetooth.h?id=cf52a40302d0d20ccca22a7a1f53e46ef8abfca8

Looks like a very old patch, I don't know why Intel is taking a lot time to add this patch, or maybe it's not intel but something to do with the docket images? This is the first time using docker... so just throwing random thoughts.

fromgilbert added a commit that referenced this issue Sep 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants