# Setting up an iBeacon scanner using the GATT Protocol for Bluetooth LE

**URL:** <https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053>\
**Category:** Share Your Projects\
**Created:** [29 September 2019 12:38 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053 "2019-09-29T12:38:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [29 September 2019 12:38 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/1 "2019-09-29T12:38:53Z")

</div>

This guide should help you to setup an iBeacon scanner using a Python script as external service. I have used the following "stuff":

- A RPi3B+
- SD-card, complete fresh Raspbian Buster with desktop and recommended software
- a Python script written to handle the actual scanning
- latest Node-RED
- the RPi3B+ built-in BLE device

First of all, see to that you start with a fresh Buster setup as above. Other combinations including older versions of raspbian, other rpi models is possible to use but you might run into a situation where more dependencies needs to be resolved. Nothing impossible but,,,more time consuming

_ **Check also that Bluetooth is turned on !!!** _

Assuming you have reached the state that the newly installed Buster image is properly updated and configured according to the initial startup, we can go ahead right away (I simply named my host "gattscanner"). Open up a cmd prompt, LXTerminal, and assuming we are now in /home/pi:

Check the installed version of Python3 (I have 3.7.3, thats fine)

```auto
pi@gattscanner:~ $ python3 --version
Python 3.7.3

```

Check the installed version of Bluez:

```auto
pi@gattscanner:~ $ bluetoothctl -v
bluetoothctl: 5.50

```

Check the installed version of PIP3:

```auto
pi@gattscanner:~ $ pip3 --version
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)

```

So far it looks good and we are ready to install a number of needed libraries

```auto
sudo apt-get install libbluetooth-dev bluez bluez-hcidump libboost-python-dev libboost-thread-dev libglib2.0-dev libboost-all-dev

```

Now is time to download and install gattlib

```auto
pip3 download gattlib
tar xvzf ./gattlib-0.20150805.tar.gz
cd gattlib-0.20150805/

```

Since the gattlib setup is prepared to be installed under Python 3.4, we need to correct this to the version we are using  
`sed -ie 's/boost_python-py34/boost_python-py37/' setup.py`

We can finally install gattlib (don't forget the dot at the end of the command):  
`pi@gattscanner:~/gattlib-0.20150805 $ sudo pip3 install .`

```auto
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/pi/gattlib-0.20150805
Building wheels for collected packages: gattlib
Running setup.py bdist_wheel for gattlib ... done
Stored in directory: /root/.cache/pip/wheels/2b/2d/d2/d62bdc868bb470d7b7e2fa672805652c9e57ff271d2ba6a8ea
Successfully built gattlib
Installing collected packages: gattlib
Successfully installed gattlib-0.20150805

```

Next we change back to /home/pi  
`cd ..`

Install the following Python modules:

```auto
sudo pip3 install setproctitle
sudo pip3 install paho-mqtt
sudo apt install -y mosquitto

```

Copy this Python script to /home/pi (rename/change extension from .txt to .py)  
[gatt\_ibeacon\_scan.txt](https://discourse.nodered.org/uploads/short-url/hwJMMRPYx3viIuQ7ok4TG1kJ3mG.txt) (2.1 KB)

Install/Update Node-RED  
`bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)`

Configure Node-RED service to start automatically at boot

```auto
sudo systemctl enable nodered.service
sudo systemctl start nodered.service

```

Import this flow and deploy  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/08e0716e492119af9236c055871963d657af25c8.png)

```auto
[{"id":"f1e1879c.db20c8","type":"tab","label":"BLE Gatt Scanner","disabled":false,"info":""},{"id":"15ee910e.06391f","type":"mqtt in","z":"f1e1879c.db20c8","name":"","topic":"found","qos":"0","datatype":"auto","broker":"18e7c688.018489","x":150,"y":360,"wires":[["de6816a8.875538","f0f36562.6daab8","b83fe5a5.6c36b8"]]},{"id":"9fb41c04.1bebd","type":"debug","z":"f1e1879c.db20c8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":570,"y":420,"wires":[]},{"id":"de6816a8.875538","type":"switch","z":"f1e1879c.db20c8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"name: MiniBeacon_10754, address: D9:77:B9:4C:B8:5B","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":330,"y":360,"wires":[["3c60c68c.05deba","9fb41c04.1bebd"]]},{"id":"f0f36562.6daab8","type":"debug","z":"f1e1879c.db20c8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":350,"y":420,"wires":[]},{"id":"8df2f747.4534f8","type":"exec","z":"f1e1879c.db20c8","command":"export DISPLAY=:0 && lxterminal -e sudo python3 /home/pi/gatt_ibeacon_scan.py","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":1020,"y":100,"wires":[[],[],[]]},{"id":"d8a34f4b.6d244","type":"trigger","z":"f1e1879c.db20c8","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"10","extend":false,"units":"s","reset":"","bytopic":"all","name":"","x":570,"y":100,"wires":[["8df2f747.4534f8"]]},{"id":"9e332f97.2746d","type":"inject","z":"f1e1879c.db20c8","name":"Init","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":true,"onceDelay":"","x":330,"y":100,"wires":[["d8a34f4b.6d244","bbd896e2.aee998","dce570b.a37ce9"]]},{"id":"47b75403.06780c","type":"comment","z":"f1e1879c.db20c8","name":"Starting BLE scanning service","info":"","x":220,"y":60,"wires":[]},{"id":"8d5ac6aa.304908","type":"mqtt out","z":"f1e1879c.db20c8","name":"","topic":"commands","qos":"0","retain":"","broker":"18e7c688.018489","x":800,"y":160,"wires":[]},{"id":"bbd896e2.aee998","type":"change","z":"f1e1879c.db20c8","name":"abort","rules":[{"t":"set","p":"payload","pt":"msg","to":"abort","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":160,"wires":[["8d5ac6aa.304908"]]},{"id":"334e200c.65883","type":"inject","z":"f1e1879c.db20c8","name":"abort","topic":"","payload":"1","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":"","x":330,"y":220,"wires":[["bbd896e2.aee998","dce570b.a37ce9"]]},{"id":"dce570b.a37ce9","type":"delay","z":"f1e1879c.db20c8","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":220,"wires":[["6763bcb4.604624"]]},{"id":"6763bcb4.604624","type":"exec","z":"f1e1879c.db20c8","command":"sudo pkill -f gatt_ble_scanner","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":860,"y":220,"wires":[[],[],[]]},{"id":"b83fe5a5.6c36b8","type":"trigger","z":"f1e1879c.db20c8","op1":"","op2":"true","op1type":"nul","op2type":"bool","duration":"30","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":350,"y":300,"wires":[["dce570b.a37ce9","bbd896e2.aee998","d8a34f4b.6d244"]]},{"id":"3c60c68c.05deba","type":"trigger","z":"f1e1879c.db20c8","op1":"MiniBeacon_10754 enter GATT 239","op2":"MiniBeacon_10754 leave GATT 239","op1type":"str","op2type":"str","duration":"90","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":570,"y":360,"wires":[["2547b4a5.f9292c"]]},{"id":"2547b4a5.f9292c","type":"debug","z":"f1e1879c.db20c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":800,"y":360,"wires":[]},{"id":"18e7c688.018489","type":"mqtt-broker","z":"","name":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

```

In a few seconds you should see the scanner running in a window on the desktop. Use the debug nodes to view incoming scan results  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/663d0be52b6665855daee8445855f604032ddfdd.jpeg)  
The script will scan your environment looking for iBeacons. The result is published to the MQTT broker. If you want to terminate the script, use the "abort" button in Node-RED.  
Setup filtering, watching the iBeacons you are interested in. The events are there, use them for any cool purposes

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/6f3c4de149a2f74a2fd7f40eb8fb82071ade7d55.png)

