ha7ilm / csdr

A simple DSP library and command-line tool for Software Defined Radio.
522 stars 171 forks source link

Working OS/X build #39

Open jancona opened 6 years ago

jancona commented 6 years ago

This builds and runs on OS/X Sierra. It also still works on a Linux box. This should fix #24.

darksidelemm commented 6 years ago

Under OSX 10.11.6 I'm getting a few errors of the kind: csdr.c:2080:31: error: use of undeclared identifier 'CLOCK_MONOTONIC'

I'm using macports to provide the build system, and I had to modify line 47 in the Makefile to add the /opt/local/include and /opt/local/lib directories, else libfftw wasn't being found.

Not sure if this is a compile issue (gcc isn't really gcc... it's LLVM), or something else.

jancona commented 6 years ago

It looks like clock_gettime and CLOCK_MONOTONIC were only added in OS/X 10.12 Sierra. I pushed this solution, which works on Sierra. Let me know if it works for you @darksidelemm.

darksidelemm commented 6 years ago

It builds fine now! Not able to do any serious testing at the moment, but that's a good start! (Still have to manually specify the include and lib directories mind you, but i'm not sure what the right solution to that is)

Sevyls commented 6 years ago

Why is this change not being merged?

Sevyls commented 6 years ago

Building works under macOS Mojave, but installing fails:

Michaels-MacBook-Pro:csdr user$ sudo make install
install -m 0755 libcsdr.so.0.15 /usr/lib
install: /usr/lib/libcsdr.so.0.15: Operation not permitted
make: *** [install] Error 71

Changing the PREFIX in Makefile to /usr/local worked for me.

ha7ilm commented 6 years ago

Because of me struggling to find time on reviewing this and other pull requests. I don't have a Mac either, so what I'll be able to test is that it still works in Linux.

Michael Auß notifications@github.com ezt írta (időpont: 2018. okt. 18., Cs, 11:45):

Why is this change not being merged?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/simonyiszk/csdr/pull/39#issuecomment-430945518, or mute the thread https://github.com/notifications/unsubscribe-auth/AFoUMHRjS30gb4ERlaYMx4ZRI-jTQUbhks5umE2ogaJpZM4VCfWM .