I've been trying to install something for several hours now but it doesn't seem to work. The project uses openmp, which should be supported by clang 4.0.0 (I get the version from clang -v
). Looked at a few answers online,
like this one https://github.com/ppwwyyxx/OpenPano/issues/16 or this one apple clang -fopenmp not working
but they don't seem to work for me. I still get the following errors:
clang: error: unknown argument: '-fno-stack-limit'
clang: error: unsupported option '-fopenmp'
along with a few others of a similar ilk.
The weirdest thing is that this:
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[])
{
int nthreads, tid;
/* Fork a team of threads giving them their own copies of variables */
#pragma omp parallel private(nthreads, tid)
{
/* Obtain thread number */
tid = omp_get_thread_num();
printf("Hello World from thread = %d\n", tid);
/* Only master thread does this */
if (tid == 0)
{
nthreads = omp_get_num_threads();
printf("Number of threads = %d\n", nthreads);
}
} /* All threads join master thread and disband */
}
compiles and runs properly with the clang omptest.c -fopenmp
command. So the support for openMP should be there.
I tried installing and linking llvm with homebrew but it didn't change anything.