---

<div class="post-metadata">

**Author:** ![ttquattroman](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@ttquattroman](https://discourse.nodered.org/u/ttquattroman)\
**Post date:** [30 September 2019 12:12 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/2 "2019-09-30T12:12:47Z")

</div>

> [@krambriw](#):
>
> sudo pip3 install .

What is supposed to happen after you run sed -ie 's/boost\_python-py34/boost\_python-py37/’ setup.py  
My Pi just displays a \> and then does nothing. Is there something I should do before i can run pi@raspberrypi:~/gattlib-0.20150805 $ pip3 download gattlib .

Thanks

Peter

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [30 September 2019 13:22 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/3 "2019-09-30T13:22:23Z")

</div>

I have actually seen this once myself when I installed it in one of my Pi's, I then just pressed ctrl-c and issued the command again, then it worked, I don't know why it behaved like that

Gattlib seems to be developed already 2015 and then targeting Python3 version 3.4. The only thing that command is supposed to do is to update the setup.py file, part of the downloaded gattlib source, to be updated to reflect the version of Python3 that you have installed. With Buster, it is version 3.7.3

Without modifying the setup.py file to reflect your python version, it will not build & install correctly. You can see where it should be modified if you open the /home/pi/gattlib-0.20150805/setup.py in an editor, line 22

Here it is better described as example, when other users had problems installing the same

> <https://stackoverflow.com/questions/41463847/got-error-while-download-gattlib-via-pip3/52271293#52271293>

Nice that you are installing this, in my tests it is still running fine without a glitch since the first day

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [30 September 2019 13:32 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/4 "2019-09-30T13:32:54Z")

</div>

Ooops, I see now the problem

There is a wrong char at the end of that line...

The char ’ should be '

Not a big but important difference

The line should be

`sed -ie 's/boost_python-py34/boost_python-py37/' setup.py`

---

<div class="post-metadata">

**Author:** ![ttquattroman](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@ttquattroman](https://discourse.nodered.org/u/ttquattroman)\
**Post date:** [30 September 2019 15:18 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/5 "2019-09-30T15:18:38Z")

</div>

Thank you, this fixed that problem now I get;

pi@raspberrypi:~/gattlib-0.20150805 $ sudo pip3 install .  
Looking in indexes: [https://pypi.org/simple](https://pypi.org/simple), [https://www.piwheels.org/simple](https://www.piwheels.org/simple)  
Processing /home/pi/gattlib-0.20150805  
Building wheels for collected packages: gattlib  
Running setup.py bdist\_wheel for gattlib ... error  
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize; **file** ='/tmp/pip-req-build-c0fhqv8f/setup.py';f=getattr(tokenize, 'open', open)( **file** );code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, **file** , 'exec'))" bdist\_wheel -d /tmp/pip-wheel-txrynh5u --python-tag cp37:  
running bdist\_wheel  
running build  
running build\_ext  
building 'gattlib' extension  
creating build  
creating build/temp.linux-armv7l-3.7  
creating build/temp.linux-armv7l-3.7/src  
creating build/temp.linux-armv7l-3.7/src/bluez  
creating build/temp.linux-armv7l-3.7/src/bluez/lib  
creating build/temp.linux-armv7l-3.7/src/bluez/attrib  
creating build/temp.linux-armv7l-3.7/src/bluez/src  
creating build/temp.linux-armv7l-3.7/src/bluez/src/shared  
creating build/temp.linux-armv7l-3.7/src/bluez/btio  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/gattservices.cpp -o build/temp.linux-armv7l-3.7/src/gattservices.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/beacon.cpp -o build/temp.linux-armv7l-3.7/src/beacon.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bindings.cpp -o build/temp.linux-armv7l-3.7/src/bindings.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/gattlib.cpp -o build/temp.linux-armv7l-3.7/src/gattlib.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/lib/uuid.c -o build/temp.linux-armv7l-3.7/src/bluez/lib/uuid.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/gatt.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/gatt.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/gattrib.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/gattrib.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/utils.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/utils.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/att.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/att.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/src/shared/crypto.c -o build/temp.linux-armv7l-3.7/src/bluez/src/shared/crypto.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/src/log.c -o build/temp.linux-armv7l-3.7/src/bluez/src/log.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/btio/btio.c -o build/temp.linux-armv7l-3.7/src/bluez/btio/btio.o  
creating build/lib.linux-armv7l-3.7  
arm-linux-gnueabihf-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 build/temp.linux-armv7l-3.7/src/gattservices.o build/temp.linux-armv7l-3.7/src/beacon.o build/temp.linux-armv7l-3.7/src/bindings.o build/temp.linux-armv7l-3.7/src/gattlib.o build/temp.linux-armv7l-3.7/src/bluez/lib/uuid.o build/temp.linux-armv7l-3.7/src/bluez/attrib/gatt.o build/temp.linux-armv7l-3.7/src/bluez/attrib/gattrib.o build/temp.linux-armv7l-3.7/src/bluez/attrib/utils.o build/temp.linux-armv7l-3.7/src/bluez/attrib/att.o build/temp.linux-armv7l-3.7/src/bluez/src/shared/crypto.o build/temp.linux-armv7l-3.7/src/bluez/src/log.o build/temp.linux-armv7l-3.7/src/bluez/btio/btio.o -lglib-2.0 -lboost\_python-py37 -lboost\_thread -lbluetooth -o build/lib.linux-armv7l-3.7/gattlib.cpython-37m-arm-linux-gnueabihf.so  
/usr/bin/ld: cannot find -lboost\_python-py37  
collect2: error: ld returned 1 exit status  
error: command 'arm-linux-gnueabihf-g++' failed with exit status 1

* * *

Failed building wheel for gattlib  
Running setup.py clean for gattlib  
Failed to build gattlib  
Installing collected packages: gattlib  
Running setup.py install for gattlib ... error  
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize; **file** ='/tmp/pip-req-build-c0fhqv8f/setup.py';f=getattr(tokenize, 'open', open)( **file** );code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, **file** , 'exec'))" install --record /tmp/pip-record-7k00br\_b/install-record.txt --single-version-externally-managed --compile:  
running install  
running build  
running build\_ext  
building 'gattlib' extension  
creating build  
creating build/temp.linux-armv7l-3.7  
creating build/temp.linux-armv7l-3.7/src  
creating build/temp.linux-armv7l-3.7/src/bluez  
creating build/temp.linux-armv7l-3.7/src/bluez/lib  
creating build/temp.linux-armv7l-3.7/src/bluez/attrib  
creating build/temp.linux-armv7l-3.7/src/bluez/src  
creating build/temp.linux-armv7l-3.7/src/bluez/src/shared  
creating build/temp.linux-armv7l-3.7/src/bluez/btio  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/gattservices.cpp -o build/temp.linux-armv7l-3.7/src/gattservices.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/beacon.cpp -o build/temp.linux-armv7l-3.7/src/beacon.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bindings.cpp -o build/temp.linux-armv7l-3.7/src/bindings.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/gattlib.cpp -o build/temp.linux-armv7l-3.7/src/gattlib.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/lib/uuid.c -o build/temp.linux-armv7l-3.7/src/bluez/lib/uuid.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/gatt.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/gatt.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/gattrib.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/gattrib.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/utils.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/utils.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/att.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/att.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/src/shared/crypto.c -o build/temp.linux-armv7l-3.7/src/bluez/src/shared/crypto.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/src/log.c -o build/temp.linux-armv7l-3.7/src/bluez/src/log.o  
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/btio/btio.c -o build/temp.linux-armv7l-3.7/src/bluez/btio/btio.o  
creating build/lib.linux-armv7l-3.7  
arm-linux-gnueabihf-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D\_FORTIFY\_SOURCE=2 build/temp.linux-armv7l-3.7/src/gattservices.o build/temp.linux-armv7l-3.7/src/beacon.o build/temp.linux-armv7l-3.7/src/bindings.o build/temp.linux-armv7l-3.7/src/gattlib.o build/temp.linux-armv7l-3.7/src/bluez/lib/uuid.o build/temp.linux-armv7l-3.7/src/bluez/attrib/gatt.o build/temp.linux-armv7l-3.7/src/bluez/attrib/gattrib.o build/temp.linux-armv7l-3.7/src/bluez/attrib/utils.o build/temp.linux-armv7l-3.7/src/bluez/attrib/att.o build/temp.linux-armv7l-3.7/src/bluez/src/shared/crypto.o build/temp.linux-armv7l-3.7/src/bluez/src/log.o build/temp.linux-armv7l-3.7/src/bluez/btio/btio.o -lglib-2.0 -lboost\_python-py37 -lboost\_thread -lbluetooth -o build/lib.linux-armv7l-3.7/gattlib.cpython-37m-arm-linux-gnueabihf.so  
/usr/bin/ld: cannot find -lboost\_python-py37  
collect2: error: ld returned 1 exit status  
error: command 'arm-linux-gnueabihf-g++' failed with exit status 1

