Page 1 of 1

cannot find -lrp-hw

Posted: Wed Sep 14, 2022 7:10 am
by richemat
Hello,

I'm trying to compile an example C program on an SDR board with version 1.04-11 stable installed today. I'm following the instructions on https://redpitaya.readthedocs.io/en/lat ... /comC.html. When I execute the make

make digital_led_blink

it errors with
/usr/bin/ld: cannot find -lrp-hw

Any ideas how I should proceed?

Thank you,
Rich

Re: cannot find -lrp-hw

Posted: Fri Sep 16, 2022 11:11 am
by redpitaya
Please try to reinstall the OS. First try with the latest stable version and if the problem persists use the latest beta version.

Should you have any, remember to save your projects off of the board.

Re: cannot find -lrp-hw

Posted: Sat Sep 17, 2022 10:11 pm
by richemat
The current stable version, SDRlab_122-16_OS_1.04-11_stable.img.zip, exhibits the problem "cannot find -lrp-hw" during "make digital_led_blink".

I updated to the current beta, SDRlab_122-16_OS_1.04-15_beta.img.zip, and the compile step for the example file digital_led_blink works.

Thank you for your reply,
Rich

Re: cannot find -lrp-hw

Posted: Wed Aug 02, 2023 11:18 pm
by rhh
I am having the same problem when building digital_led_blink on a 122-16 board. I first used the stable version and then the latest beta - digital_led_blink is still not compiling. Is a library missing? Please advise.

# Red Pitaya GNU/Linux Ecosystem
# Version: 1.04
# Build: 15
# Branch:
# Commit: 27498667c96692b6f15a7878462480c66c6c0abf
# U-Boot: "redpitaya-v2016.4"
# Linux Kernel: "branch-redpitaya-v2017.2"
# Pro Applications: ""

root@rp-f089b1:~/RedPitaya/Examples/C# make digital_led_blink
cc digital_led_blink.c -std=gnu11 -Wall -I/opt/redpitaya/include -DZ10 -L/opt/redpitaya/lib -static -lrp -lrp-hw-calib -lrp-hw-profiles -lrp-gpio -lrp-i2c -lrp-hw -lm -lstdc++ -lpthread -li2c -o digital_led_blink
/usr/bin/ld: cannot find -lrp-hw-calib
/usr/bin/ld: cannot find -lrp-hw-profiles
/usr/bin/ld: cannot find -lrp-gpio
/usr/bin/ld: cannot find -lrp-i2c
/usr/bin/ld: cannot find -li2c
collect2: error: ld returned 1 exit status
Makefile:48: recipe for target 'digital_led_blink' failed
make: *** [digital_led_blink] Error 1

root@rp-f089b1:~/RedPitaya/Examples/C# ls /opt/redpitaya/include/
api2 apiApp linux redpitaya rp.h rp_hw.h version.h

root@rp-f089b1:~/RedPitaya/Examples/C# ls /opt/redpitaya/lib
librp2.a librp2.so librp.a librpapp_lcr.a librpapp_lcr.so librpapp.so librp-hw.a librp-hw.so librp.so