Nuand / bladeRF-adsb

bladeRF ADS-B hardware decoder
https://nuand.com/bladeRF-adsb
MIT License
115 stars 31 forks source link

missing -lbradeRF?? #8

Open vjarao opened 7 years ago

vjarao commented 7 years ago

Greeting. I am trying to follow this ADSB implementation but when trying to "make" I get the following error message (Mac OS X El Capitan, gcc (MacPorts gcc5 5.4.0_0)):

gcc -o bladeRF_adsb bladeRF_adsb.c -lbladeRF ld: library not found for -lbladeRF collect2: error: ld returned 1 exit status make: *\ [bladeRF_adsb] Error 1

The error message says it cannot finds lbladeRF. Where this file should be? Any hints? I am not a computer guy, just an "User". lol Thanks in advance

bpadalino commented 7 years ago

Have you been able to build anything against libbladeRF? Did you compile libbladeRF from source, or did you use MacPorts to get that as well?

The problem is that the location of the library is not in a default search path and the makefile isn't trying to find the library and assumes it's in the library search path.

vjarao commented 7 years ago

Thanks for your quick reply. All bladeRF software installation is via Macports. All interfaces with the board works well. CLI, Octave/Matlab and even GnuRadio. This is the first time I am having error messages. I did manually copy the libbladeRF.h into the same directory but got the same error. I updated (double check) my PATH and all is correct. It does points to /opt/local/include/ where the libbladeRF.h is installed. Same error again. I rebooted the computer (not always necessary) and unfortunately the error continues. Now, bare in mind I am not a developer, but I noticed the "Makefile" calls for lbladrerf and not for libbladeRF. Not sure it that is related with my issue. Is there any file or configuration you need to see to diagnose my problem?

bpadalino commented 7 years ago

If you edit the Makefile to have a line with '-L/opt/local/lib' in it, or I think if you set DYLD_LIBRARY_PATH to have /opt/local/lib in it, then the current Makefile will work.

Do those comments make sense?

vjarao commented 7 years ago

I am sorry for being so silly. I did what you recommend and still same error. Whether it make sense or not, I have no idea. I trust your help.

vjarao commented 7 years ago

New day, new clues, some extra help, made me realized I added the suggested line in the wrong place. This is how it should be: gcc -o bladeRF_adsb bladeRF_adsb.c -lbladerf -L/opt/local/lib Worked!!

bpadalino commented 7 years ago

Glad it worked! Sorry for the trouble. We'll try to put a fix in place so this doesn't happen in the future. Keeping the issue open until the fix is committed.