Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing -lbradeRF?? #8

Open
vjarao opened this issue Jul 14, 2016 · 6 comments
Open

missing -lbradeRF?? #8

vjarao opened this issue Jul 14, 2016 · 6 comments

Comments

@vjarao
Copy link

vjarao commented Jul 14, 2016

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
Copy link
Contributor

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
Copy link
Author

vjarao commented Jul 14, 2016

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
Copy link
Contributor

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
Copy link
Author

vjarao commented Jul 14, 2016

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
Copy link
Author

vjarao commented Jul 15, 2016

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants