csdr
csdr copied to clipboard
Compile on OSX
Any advice how to compile on OSX?
I managed to get it to compile on OS X, but had to make some tweaks to the CPU flags detection, tweak the build flags and comment out things that rely on librt.
You can see my OS X branch here: https://github.com/sgentle/csdr/tree/osx
Great! Thanks!
your OSX branch does not compile here. OSX 10.10
$ make
rm -f dumpvect*.vect
cat: /proc/cpuinfo: No such file or directory
cat: /proc/cpuinfo: No such file or directory
cat: /proc/cpuinfo: No such file or directory
cat: /proc/cpuinfo: No such file or directory
cat: /proc/cpuinfo: No such file or directory
cat: /proc/cpuinfo: No such file or directory
NOTE: you may have to manually edit Makefile to optimize for your CPU (especially if you compile on ARM, please edit PARAMS_NEON).
Auto-detected optimization parameters: -mfloat-abi=hard -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -funsafe-math-optimizations -Wformat=0
c99 -O3 -ffast-math -fdump-tree-vect-details -dumpbase dumpvect -mfloat-abi=hard -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -funsafe-math-optimizations -Wformat=0 fft_fftw.c libcsdr_wrapper.c -g -lm -lrt -lfftw3f -DUSE_FFTW -DLIBCSDR_GPL -DUSE_IMA_ADPCM -Wno-unused-result -fpic -shared -o libcsdr.so
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c99: illegal option -- f
usage: c99 [-cEgs] [-D name[=value]] [-I directory] ... [-L directory] ...
[-o outfile] [-O optlevel] [-U name]... [-W 64] operand ...
make: *** [all] Error 1
@xenDE Are you sure you have the right branch? You can see mine has the only reference to /proc/cpuinfo
commented out: https://github.com/sgentle/csdr/blob/osx/Makefile#L34
@sgentle I'm still having trouble compiling here on macOS 10.11.6, getting an ./fft_fftw.h:7:10: fatal error: 'fftw3.h' file not found
error. I already have that library in /usr/local/include via brew install fftw
.
Had to change the [second] PARAMS_LIBS
line to read as follows:
PARAMS_LIBS = -g -lm -I/usr/local/include -L/usr/local/lib -lfftw3f -DUSE_FFTW -DLIBCSDR_GPL -DUSE_IMA_ADPCM
Sounds like as of Mavericks, the /usr/local header and library paths are no longer default. There may be a more elegant fix than mine.
For OSX Catalina, I had to add the following to csdr.c:
#define _DARWIN_C_SOURCE
Hi, I have built CSDR from OSX branch but when trying to start openwebrx next message appears.
[openwebrx-main] You need to install an up-to-date version of "csdr" that contains the "nmux" tool to run OpenWebRX! Please upgrade "csdr"!
Can you please update OSX branch or give a hint how to build it for MAC on top of master?
Hi All, Unfortunately I don't have a Mac, so I won't personally do this for now.
ha7ilm, I can try to do it myself and contribute, are there any hints to look out for?