在 RPi 上构建 dump1090 时找不到错误

在 RPi 上构建 dump1090 时找不到错误

我想建造转储1090适用于我的 RPi B+,但我遇到了一个问题。我安装了所有依赖项,但构建失败:首先,我只是尝试使用 make 进行构建,但它导致错误,

include/ -c sdr_bladerf.c -o sdr_bladerf.o
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:1275:15: note: expected ‘bladerf_frequency * {aka long long unsigned int *}’ but argument is of type ‘unsigned int *’
 int CALL_CONV bladerf_get_frequency(struct bladerf *dev,
               ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:41: recipe for target 'sdr_bladerf.o' failed
make: *** [sdr_bladerf.o] Error 1

我认为,如果问题出在与 bladerf 相关的某个东西上(我没有使用它),我可以简单地将其从构建中删除,如 repo 的 readme 中所述,通过输入“make BLADERF=no”,但却面临另一个问题:

pi@raspberrypi:~/dump1090 $ make BLADERF=no
cc -g -o dump1090 dump1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o demod_2400.o stats.o cpr.o icao_filter.o track.o util.o convert.o sdr_ifile.o sdr.o sdr_rtlsdr.o -L/usr/local/lib -lpthread -lm -lrt -lrtlsdr -lusb-1.0 -lncurses
sdr.o:(.data+0x28): undefined reference to `bladeRFInitConfig'
sdr.o:(.data+0x2c): undefined reference to `bladeRFShowHelp'
sdr.o:(.data+0x30): undefined reference to `bladeRFHandleOption'
sdr.o:(.data+0x34): undefined reference to `bladeRFOpen'
sdr.o:(.data+0x38): undefined reference to `bladeRFRun'
sdr.o:(.data+0x3c): undefined reference to `bladeRFClose'
collect2: error: ld returned 1 exit status
Makefile:44: recipe for target 'dump1090' failed
make: *** [dump1090] Error 1

现在我有点想不通了。我该怎么做才能构建它?看起来这不是代码问题,因为这个 repo 经常更新,任何问题都会被注意到

相关内容