0

I've spent hours trying different solutions but nothing has worked so far.

I've installed gcc via Homebrew, and linked gcc to the Homebrew gcc. gcc -v returns this:

COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/5.3.0/libexec/gcc/x86_64-apple-darwin14.5.0/5.3.0/lto-wrapper
Target: x86_64-apple-darwin14.5.0
Configured with: ../configure --build=x86_64-apple-darwin14.5.0 --prefix=/usr/local/Cellar/gcc/5.3.0 --libdir=/usr/local/Cellar/gcc/5.3.0/lib/gcc/5 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-5 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew gcc 5.3.0 --without-multilib' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --disable-multilib
Thread model: posix
gcc version 5.3.0 (Homebrew gcc 5.3.0 --without-multilib)

However, when I try to compile I get

This is make_MWA_Tools.sh
using $CFITSIO = 
building LFILE & read_mwac utilities
cc -g -O -Wall -D_FILE_OFFSET_BITS=64 -fopenmp  -c mwac_utils.c
mwac_utils.c:3:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^
1 error generated.
make: *** [mwac_utils.o] Error 1
!!!!!!!!!!!!!!!!!!!!!!
build_lfiles/read_mwac make failed !

I've looked in gcc located under Cellar and found mop.h, but for some reason its not being included. Any help would be greatly appreciated.

Edit: I don't believe this is a duplicate question because I could not find another question that Installed gcc from Homebrew, linked 'gcc' to the homebrew gcc installation, and still couldn't find omp.h

archerkg
  • 1
  • 1
  • Possible duplicate of [How to include omp.h in OS X?](http://stackoverflow.com/questions/25990296/how-to-include-omp-h-in-os-x) – Sreekar Dec 28 '15 at 00:30
  • I believe he's using the native gcc provided by Apple, which is really Clang. From what I've read, homebrew gcc should have fixed this issue. But... – archerkg Dec 28 '15 at 01:44
  • Homebrew doesn't always (more often than not, for this case) symlink files. Do a search in `/usr/local` for `omp.h`. E.g. `find /usr/local -name omp.h`, or possibly quicker: `locate omp.h`. Then use the pre-processor include flag `-I` with that directory. The file may very well be on your system, just not in `/usr/local/include`. –  Sep 05 '16 at 05:08

0 Answers0