adafruit / Adafruit_DotStar_Pi

DotStar module for Python on Raspberry Pi
GNU General Public License v3.0
60 stars 30 forks source link

undefined symbol: bcm_host_get_peripheral_address #20

Closed tgray closed 5 years ago

tgray commented 6 years ago

Getting the following error when I run strandtest.py:

Traceback (most recent call last): File "./strandtest.py", line 11, in <module> from dotstar import Adafruit_DotStar ImportError: /usr/local/lib/python2.7/dist-packages/dotstar.so: undefined symbol: bcm_host_get_peripheral_address

This is on a Raspberry Pi 3 with a fresh install of Raspbian Stretch Lite. My Dotstar strip lights up, so I think I have it wired correctly. I turned on SPI in raspi-config and have the strip hooked into MOSI and SCLK for data and clock. I also tried pins 20 and 21, modding strandtest.py appropriately, but I can't get past the import step.

bcm_host.h is in /opt/vc/include. I installed this module with sudo python setup.py install.

Packages I've installed:

Any ideas?

Lukas-Sturm commented 6 years ago

For me it works when I place my Pyhton files in the same directory where you ran the setup.py But thats probably not the right solution.

tgray commented 6 years ago

As far as I can tell, bcm_host_get_peripheral_address is used in this library to set an address that differs between early raspberry pi boards and later ones. I think I tried hardcoding that address (like it used to be in this library) and that worked, but I can't remember. What I ended up doing was reverting dotstar.c to commit a470133e. Not ideal but until Adafruit ever gets around to fixing this...

thomasthiriez commented 6 years ago

This was caused by setup.py not linking with bcm_host. I have fixed this with #22.

retroj commented 6 years ago

@thomasthiriez I tried your patch and it didn't resolve the problem for me.

jwilson64 commented 6 years ago

@retroj I just tried @thomasthiriez 's fix. What I ended up doing is just copying/pasting his fix into the setup.py file. Then I ran sudo pip install --upgrade Adafruit_DotStar_Pi/

This updated and fixed the issue.

JohnOmernik commented 6 years ago

I am running Rasp Pi 3 B+ and I am geting thei bcm_host as well.

PaintYourDragon commented 5 years ago

As we're deprecating this library in favor of CircuitPython (which correctly installs on newer systems), the issue is implicitly resolved there. Please check out the Adafruit CircuitPython DotStar library: https://github.com/adafruit/Adafruit_CircuitPython_DotStar