h0ru5 / neopixel-java

JNI bindings to access adafruit neopixels on a raspi
MIT License
3 stars 2 forks source link

Still working? #2

Open edikay opened 6 years ago

edikay commented 6 years ago

Your library is still working? Because when Im trying ./get_code then I get errors: root@multibooth:/rpi_ws281x# make all mkdir -p java/com/github/h0ru5/neopixel swig -java -package com.github.h0ru5.neopixel -outdir java/com/github/h0ru5/neopixel python/rpi_ws281x.i cc -fPIC -I"/opt/jdk1.8.0_121/include/" -I"/opt/jdk1.8.0_121/include/"/linux -c python/rpi_ws281x_wrap.c -o rpi_ws281x_wrap.o cc -shared -o librpi_ws281x.so ws2811.o dma.o pwm.o rpi_ws281x_wrap.o cc main.c librpi_ws281x.so -L. -lrpi_ws281x -Wl,-rpath='RIGIN' -o demo librpi_ws281x.so: undefined reference to mem_unlock' librpi_ws281x.so: undefined reference tounmapmem' librpi_ws281x.so: undefined reference to mem_free' librpi_ws281x.so: undefined reference tomem_lock' librpi_ws281x.so: undefined reference to mapmem' librpi_ws281x.so: undefined reference torpi_hw_detect' librpi_ws281x.so: undefined reference to pcm_pin_alt' librpi_ws281x.so: undefined reference tombox_close' librpi_ws281x.so: undefined reference to mbox_open' librpi_ws281x.so: undefined reference tomem_alloc' collect2: error: ld returned 1 exit status

Can you help me? I know last update 2 years ago.

h0ru5 commented 6 years ago

It seems you are missing the library file for librpi_ws281x.so this repo just contains the binding code for java.

h0ru5 commented 6 years ago

get_code.sh is/was just a terrible hackish way to get the code from here: https://github.com/jgarff/rpi_ws281x and compile it. did you run in from the subdir? It might behave terrible in terms of working directory.

h0ru5 commented 6 years ago

sorry, wrong lead above, the ereror is related to something that changed in the rpilib - my lousy script does not pin it to a commit or tag as it should. best head over to the lib repo and get it to compile, then you can update get_code.sh accordingly (or better make it better - its painful reading the own code from years ago :rofl: )