[cfe-dev] OpenMP header path?

Eugene Zelenko via cfe-dev cfe-dev at lists.llvm.org
Wed Feb 6 10:45:43 PST 2019


Hi, Roman!

On Wed, Feb 6, 2019 at 12:38 AM Roman Lebedev <lebedev.ri at gmail.com> wrote:
>
> On Wed, Feb 6, 2019 at 11:35 AM Eugene Zelenko via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
> >
> > Hi!
> >
> > I'm trying to build file with enabled OpenMP support by trunk Clang
> > with GCC STL. Compilation is failing because of:
> >
> > fatal error: 'omp.h' file not found
> > #include <omp.h>
> Clang is normally looking for it's own omp.h
> It won't find it unless you actually install clang.
> It won't work out of build dir.
> https://bugs.llvm.org/show_bug.cgi?id=40139
>
> Also, you need to build libomp for that header to be build, IIRC.

It was my first thought, so I built and install OpenMP. I use
installed Clang, not build directory. omp.h is in include directory in
installation path, but Clang could not find it.

Only <Clang installation dir>/lib64/clang/9.0.0/include is in search
path reported by -v.

> > Clang options:
> >
> > -stdlib=libstdc++ --gcc-toolchain=<GCC 6.3.0 path> -fopenmp
> >
> > Search path reported by -v:
> >
> > #include <...> search starts here:
> >
> > <GCC 6.3.0 path>/lib/gcc/x86_64-redhat-linux/6.3.0/../../../../include/c++/6.3.0
> > <GCC 6.3.0 path>/lib/gcc/x86_64-redhat-linux/6.3.0/../../../../include/c++/6.3.0/x86_64-redhat-linux/32
> > <GCC 6.3.0 path>/lib/gcc/x86_64-redhat-linux/6.3.0/../../../../include/c++/6.3.0/backward
> >
> > Location of omp.h:
> >
> > <GCC 6.3.0 path>/lib/gcc/x86_64-redhat-linux/6.3.0/include/omp.h
> >
> > Eugene.
> Roman.
>
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

Eugene.



More information about the cfe-dev mailing list