astropy / astroscrappy

Speedy Cosmic Ray Annihilation Package in Python
70 stars 34 forks source link

Fails to compile with OS X Xcode cc due to -fopenmp compiler option #16

Closed bjweiner closed 6 years ago

bjweiner commented 8 years ago

I attempted to install ccdproc using pip, under a Ureka installation, and the installation failed while building astroscrappy with this message: ...

creating build/temp.macosx-10.6-x86_64-2.7/astroscrappy/utils

cc -fno-strict-aliasing -I/Users/bjw/software/ureka/Ureka/python/include - I/Users/bjw/software/ureka/Ureka/python/include -DNDEBUG -I/Users/bjw/software/ureka/Ureka/python/include -I/Users/bjw/software/ureka/Ureka/python/include -I/Users/bjw/software/ureka/Ureka/python/lib/python2.7/site-packages/numpy/core/include -Iastroscrappy/utils -I/Users/bjw/software/ureka/Ureka/python/include/python2.7 -c astroscrappy/utils/median_utils.c -o build/temp.macosx-10.6-x86_64-2.7/astroscrappy/utils/median_utils.o -g -O3 -funroll-loops -ffast-math -fopenmp -Wp,-w -Wno-unused-function

clang: error: unsupported option '-fopenmp'

cc --version prints:

Apple LLVM version 7.3.0 (clang-703.0.29) Target: x86_64-apple-darwin15.3.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I haven't installed another C compiler yet. Is it possible to test for the legality of this compiler option before requiring it?

cmccully commented 8 years ago

@bjweiner Sorry for the delay on this. I didn't see the issue. I discovered this issue in my code recently. It is due to a change in how the xcode cpp command deals with the openmp libraries. I will push a fix shortly.

cmccully commented 6 years ago

I believe this has been fixed for quite some time. I believe this was fixed in #21. Current Mac builds on Travis are passing also. Let me know if I need to reopen this ticket.