clang-omp / clang

clang with OpenMP 3.1 and some elements of OpenMP 4.0 support
clang-omp.github.com
Other
91 stars 15 forks source link

Missing libcxx folder under projects folder as required in CMakeCache.txt #57

Open programminggit opened 9 years ago

programminggit commented 9 years ago

Hello and thank you for your support in advance.

I'm wanting to compile clang-openmp with libc++ support.

After successfully compiling and running a basic openmp test program on OSX Yosemite I thought all was well until I tried to compile boost with ./b2 install.

The compile failed not finding any libc++ headers.

Looking into CMakeCache.txt I found entry: LLVM_EXTERNAL_LIBCXX_SOURCE_DIR pointing to a non-existent folder: /Users/Developer/OpenMPStuff/llvm/projects/libcxx.

Should the libcxx folder be present and does this explain why I'm getting missing libc++ header file compile failures ?(I have the compiler-rt folder under projects)

alexey-bataev commented 9 years ago

Hi, see comments here https://github.com/clang-omp/clang/issues/42#issuecomment-69531645 Hope it will help you to solve your problems.

Best regards,

Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

12.01.2015 19:57, Pete Clark пишет:

Hello and thank you for your support in advance.

I'm wanting to compile clang-openmp with libc++ support.

After successfully compiling and running a basic openmp test program on OSX Yosemite I thought all was well until I tried to compile boost with ./b2 install.

The compile failed not finding any libc++ headers.

Looking into CMakeCache.txt I found entry: LLVM_EXTERNAL_LIBCXX_SOURCE_DIR pointing to a non-existent folder: /Users/Developer/OpenMPStuff/llvm/projects/libcxx.

Should the libcxx folder be present and does this explain why I'm getting missing libc++ header file compile failures ?(I have the compiler-rt folder under projects)

— Reply to this email directly or view it on GitHub https://github.com/clang-omp/clang/issues/57.

programminggit commented 9 years ago

Thanks Alexey.

I couldn't see in the procedure I was following any opportunity to pass your suggested parameters. (I'm following Kyle Halladays instructions for OSX Mavericks)

However, I have now been able to compile with clib++ successfully by adding an extra step in the Clang / OpenMP procedure.

This is on http://clang-omp.github.io/, under

$ git clone https://github.com/clang-omp/llvm $ git clone https://github.com/clang-omp/compiler-rt llvm/projects/compiler-rt $ git clone -b clang-omp https://github.com/clang-omp/clang llvm/tools/clang

I added an extra step here to download the resources cmake is expecting: $git clone https://github.com/llvm-mirror/libcxx llvm/projects/libcxx

This satisfies the setting LLVM_EXTERNAL_LIBCXX_SOURCE_DIR that is defined in the CMakeCache.tx file.

This then resulted in as successful build with c++11 support.

I had to make a slight modification to the instructions, replacing

../configure --enable-optimized >>> ./configure --enable-optimized CC=/usr/bin/clang CXX=/usr/bin/clang++

Note Kyle Halladays link leads to: http://stackoverflow.com/questions/20321988/error-enabling-openmp-ld-library-not-found-for-lgomp-and-clang-errors/21789869#21789869

I used the last procedure in this article (marked as '1')

Kind Regards

Peter Clark

alexey-bataev commented 9 years ago

Peter, glad you were able to resolve your troubles!

Best regards,

Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

13.01.2015 14:35, Pete Clark пишет:

Thanks Alexey.

I couldn't see in the procedure I was following any opportunity to pass your suggested parameters. (I'm following Kyle Halladays instructions for OSX Mavericks)

However, I have now been able to compile with clib++ successfully by adding an extra step in the Clang / OpenMP procedure.

This is on http://clang-omp.github.io/, under

$ git clone https://github.com/clang-omp/llvm $ git clone https://github.com/clang-omp/compiler-rt llvm/projects/compiler-rt $ git clone -b clang-omp https://github.com/clang-omp/clang llvm/tools/clang

I added an extra step here to download the resources cmake is expecting: $git clone https://github.com/llvm-mirror/libcxx llvm/projects/libcxx

This satisfies the setting LLVM_EXTERNAL_LIBCXX_SOURCE_DIR that is defined in the CMakeCache.tx file.

This then resulted in as successful build with c++11 support.

I had to make a slight modification to the instructions, replacing

../configure --enable-optimized >>> ./configure --enable-optimized CC=/usr/bin/clang CXX=/usr/bin/clang++

Note Kyle Halladays link leads to: http://stackoverflow.com/questions/20321988/error-enabling-openmp-ld-library-not-found-for-lgomp-and-clang-errors/21789869#21789869

I used the last procedure in this article (marked as '1')

Kind Regards

Peter Clark

— Reply to this email directly or view it on GitHub https://github.com/clang-omp/clang/issues/57#issuecomment-69731785.