Support #3512
openBug #3462 on Arch Linux; gr-osmosdr install fails
0%
Description
My application uses an SDRplay reciever, the errors in the build seem to be related to support for hardware I don't even have.
A suggestion of a workaround would be appreciated
The version listed in the AUR repositories is:
gr-osmosdr-nonfree-git-0.1.4.91
Fails the same way as with the instructions on github:
[user@host build]$ make
Scanning dependencies of target gnuradio-osmosdr
[ 1%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/source_impl.cc.o
In file included from /home/user/gr-osmosdr/lib/bladerf/bladerf_source_c.h:26,
from /home/user/gr-osmosdr/lib/source_impl.cc:72:
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:57:18: error: ‘bladerf_channel’ was not declared in this scope
typedef std::map<bladerf_channel, bool> bladerf_channel_enable_map;
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:57:18: note: suggested alternative: ‘bladerf_image’
typedef std::map<bladerf_channel, bool> bladerf_channel_enable_map;
^~~~~~~~~~~~~
bladerf_image
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:57:39: error: template argument 1 is invalid
typedef std::map<bladerf_channel, bool> bladerf_channel_enable_map;
^
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:57:39: error: template argument 3 is invalid
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:57:39: error: template argument 4 is invalid
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:60:18: error: ‘bladerf_channel’ was not declared in this scope
typedef std::map<bladerf_channel, int> bladerf_channel_map;
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:60:18: note: suggested alternative: ‘bladerf_image’
typedef std::map<bladerf_channel, int> bladerf_channel_map;
^~~~~~~~~~~~~
bladerf_image
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:60:38: error: template argument 1 is invalid
typedef std::map<bladerf_channel, int> bladerf_channel_map;
^
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:60:38: error: template argument 3 is invalid
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:60:38: error: template argument 4 is invalid
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:99:20: error: ‘bladerf_channel_layout’ was not declared in this scope
size_t num_streams(bladerf_channel_layout layout);
^~~~~~~~~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:99:20: note: suggested alternative: ‘bladerf_channel_map’
size_t num_streams(bladerf_channel_layout layout);
^~~~~~~~~~~~~~~~~~~~
bladerf_channel_map
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:154:33: error: ‘bladerf_direction’ has not been declared
void init(dict_t const &dict, bladerf_direction direction);
^~~~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:161:27: error: ‘bladerf_direction’ has not been declared
size_t get_max_channels(bladerf_direction direction);
^~~~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:163:27: error: ‘bladerf_channel’ has not been declared
void set_channel_enable(bladerf_channel ch, bool enable);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:164:27: error: ‘bladerf_channel’ has not been declared
bool get_channel_enable(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:170:3: error: ‘bladerf_channel’ does not name a type; did you mean ‘bladerf_channel_map’?
bladerf_channel str2channel(std::string const &ch);
^~~~~~~~~~~~~
bladerf_channel_map
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:172:27: error: ‘bladerf_channel’ has not been declared
std::string channel2str(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:174:22: error: ‘bladerf_channel’ has not been declared
int channel2rfport(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:177:3: error: ‘bladerf_channel’ does not name a type; did you mean ‘bladerf_channel_map’?
bladerf_channel chan2channel(bladerf_direction direction, size_t chan = 0);
^~~~~~~~~~~~~
bladerf_channel_map
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:180:38: error: ‘bladerf_channel’ has not been declared
osmosdr::meta_range_t sample_rates(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:182:39: error: ‘bladerf_channel’ has not been declared
double set_sample_rate(double rate, bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:184:26: error: ‘bladerf_channel’ has not been declared
double get_sample_rate(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:187:36: error: ‘bladerf_channel’ has not been declared
osmosdr::freq_range_t freq_range(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:189:39: error: ‘bladerf_channel’ has not been declared
double set_center_freq(double freq, bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:191:26: error: ‘bladerf_channel’ has not been declared
double get_center_freq(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:194:43: error: ‘bladerf_channel’ has not been declared
osmosdr::freq_range_t filter_bandwidths(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:196:42: error: ‘bladerf_channel’ has not been declared
double set_bandwidth(double bandwidth, bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:198:24: error: ‘bladerf_channel’ has not been declared
double get_bandwidth(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:201:43: error: ‘bladerf_channel’ has not been declared
std::vector<std::string> get_gain_names(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:203:40: error: ‘bladerf_channel’ has not been declared
osmosdr::gain_range_t get_gain_range(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:206:40: error: ‘bladerf_channel’ has not been declared
bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:209:38: error: ‘bladerf_channel’ has not been declared
bool set_gain_mode(bool automatic, bladerf_channel ch,
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:212:22: error: ‘bladerf_channel’ has not been declared
bool get_gain_mode(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:215:32: error: ‘bladerf_channel’ has not been declared
double set_gain(double gain, bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:217:57: error: ‘bladerf_channel’ has not been declared
double set_gain(double gain, std::string const &name, bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:219:19: error: ‘bladerf_channel’ has not been declared
double get_gain(bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:221:44: error: ‘bladerf_channel’ has not been declared
double get_gain(std::string const &name, bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:224:41: error: ‘bladerf_direction’ has not been declared
std::vector<std::string> get_antennas(bladerf_direction dir);
^~~~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:225:20: error: ‘bladerf_direction’ has not been declared
bool set_antenna(bladerf_direction dir, size_t chan, const std::string &antenna);
^~~~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:228:57: error: ‘bladerf_channel’ has not been declared
int set_dc_offset(std::complex<double> const &offset, bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:230:59: error: ‘bladerf_channel’ has not been declared
int set_iq_balance(std::complex<double> const &balance, bladerf_channel ch);
^~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:285:25: error: ‘bladerf_direction’ has not been declared
bool is_antenna_valid(bladerf_direction dir, const std::string &antenna);
^~~~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:210:51: error: ‘BLADERF_GAIN_DEFAULT’ was not declared in this scope
bladerf_gain_mode agc_mode = BLADERF_GAIN_DEFAULT);
^~~~~~~~~~~~~~~~~~
/home/user/gr-osmosdr/lib/bladerf/bladerf_common.h:210:51: note: suggested alternative: ‘BLADERF_GAIN_MANUAL’
bladerf_gain_mode agc_mode = BLADERF_GAIN_DEFAULT);
^~~~~~~~~~~~~~~~~~
BLADERF_GAIN_MANUAL
In file included from /home/user/gr-osmosdr/lib/source_impl.cc:72:
/home/user/gr-osmosdr/lib/bladerf/bladerf_source_c.h:135:3: error: ‘bladerf_channel_layout’ does not name a type; did you mean ‘bladerf_channel_map’?
bladerf_channel_layout _layout; /**< channel layout /
^~~~~~~~~~~~~~~~~~~~
bladerf_channel_map
make2: [lib/CMakeFiles/gnuradio-osmosdr.dir/build.make:63: lib/CMakeFiles/gnuradio-osmosdr.dir/source_impl.cc.o] Error 1
make1: [CMakeFiles/Makefile2:141: lib/CMakeFiles/gnuradio-osmosdr.dir/all] Error 2
make: ** [Makefile:141: all] Error 2
Updated by laforge over 5 years ago
- Assignee set to horiz0n
I can reproduce this also on current debian unstable:
[...]
/home/laforge/projects/git/gr-osmosdr/lib/bladerf/bladerf_common.h:215:32: error: ‘bladerf_channel’ has not been declared double set_gain(double gain, bladerf_channel ch); ^~~~~~~~~~~~~~~ /home/laforge/projects/git/gr-osmosdr/lib/bladerf/bladerf_common.h:217:57: error: ‘bladerf_channel’ has not been declared double set_gain(double gain, std::string const &name, bladerf_channel ch); ^~~~~~~~~~~~~~~ /home/laforge/projects/git/gr-osmosdr/lib/bladerf/bladerf_common.h:219:19: error: ‘bladerf_channel’ has not been declared double get_gain(bladerf_channel ch); ^~~~~~~~~~~~~~~ /home/laforge/projects/git/gr-osmosdr/lib/bladerf/bladerf_common.h:221:44: error: ‘bladerf_channel’ has not been declared double get_gain(std::string const &name, bladerf_channel ch); ^~~~~~~~~~~~~~~ /home/laforge/projects/git/gr-osmosdr/lib/bladerf/bladerf_common.h:224:41: error: ‘bladerf_direction’ has not been declared std::vector<std::string> get_antennas(bladerf_direction dir); ^~~~~~~~~~~~~~~~~ /home/laforge/projects/git/gr-osmosdr/lib/bladerf/bladerf_common.h:225:20: error: ‘bladerf_direction’ has not been declared bool set_antenna(bladerf_direction dir, size_t chan, const std::string &antenna); ^~~~~~~~~~~~~~~~~ /home/laforge/projects/git/gr-osmosdr/lib/bladerf/bladerf_common.h:228:57: error: ‘bladerf_channel’ has not been declared int set_dc_offset(std::complex<double> const &offset, bladerf_channel ch); ^~~~~~~~~~~~~~~ /home/laforge/projects/git/gr-osmosdr/lib/bladerf/bladerf_common.h:230:59: error: ‘bladerf_channel’ has not been declared int set_iq_balance(std::complex<double> const &balance, bladerf_channel ch); ^~~~~~~~~~~~~~~ /home/laforge/projects/git/gr-osmosdr/lib/bladerf/bladerf_common.h:285:25: error: ‘bladerf_direction’ has not been declared bool is_antenna_valid(bladerf_direction dir, const std::string &antenna); ^~~~~~~~~~~~~~~~~ /home/laforge/projects/git/gr-osmosdr/lib/bladerf/bladerf_common.h:210:51: error: ‘BLADERF_GAIN_DEFAULT’ was not declared in this scope bladerf_gain_mode agc_mode = BLADERF_GAIN_DEFAULT); ^~~~~~~~~~~~~~~~~~~~ /home/laforge/projects/git/gr-osmosdr/lib/bladerf/bladerf_common.h:210:51: note: suggested alternative: ‘BLADERF_GAIN_MANUAL’ bladerf_gain_mode agc_mode = BLADERF_GAIN_DEFAULT); ^~~~~~~~~~~~~~~~~~~~ BLADERF_GAIN_MANUAL In file included from /home/laforge/projects/git/gr-osmosdr/lib/source_impl.cc:72: /home/laforge/projects/git/gr-osmosdr/lib/bladerf/bladerf_source_c.h:135:3: error: ‘bladerf_channel_layout’ does not name a type; did you mean ‘bladerf_channel_map’? bladerf_channel_layout _layout; /**< channel layout */ ^~~~~~~~~~~~~~~~~~~~~~ bladerf_channel_map
So it seems libbladerf has had some API changes?
ii libbladerf-dev:amd64 0.2017.12~rc1-2 amd64 nuand bladeRF software-defined radio device (header files)
Updated by laforge over 5 years ago
so it seems the other way around: libbladerf 2.0.0 introduced the type 'bladerf_direction' and debian unstable is still shipping an older versions.
So I guess the Cmake should be modified to check if the libbladerf version found is > 2.0.0, and only if that's the case, the bladeRF support should be compiled.