getsenic / nuimo-linux-python

Nuimo Python SDK for Linux to connect and communicate with Nuimo controllers made by Senic
https://senic.com
MIT License
52 stars 20 forks source link

Error installing pygattlib on Raspberry 1 #6

Closed jo-me closed 8 years ago

jo-me commented 8 years ago

Installing pygattlib using the install.sh script fails on a raspberry pi 1. The bluetooth setup was successful and tests with the gatttool as well. The original nuimo-raspberrypi-demo project also worked on the same pi.

pi@raspberrypi:~/nuimo-linux-python $ sh examples/install.sh pygattlib
Installing Pygattlib and dependencies
+ sudo apt-get install pkg-config libboost-python-dev libboost-thread-dev libbluetooth-dev libglib2.0-dev python-dev
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
libboost-python-dev ist schon die neueste Version.
libboost-thread-dev ist schon die neueste Version.
libglib2.0-dev ist schon die neueste Version.
pkg-config ist schon die neueste Version.
python-dev ist schon die neueste Version.
libbluetooth-dev ist schon die neueste Version.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
+ [ ! -d pygattlib ]
+ cd pygattlib
+ sudo python setup.py install
running install
running bdist_egg
running egg_info
creating gattlib.egg-info
writing gattlib.egg-info/PKG-INFO
writing top-level names to gattlib.egg-info/top_level.txt
writing dependency_links to gattlib.egg-info/dependency_links.txt
writing manifest file 'gattlib.egg-info/SOURCES.txt'
reading manifest file 'gattlib.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'gattlib.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv6l/egg
running install_lib
running build_ext
building 'gattlib' extension
creating build
creating build/temp.linux-armv6l-2.7
creating build/temp.linux-armv6l-2.7/src
creating build/temp.linux-armv6l-2.7/src/bluez
creating build/temp.linux-armv6l-2.7/src/bluez/lib
creating build/temp.linux-armv6l-2.7/src/bluez/attrib
creating build/temp.linux-armv6l-2.7/src/bluez/src
creating build/temp.linux-armv6l-2.7/src/bluez/src/shared
creating build/temp.linux-armv6l-2.7/src/bluez/btio
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -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/python2.7 -c src/gattservices.cpp -o build/temp.linux-armv6l-2.7/src/gattservices.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -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/python2.7 -c src/beacon.cpp -o build/temp.linux-armv6l-2.7/src/beacon.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -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/python2.7 -c src/bindings.cpp -o build/temp.linux-armv6l-2.7/src/bindings.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc: internal compiler error: Getötet (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 4
pi@raspberrypi:~/nuimo-linux-python $
larsblumberg commented 8 years ago

This could be the RAM limitations on a Pi 1, had this error, too on a Raspi 1. I remember there's a workaround posted as an issue in the lib's bitbucket repo.

jo-me commented 8 years ago

I found the corresponding issue and increased the pi's swap space to 500M as described here. The pygattlib installation completed afterwards.

Thank you for the tip!