SDRplay / dump1090

Version of dump1090 for RSP devices
Other
59 stars 20 forks source link

API3 version compile error #6

Closed vit1251 closed 2 years ago

vit1251 commented 3 years ago
gcc -g -o dump1090 dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o crc.o demod_2000.o demod_2400.o demod_8000.o stats.o cpr.o icao_filter.o track.o util.o convert.o dump1090.h -L./ -lsdrplay_api -lpthread -lm -lrtlsdr  -lrt `pkg-config --libs librtlsdr`
/usr/bin/ld: interactive.o:/opt/SDRplay/dump1090/dump1090.h:403: multiple definition of `Modes'; dump1090.o:/opt/SDRplay/dump1090/dump1090.h:403: first defined here
/usr/bin/ld: interactive.o:/opt/SDRplay/dump1090/dump1090.h:411: multiple definition of `slaveAttached'; dump1090.o:/opt/SDRplay/dump1090/dump1090.h:411: first defined here
/usr/bin/ld: interactive.o:/opt/SDRplay/dump1090/dump1090.h:410: multiple definition of `slaveUninitialised'; dump1090.o:/opt/SDRplay/dump1090/dump1090.h:410: first defined here
srs4511351 commented 3 years ago

I was able to compile and run dump1090 on a 32 bit Debian buster system on my Raspberry Pi. On my 64 bit bullseye system, I get the multiple definition errors. I searched the web and found a common cause of the multiple definition errors. Apparently, newer gcc compilers no longer allow you to define variables in header files. A solution was offered to add the static keyword, which I did in dump1090.h for the variables that are in the error messages. Now, it does compile and the dump1090 executable is generated, but after displaying the heading in the terminal, it causes a Segmentation fault. I think we need a programmer to fix this. I may try compiling dump1090 on a 64 bit buster system and just copy it over to the bullseye system.

----Steve

srs4511351 commented 3 years ago

Are you running a Raspberry Pi by chance? I compiled dump1090 on a 64 bit Raspberry Pi OS buster system and it works. I copied it to my 64 bit bullseye system and it works. I put the an archive of it on my web site https://www.radiosrs.net/tech.html Click on "Installing utility software on a Raspberry Pi" and scroll down to "ADS-B (dump1090) for SDRplay".

----Steve

SDRplay commented 2 years ago

Sorry for the delay on sorting this...

The repo has been cleaned up and now the master branch supports API3 and should build correctly. The README.md has been updated with better instructions and the Makefile has some additional comments.

Best regards,

Andy