```
----------------------------------------

```

Command "/usr/bin/python3 -u -c "import setuptools, tokenize; **file** ='/tmp/pip-req-build-c0fhqv8f/setup.py';f=getattr(tokenize, 'open', open)( **file** );code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, **file** , 'exec'))" install --record /tmp/pip-record-7k00br\_b/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-req-build-c0fhqv8f/

Any ideas ☹

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [30 September 2019 16:06 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/6 "2019-09-30T16:06:28Z")

</div>

> /usr/bin/ld: cannot find -lboost\_python-py37

This is the problem

Did you install everything accordingly before running the gattlib setup? The long line of required libraries?  
What did the version checks report for python3, bluetoothctl?  
Do you have Buster?

---

<div class="post-metadata">

**Author:** ![ttquattroman](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@ttquattroman](https://discourse.nodered.org/u/ttquattroman)\
**Post date:** [30 September 2019 16:11 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/7 "2019-09-30T16:11:31Z")

</div>

Yes I loaded Buster with desktop and recommended software, I have Python 3.7.3 and bluetoothctl 5.50 and yes I loaded sudo apt-get install libbluetooth-dev bluez bluez-hcidump libboost-python-dev libboost-thread-dev libglib2.0-dev libboost-all-dev

Thanks

Peter

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [30 September 2019 17:19 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/8 "2019-09-30T17:19:23Z")

</div>

Strange,,,

Could you try to install this again from your home directory (/home/pi)? Just to be sure it was installed  
`sudo apt-get --reinstall install libboost-all-dev`

There was another person having problems installing gattlib and this was the missing part

> <https://github.com/home-assistant/home-assistant/issues/7851>

  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/dbf2c083dbd475ccaaa39fec41df5087bf524416.png)

