-
Notifications
You must be signed in to change notification settings - Fork 228
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
use correct type for bladerf_get_frequency #22
Conversation
bd0858e
to
e21ef3e
Compare
This is, unfortunately, an incompatible change in the upstream headers and will break the build on e.g. jessie. |
You should probably be using You can probably wrap this in an #if conditional that looks at LIBBLADERF_API_VERSION |
Building against ubuntu bionic (amd64) and current bladeRF sources (4bcdd6ec) resulted in the following error: ``` sdr_bladerf.c: In function 'show_config': sdr_bladerf.c:116:76: error: passing argument 3 of 'bladerf_get_frequency' from incompatible pointer type [-Werror=incompatible-pointer-types] (status = bladerf_get_frequency(BladeRF.device, BLADERF_MODULE_RX, &freq)) < 0 || ^ In file included from sdr_bladerf.c:23:0: /usr/include/libbladeRF.h:1117:15: note: expected 'bladerf_frequency * {aka long unsigned int *}' but argument is of type 'unsigned int *' int CALL_CONV bladerf_get_frequency(struct bladerf *dev, ^~~~~~~~~~~~~~~~~~~~~ ``` This commit uses the correct type (`bladerf_frequency`) for the `freq` variable.
Good catch, thanks. I've updated the pr to use |
e21ef3e
to
62844ce
Compare
Actually, the current version of the pr seems to build fine on debian jessie. |
Breaks for me:
|
Not working in the current form, reopen if needed |
You have this closed but I was able to work out a fix. On top of changing You need to modify the LIBS variable in the file MakeFile by adding Being that building bladeRF from the master branch of their repository builds bladeRF2 you will need to modify Debian/control as well changing Tested and working on Unbuntu 19.04 Disco Dingo. |
A PR that fixes this without breaking builds for other versions would be
great if you can put that together.
|
Just need to test that changes to the Debian control file work with both libbladerf1 as well as libbladerf2. I have never done a | aka or for dependencies in a control file but from what I read it should work. I just want to make sure before submitting a pull request. I just tried to upgrade my test machine from Ubuntu 16.04 to 19.04 and apparently the firmware does not play nice with the newer kernels. As soon as I am back up and running I will test the changes out and submit a pull request. |
FWIW I just took a look at this on my bionic machine here and I can't reproduce the original build problem.
I can entirely believe that there's an API change here but I don't see it with vanilla bionic. |
I can't reproduce this against ubuntu disco amd64 either. (note that there is a packaging bug in librtlsdr-dev on disco; I just committed a workaround for that; see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925916 and 34bfe10) |
Building against ubuntu bionic (amd64) resulted in the following error:
This commit uses the correct type for the
freq
variable.