Anyone succeeded at compiling the latest dump1090-fa code on a Mac?
I did manage to compile the older “mutability” code without any issues but the FA version throws an obscure (to my ignorant brain) error on nanosleep …
Thank you
Anyone succeeded at compiling the latest dump1090-fa code on a Mac?
I did manage to compile the older “mutability” code without any issues but the FA version throws an obscure (to my ignorant brain) error on nanosleep …
Thank you
If you have compilation errors, just post them. Roughly hinting at them will not be helpful for people who actually understand the errors and could help you maybe
Fair enough Thanks. Here is the attempt and the error:
macbook-pro:dump1090-master bob$ make BLADERF=no
cc -DMODES_DUMP1090_VERSION=\"\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -DENABLE_RTLSDR -std=c11 -O2 -g -Wall -Werror -W -D_DEFAULT_SOURCE -I/usr/local/Cellar/librtlsdr/0.6.0/include/ -I/usr/local/Cellar/libusb/1.0.22/include/libusb-1.0 -c sdr_ifile.c -o sdr_ifile.o
sdr_ifile.c:245:20: error: implicit declaration of function 'clock_nanosleep' is
invalid in C99 [-Werror,-Wimplicit-function-declaration]
while (clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &next...
^
sdr_ifile.c:245:53: error: use of undeclared identifier 'TIMER_ABSTIME'
while (clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &next...
^
2 errors generated.
make: *** [sdr_ifile.o] Error 1
there might be other problems, but for now just try removing -Werror from the flags by editing the Makefile.
Thank you! Tried but does not change a lot
macbook-pro:dump1090-master bob$ make BLADERF=no
cc -DMODES_DUMP1090_VERSION="" -DMODES_DUMP1090_VARIANT="dump1090-fa" -DENABLE_RTLSDR -std=c11 -O2 -g -Wall -W -D_DEFAULT_SOURCE -I/usr/local/Cellar/librtlsdr/0.6.0/include/ -I/usr/local/Cellar/libusb/1.0.22/include/libusb-1.0 -c sdr_ifile.c -o sdr_ifile.o
sdr_ifile.c:245:20: warning: implicit declaration of function ‘clock_nanosleep’
is invalid in C99 [-Wimplicit-function-declaration]
while (clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &next…
^
sdr_ifile.c:245:53: error: use of undeclared identifier ‘TIMER_ABSTIME’
while (clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &next…
^
1 warning and 1 error generated.
make: *** [sdr_ifile.o] Error 1
From some googling it seems you would need to replace that function because it doesn’t exist in OS X
As dump1090-mutability decodes just fine i would just go with that.
Thank you very much.
Fair enough.
Take care.
I was able to get it to compile on MacOS by disabling the compilation and use of sdr_ifile:
It then compiles cleanly, and you can run “dump1090 --write-json /some/web/directory” to start writing the json data files that the web interface requires.
Sorry,
Can’t find
Comment out or delete the “ifile” entry from sdr_handlers in sdr_ifile.h.
Wrong file perhaps?
You can compile dump1090-fa for macOS. See this link to stanford.edu for details: https://web.stanford.edu/class/ee26n/Assignments/Dump1090.html
As it says in the article, you need Xcode and MacPorts, and then from MacPorts, install the rtl-sdr driver (or other sdr receiver supported by dump1090-fa.
Do the git clone
and make
as it says in the article.
However there will be compile errors. The first two are:
net_io.c:1086:15: error: implicit declaration of function 'alloca' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
buf = p = alloca(len);
^
net_io.c:1086:13: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Werror,-Wint-conversion]
buf = p = alloca(len);
^ ~~~~~~~~~~~
This can be fixed by adding:
#include <alloca.h>
to the net_io.c
file
There will also be declaration of function errors in 3 other files. Fix these by adding:
#include <strings.h>
to the sdr.c
sdr_ifile.c
and sdr_bladrf.c
files
Note that it’s plural <strings.h>
. Add the includes with the other includes at the top of the files.
There might be an easier why of fixing these errors by modifying the Makefile, but I’m not that familiar with Makefiles that I would attempt that.
Should then be able to compile without errors and then run dump1090
.
./dump1090 --interactive
The simple python one-liner to create a web server and display a map that is mentioned in the stanford.edu article also works.
Hope this helps for running dump1090-fa on a Mac.
For reference, I compiled this on macOS Monterey 12.13.1
and Xcode 13.3.1
.