I am trying to compile a project which is uses ImageMagick as a dependency.
But it doesn’t compile on OSX 10.13 with the clang compiler, because clang on 10.13 doesn’t support OpenMP, and fails with the error “clang: error: unsupported option ‘-fopenmp’”.
Yes, i know this can be solved by using gcc compiler, but i want to know if there is a chance to fix it for clang?
No version of Xcode’s clang compiler currently can support openmp.
There is an error in the ImageMagick configure script, wherein it can seem to find openmp support but there really isn’t any. You can check in the pkgconfig files installed by ImageMagick and remove them from those files if you find them (-fopenmp), and this might get your build working again for you.
Alternatively, newer versions of clang from the llvm project do support openmp, if openmp is installed and if the link libraries are correctly specified during the link phase.