Closed iaindinw closed 2 years ago
Are you using 2021-10-30-raspios-bullseye-armhf-full ? I'll look into this in 2 weeks (no access to a Pi currently), hopefully this is just a pigpio dependency issue
Yes it was a fresh install of that OS. Thanks again for your code.
Ran into this same issue - turns out it's a slight issue with how the Makefile orders the gcc command, specifically with the libraries. Fixed in PR #11
Thanks or a great lib and let me know if you have questions!
Resolved by #11
Hello, I have used your very useful tool previously on various Buster builds and never had any issues. However on a fresh Bullseye release on rp4 I'm not able to install, see attached error.
pi@raspberrypi:~/adxl345spi $ sudo make if ! dpkg-query -W -f='${Status}' pigpio | grep "ok installed"; then apt-get -y install pigpio; fi install ok installed gcc -Wall -pthread -lpigpio -lrt adxl345spi.c -o adxl345spi adxl345spi.c: In function ‘printUsage’: adxl345spi.c:28:34: warning: ‘%s’ directive argument is not a nul-terminated string [-Wformat-overflow=] 28 | printf( "adxl345spi (version %s) \n" | ^~ ...... 54 | "", codeVersion, timeDefault, freqMax, freqDefault); | ~~~~~~~~~~~ adxl345spi.c:16:12: note: referenced argument declared here 16 | const char codeVersion[3] = "0.3"; // code version number | ^~~~~~~~~~~ /usr/bin/ld: /tmp/ccwOsOAb.o: in function
readBytes': adxl345spi.c:(.text+0xa8): undefined reference tospiXfer' /usr/bin/ld: /tmp/ccwOsOAb.o: in function
writeBytes': adxl345spi.c:(.text+0x108): undefined reference tospiWrite' /usr/bin/ld: /tmp/ccwOsOAb.o: in function
main': adxl345spi.c:(.text+0x42c): undefined reference togpioInitialise' /usr/bin/ld: adxl345spi.c:(.text+0x45c): undefined reference to
spiOpen' /usr/bin/ld: adxl345spi.c:(.text+0x570): undefined reference totime_sleep' /usr/bin/ld: adxl345spi.c:(.text+0x590): undefined reference to
time_time' /usr/bin/ld: adxl345spi.c:(.text+0x624): undefined reference totime_time' /usr/bin/ld: adxl345spi.c:(.text+0x69c): undefined reference to
time_sleep' /usr/bin/ld: adxl345spi.c:(.text+0x6bc): undefined reference togpioTerminate' /usr/bin/ld: adxl345spi.c:(.text+0x6c0): undefined reference to
time_time' /usr/bin/ld: adxl345spi.c:(.text+0x7f8): undefined reference totime_time' /usr/bin/ld: adxl345spi.c:(.text+0x8b0): undefined reference to
time_time' /usr/bin/ld: adxl345spi.c:(.text+0x994): undefined reference togpioTerminate' /usr/bin/ld: adxl345spi.c:(.text+0xa28): undefined reference to
gpioTerminate' collect2: error: ld returned 1 exit status make: *** [Makefile:17: adxl345spi] Error 1 `Appreciate supporting of non standard installations is outwith skills but any support to get it working again on the default pi configuration would be great. Happy to assist in testing if this is feasible.