Lora-net / lora_gateway

Driver/HAL to build a gateway using a concentrator board based on Semtech SX1301 multi-channel modem and SX1257/SX1255 RF transceivers.
Other
915 stars 742 forks source link

Cross compilation error in Lora_gateway #166

Closed George-Ng2020 closed 1 year ago

George-Ng2020 commented 3 years ago

Hi

Anybody know how to fix this issue? I clean all using "make clean all" and rebuild the following error appeared

george@george-VirtualBox:~/lora_gateway$ make ARM=arm CROSS_COMPILE=arm-linux-gnueabihf- make all -e -C libloragw make[1]: Entering directory '/home/george/lora_gateway/libloragw' arm-linux-gnueabihf-gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_radio.c -o obj/loragw_radio.o arm-linux-gnueabihf-ar rcs libloragw.a obj/loragw_hal.o obj/loragw_gps.o obj/loragw_reg.o obj/loragw_spi.o obj/loragw_aux.o obj/loragw_radio.o obj/loragw_fpga.o obj/loragw_lbt.o arm-linux-gnueabihf-gcc -O2 -Wall -Wextra -std=c99 -Iinc -I. -L. tst/test_loragw_spi.c -o test_loragw_spi -lloragw -lrt -lm /tmp/ccxjmjY7.o: In function main': test_loragw_spi.c:(.text.startup+0x7c): undefined reference tolgw_spi_open' test_loragw_spi.c:(.text.startup+0xa4): undefined reference to lgw_spi_w' test_loragw_spi.c:(.text.startup+0xc8): undefined reference tolgw_spi_r' test_loragw_spi.c:(.text.startup+0xec): undefined reference to lgw_spi_wb' test_loragw_spi.c:(.text.startup+0x10c): undefined reference tolgw_spi_rb' test_loragw_spi.c:(.text.startup+0x130): undefined reference to lgw_spi_wb' test_loragw_spi.c:(.text.startup+0x154): undefined reference tolgw_spi_rb' test_loragw_spi.c:(.text.startup+0x174): undefined reference to lgw_spi_r' test_loragw_spi.c:(.text.startup+0x19c): undefined reference tolgw_spi_close' collect2: error: ld returned 1 exit status Makefile:77: recipe for target 'test_loragw_spi' failed make[1]: [test_loragw_spi] Error 1 make[1]: Leaving directory '/home/george/lora_gateway/libloragw' Makefile:10: recipe for target 'all' failed make: [all] Error 2 george@george-VirtualBox:~/lora_gateway$

sp193 commented 3 years ago

Perhaps loragw_spi.o did not get compiled correctly for you, since some symbols are missing from it. If you have not done it, perhaps check that it is getting compiled successfully; when you do make clean ensure that loragw_spi.o is deleted and recompiled when you do make.

smtc-bot commented 1 year ago

Thank you for your inquiry.

Customers are encouraged to submit technical questions via our dedicated support portal at https://semtech.force.com/ldp/ldp_support.

We invite all users to visit the LoRa Developer Portal Forum at https://forum.lora-developers.semtech.com and to join the thriving LoRa development community!