FlightAware Discussions

Dump1090-fa compiling on MacOS

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 :wink:

Fair enough :slight_smile: 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 :frowning:

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 :confused:
As dump1090-mutability decodes just fine i would just go with that.

Thank you very much.
Fair enough.
Take care.