---

<div class="post-metadata">

**Author:** ![ttquattroman](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@ttquattroman](https://discourse.nodered.org/u/ttquattroman)\
**Post date:** [30 September 2019 21:54 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/9 "2019-09-30T21:54:22Z")

</div>

> [@krambriw](#):
>
> sudo pip3 install .

Hi I ran pi@raspberrypi:~ $ sudo apt-get --reinstall install libboost-all-dev

- but unfortunately I still have the same problem.

Peter

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [1 October 2019 03:55 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/10 "2019-10-01T03:55:39Z")

</div>

Some dependency is missing, we have to find it

Can you, just to verify, run each, one by one of this and check the result?  
They should be installed but, well

```auto
sudo apt-get install libbluetooth-dev
sudo apt-get install bluez bluez-hcidump
sudo apt-get install libboost-python-dev 
sudo apt-get install libboost-thread-dev
sudo apt-get install libglib2.0-dev
sudo apt-get install libboost-all-dev

```

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [1 October 2019 05:34 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/11 "2019-10-01T05:34:04Z")

</div>

Also, check that you have this:  
`/usr/lib/arm-linux-gnueabihf/libboost_python37.so`

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/556ade5d4b031095e4ca06761c15408a70d7baf7.png)

---

<div class="post-metadata">

**Author:** ![ttquattroman](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@ttquattroman](https://discourse.nodered.org/u/ttquattroman)\
**Post date:** [1 October 2019 10:27 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/12 "2019-10-01T10:27:20Z")

</div>

> [@krambriw](#):
>
> sudo pip3 install .

Hi, I have run the commands you have suggested - thanks and checked that libboost\_python37.so is in the correct folder and it is. I have completed a fresh load (format SD card etc.run apt-get update & upgrade) and still I get the same problem.......this is driving me crazy.

---

<div class="post-metadata">

**Author:** ![ttquattroman](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@ttquattroman](https://discourse.nodered.org/u/ttquattroman)\
**Post date:** [1 October 2019 10:28 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/13 "2019-10-01T10:28:27Z")

</div>

I have also checked that the hardware is a 3B+ the only difference is I am running a POE HAT in the pi.

Peter

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [1 October 2019 11:04 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/14 "2019-10-01T11:04:49Z")

</div>

> [@ttquattroman](#):
>
> .......this is driving me crazy

I fully understand, I installed in the same as you in 2 RPi3B+ and it works so good for me here,  
The key thing is that gattlib refuses to install

What is the result if you run the following command (there should be a pretty long response)  
`ld -lboost_python37 --verbose`

If it is found, you should see lines like below (and a lot of others with "failed")

I'm in Sweden so "lyckades" means success

> attempt to open //usr/lib/arm-linux-gnueabihf/libboost\_python37.so lyckades  
> -lboost\_python37 (//usr/lib/arm-linux-gnueabihf/libboost\_python37.so)

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [1 October 2019 11:25 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/15 "2019-10-01T11:25:51Z")

</div>

This is just a wild attempt, similar problems for this user

I never run the sudo apt install pkg-config

It doesn't hurt to try if this helps because I suspect there is a problem with the compiler options

Maybe try:

`sudo apt install pkg-config libboost-python-dev libboost-thread-dev libbluetooth-dev libglib2.0-dev python-dev`

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/2b678b4cc22d6973b6c0400cca4e7543f663b03e.png)

> **[New HA 0.27 and Bluetooth LE tracker](https://community.home-assistant.io/t/new-ha-0-27-and-bluetooth-le-tracker/3336/31)**
>
> Hmmm I seem to have noticed some side effects, caused by either the Bluetooth LE tracker actually working or by executing sudo setcap cap\_net\_raw+eip /srv/hass/hass\_venv/bin/python3: loading HASS UI became alot slower toggling switches was only...

---

<div class="post-metadata">

**Author:** ![ttquattroman](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@ttquattroman](https://discourse.nodered.org/u/ttquattroman)\
**Post date:** [1 October 2019 11:31 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/16 "2019-10-01T11:31:41Z")

</div>

This is what I get when I run the verbose command;

# pi@raspberrypi:~ $ ld -lboost\_python37 --verbose GNU ld (GNU Binutils for Raspbian) 2.31.1 Supported emulations: armelf\_linux\_eabi armelfb\_linux\_eabi using internal linker script:

/\* Script for -z combreloc: combine and sort reloc sections _/  
/_ Copyright (C) 2014-2018 Free Software Foundation, Inc.  
Copying and distribution of this script, with or without modification,  
are permitted in any medium without royalty provided the copyright  
notice and this notice are preserved. _/  
OUTPUT\_FORMAT("elf32-littlearm", "elf32-bigarm",  
"elf32-littlearm")  
OUTPUT\_ARCH(arm)  
ENTRY(\_start)  
SEARCH\_DIR("=/usr/local/lib/arm-linux-gnueabihf"); SEARCH\_DIR("=/lib/arm-linux-gnueabihf"); SEARCH\_DIR("=/usr/lib/arm-linux-gnueabihf"); SEARCH\_DIR("=/usr/local/lib"); SEARCH\_DIR("=/lib"); SEARCH\_DIR("=/usr/lib"); SEARCH\_DIR("=/usr/arm-linux-gnueabihf/lib");  
SECTIONS  
{  
/_ Read-only sections, merged into text segment: _/  
PROVIDE (\_executable\_start = SEGMENT\_START("text-segment", 0x00010000)); . = SEGMENT\_START("text-segment", 0x00010000) + SIZEOF\_HEADERS;  
.interp : { \*(.interp) }  
.note.gnu.build-id : { \*(.note.gnu.build-id) }  
.hash : { \*(.hash) }  
.gnu.hash : { \*(.gnu.hash) }  
.dynsym : { \*(.dynsym) }  
.dynstr : { (.dynstr) }  
.gnu.version : { (.gnu.version) }  
.gnu.version\_d : { (.gnu.version\_d) }  
.gnu.version\_r : { (.gnu.version\_r) }  
.rel.dyn :  
{  
 (.rel.init)  
 (.rel.text .rel.text. .rel.gnu.linkonce.t.)  
 (.rel.fini)  
 (.rel.rodata .rel.rodata. .rel.gnu.linkonce.r.)  
 (.rel.data.rel.ro .rel.data.rel.ro. .rel.gnu.linkonce.d.rel.ro.)  
 (.rel.data .rel.data. .rel.gnu.linkonce.d.)  
 (.rel.tdata .rel.tdata. .rel.gnu.linkonce.td.)  
 (.rel.tbss .rel.tbss. .rel.gnu.linkonce.tb.)  
 (.rel.ctors)  
 (.rel.dtors)  
 (.rel.got)  
 (.rel.bss .rel.bss. .rel.gnu.linkonce.b.)  
PROVIDE\_HIDDEN (\_\_rel\_iplt\_start = .);  
 (.rel.iplt)  
PROVIDE\_HIDDEN (\_\_rel\_iplt\_end = .);  
}  
.rela.dyn :  
{  
 (.rela.init)  
 (.rela.text .rela.text. .rela.gnu.linkonce.t.)  
 (.rela.fini)  
 (.rela.rodata .rela.rodata. .rela.gnu.linkonce.r.)  
 (.rela.data .rela.data. .rela.gnu.linkonce.d.)  
 (.rela.tdata .rela.tdata. .rela.gnu.linkonce.td.)  
 (.rela.tbss .rela.tbss. .rela.gnu.linkonce.tb.)  
 (.rela.ctors)  
 (.rela.dtors)  
 (.rela.got)  
 (.rela.bss .rela.bss. .rela.gnu.linkonce.b.)  
PROVIDE\_HIDDEN (\_\_rela\_iplt\_start = .);  
 (.rela.iplt)  
PROVIDE\_HIDDEN (\_\_rela\_iplt\_end = .);  
}  
.rel.plt :  
{  
 (.rel.plt)  
}  
.rela.plt :  
{  
 (.rela.plt)  
}  
.init :  
{  
KEEP ((SORT\_NONE(.init)))  
}  
.plt : { (.plt) }  
.iplt : { (.iplt) }  
.text :  
{  
 (.text.unlikely .text.\_unlikely .text.unlikely.)  
 (.text.exit .text.exit.)  
 (.text.startup .text.startup.)  
 (.text.hot .text.hot.)  
 (.text .stub .text. .gnu.linkonce.t.)  
/ .gnu.warning sections are handled specially by elf32.em. /  
 (.gnu.warning)  
 (.glue\_7t) (.glue\_7) (.vfp11\_veneer) (.v4\_bx)  
}  
.fini :  
{  
KEEP ((SORT\_NONE(.fini)))  
}  
PROVIDE (\_\_etext = .);  
PROVIDE (\_etext = .);  
PROVIDE (etext = .);  
.rodata : { (.rodata .rodata. .gnu.linkonce.r.) }  
.rodata1 : { (.rodata1) }  
.ARM.extab : { (.ARM.extab .gnu.linkonce.armextab.) }  
PROVIDE\_HIDDEN (\_\_exidx\_start = .);  
.ARM.exidx : { (.ARM.exidx .gnu.linkonce.armexidx.) }  
PROVIDE\_HIDDEN (\_\_exidx\_end = .);  
.eh\_frame\_hdr : { (.eh\_frame\_hdr) (.eh\_frame\_entry .eh\_frame\_entry.) }  
.eh\_frame : ONLY\_IF\_RO { KEEP ((.eh\_frame)) (.eh\_frame.) }  
.gcc\_except\_table : ONLY\_IF\_RO { (.gcc\_except\_table  
.gcc\_except\_table.) }  
.gnu\_extab : ONLY\_IF\_RO { (.gnu\_extab) }  
/ These sections are generated by the Sun/Oracle C++ compiler. /  
.exception\_ranges : ONLY\_IF\_RO { (.exception\_ranges  
.exception\_ranges) }  
/ Adjust the address for the data segment. We want to adjust up to  
the same address within the page on the next page up. /  
. = DATA\_SEGMENT\_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));  
/ Exception handling /  
.eh\_frame : ONLY\_IF\_RW { KEEP ((.eh\_frame)) (.eh\_frame.) }  
.gnu\_extab : ONLY\_IF\_RW { (.gnu\_extab) }  
.gcc\_except\_table : ONLY\_IF\_RW { (.gcc\_except\_table .gcc\_except\_table.) }  
.exception\_ranges : ONLY\_IF\_RW { (.exception\_ranges .exception\_ranges) }  
/ Thread Local Storage sections /  
.tdata :  
{  
PROVIDE\_HIDDEN (\_\_tdata\_start = .);  
 (.tdata .tdata. .gnu.linkonce.td.)  
}  
.tbss : { (.tbss .tbss. .gnu.linkonce.tb.) (.tcommon) }  
.preinit\_array :  
{  
PROVIDE\_HIDDEN (\_\_preinit\_array\_start = .);  
KEEP ((.preinit\_array))  
PROVIDE\_HIDDEN (\_\_preinit\_array\_end = .);  
}  
.init\_array :  
{  
PROVIDE\_HIDDEN (\_\_init\_array\_start = .);  
KEEP ((SORT\_BY\_INIT\_PRIORITY(.init\_array.) SORT\_BY\_INIT\_PRIORITY(.ctors.)))  
KEEP ((.init\_array EXCLUDE\_FILE (crtbegin.o crtbegin?.o crtend.o crtend?.o ) .ctors))  
PROVIDE\_HIDDEN (\_\_init\_array\_end = .);  
}  
.fini\_array :  
{  
PROVIDE\_HIDDEN (\_\_fini\_array\_start = .);  
KEEP ((SORT\_BY\_INIT\_PRIORITY(.fini\_array.) SORT\_BY\_INIT\_PRIORITY(.dtors.)))  
KEEP ((.fini\_array EXCLUDE\_FILE (\*crtbegin.o crtbegin?.o crtend.o crtend?.o ) .dtors))  
PROVIDE\_HIDDEN (\_\_fini\_array\_end = .);  
}  
.ctors :  
{  
/ gcc uses crtbegin.o to find the start of  
the constructors, so we make sure it is  
first. Because this is a wildcard, it  
doesn't matter if the user does not  
actually link against crtbegin.o; the  
linker won't look for a file to match a  
wildcard. The wildcard also means that it  
doesn't matter which directory crtbegin.o  
is in. /  
KEEP (crtbegin.o(.ctors))  
KEEP (crtbegin?.o(.ctors))  
/ We don't want to include the .ctor section from  
the crtend.o file until after the sorted ctors.  
The .ctor section from the crtend file contains the  
end of ctors marker and it must be last /  
KEEP ((EXCLUDE\_FILE (crtend.o crtend?.o ) .ctors))  
KEEP ((SORT(.ctors.)))  
KEEP ((.ctors))  
}  
.dtors :  
{  
KEEP (crtbegin.o(.dtors))  
KEEP (crtbegin?.o(.dtors))  
KEEP ((EXCLUDE\_FILE (crtend.o crtend?.o ) .dtors))  
KEEP ((SORT(.dtors.)))  
KEEP ((.dtors))  
}  
.jcr : { KEEP ((.jcr)) }  
.data.rel.ro : { (.data.rel.ro.local .gnu.linkonce.d.rel.ro.local.) (.data.rel.ro .data.rel.ro. .gnu.linkonce.d.rel.ro.) }  
.dynamic : { \*(.dynamic) }  
. = DATA\_SEGMENT\_RELRO\_END (0, .);  
.got : { \*(.got.plt) \*(.igot.plt) \*(.got) (.igot) }  
.data :  
{  
PROVIDE (\_\_data\_start = .);  
 (.data .data. .gnu.linkonce.d.)  
SORT(CONSTRUCTORS)  
}  
.data1 : { (.data1) }  
\_edata = .; PROVIDE (edata = .);  
. = .;  
\_\_bss\_start = .;  
 **bss\_start** = .;  
.bss :  
{  
 (.dynbss)  
 (.bss .bss. .gnu.linkonce.b.)  
 (COMMON)  
/ Align here to ensure that the .bss section occupies space up to  
 end. Align after .bss to ensure correct alignment even if the  
.bss section disappears because there are no input sections.  
FIXME: Why do we need it? When there is no .bss section, we don't  
pad the .data section. \*/  
. = ALIGN(. != 0 ? 32 / 8 : 1);  
}  
 bss\_end = .; **bss\_end** = .;  
. = ALIGN(32 / 8);  
. = SEGMENT\_START("ldata-segment", .);  
. = ALIGN(32 / 8);  
 **end** = .;  
\_end = .; PROVIDE (end = .);  
. = DATA\_SEGMENT\_END (.);  
/ Stabs debugging sections. \*/  
.stab 0 : { \*(.stab) }  
.stabstr 0 : { \*(.stabstr) }  
.stab.excl 0 : { \*(.stab.excl) }  
.stab.exclstr 0 : { \*(.stab.exclstr) }  
.stab.index 0 : { \*(.stab.index) }  
.stab.indexstr 0 : { \*(.stab.indexstr) }  
.comment 0 : { (.comment) }  
/ DWARF debug sections.  
Symbols in the DWARF debugging sections are relative to the beginning  
of the section so we begin them at 0. /  
/ DWARF 1 \*/  
.debug 0 : { \*(.debug) }  
.line 0 : { (.line) }  
/ GNU DWARF 1 extensions \*/  
.debug\_srcinfo 0 : { \*(.debug\_srcinfo) }  
.debug\_sfnames 0 : { (.debug\_sfnames) }  
/ DWARF 1.1 and DWARF 2 \*/  
.debug\_aranges 0 : { \*(.debug\_aranges) }  
.debug\_pubnames 0 : { (.debug\_pubnames) }  
/ DWARF 2 \*/  
.debug\_info 0 : { (.debug\_info .gnu.linkonce.wi.) }  
.debug\_abbrev 0 : { \*(.debug\_abbrev) }  
.debug\_line 0 : { (.debug\_line .debug\_line. .debug\_line\_end ) }  
.debug\_frame 0 : { \*(.debug\_frame) }  
.debug\_str 0 : { \*(.debug\_str) }  
.debug\_loc 0 : { \*(.debug\_loc) }  
.debug\_macinfo 0 : { (.debug\_macinfo) }  
/ SGI/MIPS DWARF 2 extensions \*/  
.debug\_weaknames 0 : { \*(.debug\_weaknames) }  
.debug\_funcnames 0 : { \*(.debug\_funcnames) }  
.debug\_typenames 0 : { \*(.debug\_typenames) }  
.debug\_varnames 0 : { (.debug\_varnames) }  
/ DWARF 3 \*/  
.debug\_pubtypes 0 : { \*(.debug\_pubtypes) }  
.debug\_ranges 0 : { (.debug\_ranges) }  
/ DWARF Extension. \*/  
.debug\_macro 0 : { (.debug\_macro) }  
.debug\_addr 0 : { (.debug\_addr) }  
.gnu.attributes 0 : { KEEP ((.gnu.attributes)) }  
.note.gnu.arm.ident 0 : { KEEP ((.note.gnu.arm.ident)) }  
/DISCARD/ : { \*(.note.GNU-stack) \*(.gnu\_debuglink) \*(.gnu.lto_) }  
}

==================================================  
attempt to open //usr/local/lib/arm-linux-gnueabihf/libboost\_python37.so failed  
attempt to open //usr/local/lib/arm-linux-gnueabihf/libboost\_python37.a failed  
attempt to open //lib/arm-linux-gnueabihf/libboost\_python37.so failed  
attempt to open //lib/arm-linux-gnueabihf/libboost\_python37.a failed  
attempt to open //usr/lib/arm-linux-gnueabihf/libboost\_python37.so succeeded  
-lboost\_python37 (//usr/lib/arm-linux-gnueabihf/libboost\_python37.so)  
librt.so.1 needed by //usr/lib/arm-linux-gnueabihf/libboost\_python37.so  
attempt to open //opt/vc/lib/librt.so.1 failed  
attempt to open //usr/local/lib/arm-linux-gnueabihf/librt.so.1 failed  
found librt.so.1 at //lib/arm-linux-gnueabihf/librt.so.1  
libdl.so.2 needed by //usr/lib/arm-linux-gnueabihf/libboost\_python37.so  
attempt to open //opt/vc/lib/libdl.so.2 failed  
attempt to open //usr/local/lib/arm-linux-gnueabihf/libdl.so.2 failed  
found libdl.so.2 at //lib/arm-linux-gnueabihf/libdl.so.2  
libpthread.so.0 needed by //usr/lib/arm-linux-gnueabihf/libboost\_python37.so  
attempt to open //opt/vc/lib/libpthread.so.0 failed  
attempt to open //usr/local/lib/arm-linux-gnueabihf/libpthread.so.0 failed  
found libpthread.so.0 at //lib/arm-linux-gnueabihf/libpthread.so.0  
libutil.so.1 needed by //usr/lib/arm-linux-gnueabihf/libboost\_python37.so  
attempt to open //opt/vc/lib/libutil.so.1 failed  
attempt to open //usr/local/lib/arm-linux-gnueabihf/libutil.so.1 failed  
found libutil.so.1 at //lib/arm-linux-gnueabihf/libutil.so.1  
libstdc++.so.6 needed by //usr/lib/arm-linux-gnueabihf/libboost\_python37.so  
attempt to open //opt/vc/lib/libstdc++.so.6 failed  
attempt to open //usr/local/lib/arm-linux-gnueabihf/libstdc++.so.6 failed  
attempt to open //lib/arm-linux-gnueabihf/libstdc++.so.6 failed  
found libstdc++.so.6 at //usr/lib/arm-linux-gnueabihf/libstdc++.so.6  
libm.so.6 needed by //usr/lib/arm-linux-gnueabihf/libboost\_python37.so  
attempt to open //opt/vc/lib/libm.so.6 failed  
attempt to open //usr/local/lib/arm-linux-gnueabihf/libm.so.6 failed  
found libm.so.6 at //lib/arm-linux-gnueabihf/libm.so.6  
libgcc\_s.so.1 needed by //usr/lib/arm-linux-gnueabihf/libboost\_python37.so  
attempt to open //opt/vc/lib/libgcc\_s.so.1 failed  
attempt to open //usr/local/lib/arm-linux-gnueabihf/libgcc\_s.so.1 failed  
found libgcc\_s.so.1 at //lib/arm-linux-gnueabihf/libgcc\_s.so.1  
libc.so.6 needed by //usr/lib/arm-linux-gnueabihf/libboost\_python37.so  
attempt to open //opt/vc/lib/libc.so.6 failed  
attempt to open //usr/local/lib/arm-linux-gnueabihf/libc.so.6 failed  
attempt to open //usr/lib/arm-linux-gnueabihf/libc.so.6 failed  
attempt to open //usr/lib/arm-linux-gnueabihf/libfakeroot/libc.so.6 failed  
attempt to open //usr/local/lib/libc.so.6 failed  
attempt to open //usr/local/lib/arm-linux-gnueabihf/libc.so.6 failed  
attempt to open //usr/lib/arm-linux-gnueabihf/libc.so.6 failed  
attempt to open //usr/local/lib/libc.so.6 failed  
attempt to open //lib/libc.so.6 failed  
attempt to open //usr/lib/libc.so.6 failed  
attempt to open //usr/arm-linux-gnueabihf/lib/libc.so.6 failed  
attempt to open //opt/vc/lib/libc.so.6 failed  
attempt to open //usr/local/lib/arm-linux-gnueabihf/libc.so.6 failed  
found libc.so.6 at //lib/arm-linux-gnueabihf/libc.so.6  
ld-linux-armhf.so.3 needed by //usr/lib/arm-linux-gnueabihf/libboost\_python37.so  
attempt to open //opt/vc/lib/ld-linux-armhf.so.3 failed  
attempt to open //usr/local/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3 failed  
found ld-linux-armhf.so.3 at //lib/arm-linux-gnueabihf/ld-linux-armhf.so.3  
ld: warning: cannot find entry symbol \_start; defaulting to 00010160  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyExc_ValueError' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyLong\_AsLong'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyNumber_InPlaceFloorDivide' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyBool\_Type'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyObject_GetAttr' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyDict\_GetItemString'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyObject_Call' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyNumber\_And'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyExc_IndexError' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyEval\_GetGlobals'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyTuple_Type' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyNumber\_InPlaceSubtract'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyList_Type' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyObject\_GetAttrString'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyModule_Type' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyMem\_Free'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyType_IsSubtype' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyStaticMethod\_Type'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyErr_WarnEx' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyUnicode\_InternFromString'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyTuple_New' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyObject\_SetAttr'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyObject_IsInstance' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyErr\_NoMemory'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `_Py_NoneStruct' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyExc\_AttributeError'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyNumber_Add' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyUnicode\_FromFormat'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyList_Append' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyType\_Type'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyExc_ReferenceError' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyArg\_ParseTupleAndKeywords'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyStaticMethod_New' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyNumber\_InPlaceMultiply'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyTuple_Size' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyErr\_SetObject'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `_PyObject_New' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyDict\_Keys'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyType_GenericAlloc' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyErr\_Format'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyObject_CallFunction' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyList\_Reverse'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyCFunction_Type' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyExc\_OverflowError'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyMem_Malloc' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyErr\_ExceptionMatches'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyComplex_ImagAsDouble' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyCFunction\_NewEx'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyList_New' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyImport\_ImportModule'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyProperty_Type' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyUnicode\_FromString'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyNumber_InPlaceOr' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyBytes\_Size'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyUnicode_Type' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyObject\_DelItem'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyNumber_FloorDivide' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyErr\_Clear'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyRun_StringFlags' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyDict\_GetItem'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyWeakref_NewRef' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyNumber\_Multiply'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyNumber_Lshift' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyDict\_New'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyErr_SetString' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyDict\_Update'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PySlice_New' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyRun\_FileExFlags'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyObject_SetItem' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyUnicode\_AsUTF8'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyObject_SetAttrString' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyUnicode\_FromEncodedObject'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyLong_AsUnsignedLongLong' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyExc\_RuntimeError'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyNumber_Xor' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyBytes\_AsString'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `_Py_NotImplementedStruct' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyNumber\_Rshift'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyBaseObject_Type' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyExc\_StopIteration'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyObject_GetItem' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyExc\_TypeError'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyDict_Values' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`\_Py\_fopen'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyType_Ready' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyObject\_Size'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyMethod_Type' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyMethod\_New'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyObject_ClearWeakRefs' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyLong\_AsSsize\_t'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyLong_AsLongLong' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyEval\_CallFunction'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyNumber_Remainder' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyLong\_FromLong'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyErr_NewException' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyObject\_CallMethod'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyNumber_Or' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyObject\_IsTrue'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyList_Sort' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyModule\_Create2'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyUnicode_AsWideChar' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyLong\_AsUnsignedLong'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyNumber_InPlaceRemainder' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyDict\_Type'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyErr_Occurred' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyDict\_Copy'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyLong_Type' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyNumber\_InPlaceAnd'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyNumber_InPlaceXor' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`\_PyType\_Lookup'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyDict_Size' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyNumber\_InPlaceRshift'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyFloat_Type' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyIter\_Next'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyCallable_Check' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyComplex\_RealAsDouble'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyLong_FromUnsignedLong' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyList\_Insert'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyObject_RichCompare' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyDict\_Items'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyTuple_GetItem' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyNumber\_Subtract'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyComplex_Type' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyUnicode\_AsUTF8String'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyUnicode_FromStringAndSize' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyDict\_Clear'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyNumber_InPlaceLshift' ld: //usr/lib/arm-linux-gnueabihf/libboost_python37.so: undefined reference to`PyBool\_FromLong'  
ld: //usr/lib/arm-linux-gnueabihf/libboost\_python37.so: undefined reference to `PyNumber\_InPlaceAdd'

---

<div class="post-metadata">

**Author:** ![ttquattroman](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@ttquattroman](https://discourse.nodered.org/u/ttquattroman)\
**Post date:** [1 October 2019 11:33 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/17 "2019-10-01T11:33:32Z")

</div>

and this is what I get when I tried you last suggestion;

pi@raspberrypi:~ sudo apt install pkg-config libboost-python-dev libboost-thread-dev libbluetooth-dev libglib2.0-dev python-dev Reading package lists... Done Building dependency tree Reading state information... Done libboost-python-dev is already the newest version (1.67.0.1+b1). libboost-thread-dev is already the newest version (1.67.0.1+b1). libglib2.0-dev is already the newest version (2.58.3-2+deb10u1). pkg-config is already the newest version (0.29-6). python-dev is already the newest version (2.7.16-1). python-dev set to manually installed. libbluetooth-dev is already the newest version (5.50-1+rpt1). The following package was automatically installed and is no longer required: rpi.gpio-common Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded. pi@raspberrypi:~

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [1 October 2019 11:34 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/18 "2019-10-01T11:34:32Z")

</div>

> [@ttquattroman](#):
>
> attempt to open //usr/lib/arm-linux-gnueabihf/libboost\_python37.so succeeded  
> -lboost\_python37 (//usr/lib/arm-linux-gnueabihf/libboost\_python37.so)

Well, the same as I get, it is found, this is a mystery. Right now I am lost...

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [1 October 2019 12:26 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/19 "2019-10-01T12:26:07Z")

</div>

There was a "hint" here:

> **[ld cannot find -lboost\_python-py34](https://bitbucket.org/OscarAcena/pygattlib/issues/41/ld-cannot-find-lboost_python-py34)**
>
> When attempting to install \`PyGATTLib\` via \`pip\` (python 3.5.1) on arch linux, the linker fails to find the python3 bindings for \`boost\`, despite boost being installed on the system.
> 
> The bug can be solved easily by replacing \`boost\_python\_py34\` with...

Could you try to edit the setup.py file in /home/pi/gattlib-0.20150805

Change in line 22

```
if sys.version_info.major == 3:
    boost_libs = ["boost_python3"]

```

I did this change and it worked fine when I reinstalled

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [1 October 2019 15:31 UTC](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053/20 "2019-10-01T15:31:00Z")

</div>

If this should not work either, try to install to Python2. It worked here without problem, see below. The other things are easy to fix for Python2, just use pip instead of pip3. The script works also unchanged, just modify the call in the exec node in the flow

```auto
pi@gattscanner:~ $ cd gattlib-0.20150805/
pi@gattscanner:~/gattlib-0.20150805 $ sudo pip install .
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/pi/gattlib-0.20150805
Building wheels for collected packages: gattlib
  Running setup.py bdist_wheel for gattlib ... done
  Stored in directory: /root/.cache/pip/wheels/2b/2d/d2/d62bdc868bb470d7b7e2fa672805652c9e57ff271d2ba6a8ea
Successfully built gattlib
Installing collected packages: gattlib
Successfully installed gattlib-0.20150805
pi@gattscanner:~/gattlib-0.20150805 $ cd ..
pi@gattscanner:~ $ python
Python 2.7.16 (default, Apr 6 2019, 01:42:57)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gattlib
>>>

```

[Next page](https://discourse.nodered.org/t/setting-up-an-ibeacon-scanner-using-the-gatt-protocol-for-bluetooth-le/16053.md?page=2)
