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

LLVM has no headers #42

Closed JuergenSimon closed 10 years ago

JuergenSimon commented 10 years ago

Hello,

I cloned and compiled the compiler successfully, however compiling code with it has not worked out for me. It fails to compile anything but the most trivial code because it can not find standard c++ include headers such as <cmath> or <string>. I managed to fiddle around with flags handed to various modules that I need to compile to make my stuff work, but I can't keep this up. I have dozens of dependencies and can't bring myself to spend the time to look into each one of them to coerce them to find the headers in the locations they seem to reside for the clang installed through OSX 10.9 developer tools (/usr/include/c++/4.2.1/ ...). Is there any way to teach the OpenMP/LLVM where to find the standard libraries? Should they not actually also be part of the install?

alexey-bataev commented 10 years ago

Hello, It is known problem. You can find solution here: http://stackoverflow.com/questions/19575956/building-c-not-working-in-osx-10-9

Best regards, Alexey Bataev

Software Engineer Intel Compiler Team

JuergenSimon commented 10 years ago

This seems not to be working for me. I tried xcode-select --install and got an error message, saying the update server was not available. Then I downloaded the command line tools from Apple manually and installed the package, but I still do not see any <cmath> or <string> headers in /usr/include. They are located in /usr/include/c++/4.2.1 and /usr/include/c++/4.2.1/backwards. Anything else I can try?

alexey-bataev commented 10 years ago

Are you building it using configure/make or CMake?

Best regards,

Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

10.09.2014 12:54, Jürgen Lorenz Simon пишет:

This seems not to be working for me. I tried xcode-select --install and got an error message, saying the update server was not available. Then I downloaded the command line tools from Apple manually and installed the package, but I still do not see any or headers in /usr/include. They are located in /usr/include/c++/4.2.1 and /usr/include/c++/4.2.1/backwards. Anything else I can try?

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

JuergenSimon commented 10 years ago

In my own code and some of the dependencies, I use cmake. I need to compile things like boost, however, because for some reason the LLVM/OpenMP compiler does not work with the libraries compiled through Apple's clang compiler (symbols not found in linking) and I have to compile dependencies from scratch with the LLVM/OpenMP. The dependencies use all sorts of things, like autoconfig, cmake, simple makefiles or custom (like boost).

alexey-bataev commented 10 years ago

Try to specify this additional option to cmake: -DCMAKE_CXX_FLAGS="-isystem $(dirname $(xcrun -find clang))/../lib/c++/v1 -isystem $(dirname $(xcrun -find clang))/../include"

Best regards,

Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

10.09.2014 13:06, Jürgen Lorenz Simon пишет:

In my own code and some of the dependencies, I use cmake. I need to compile things like boost, however, because for some reason the LLVM/OpenMP compiler does not work with the libraries compiled through Apple's clang compiler (symbols not found in linking) and I have to compile dependencies from scratch with the LLVM/OpenMP. The dependencies use all sorts of things, like autoconfig, cmake, simple makefiles or custom (like boost).

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

JuergenSimon commented 10 years ago

I think I misunderstood you. You were talking about which build system I used to build LLVM/OpenMP, right? I will try your suggestion on a fresh checkout and report back.

JuergenSimon commented 10 years ago

I have now compiled LLVM/OpenMP with the options to cmake you suggested. The result is unchanged. The following code:

#include <cmath>
int main()
{
  const int size = 256;
  double sinTable[size];

    #pragma omp parallel for
  for(int n=0; n<size; ++n)
    sinTable[n] = std::sin(2 * M_PI * n / size);

  // the table is now initialized
}

does not yet compile with the following command:

/usr/local/bin/clang++ -fopenmp test.cpp -o test

and gives the error:

fatal error: 'cmath' file not found

include <cmath>

     ^

1 error generated.

alexey-bataev commented 10 years ago

Also add "-isystem $(dirname $(xcrun -find clang))/../lib/c++/v1 -isystem $(dirname $(xcrun -find clang))/../include" to clang when you're compiling your code.

Best regards,

Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

10.09.2014 14:23, Jürgen Lorenz Simon пишет:

I have now compiled LLVM/OpenMP with the options to cmake you suggested. The result is unchanged. The following code:

include

int main() { const int size = 256; double sinTable[size];

 #pragma omp parallel for

for(int n=0; n<size; ++n) sinTable[n] = std::sin(2 * M_PI * n / size);

// the table is now initialized }

does not yet compile with the following command:

/usr/local/bin/clang++ -fopenmp test.cpp -o test

and gives the error:

include

^ 1 error generated. |

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

JuergenSimon commented 10 years ago

That is something I must avoid. Because I have so many dependencies, it will already be difficult to tell all of them to use the LLVM/OpenMP compiler and there is no way to make all of them to use some special flags without some major effort. Ideally I need the compiler to find the standard headers without further coercing. Do you think that it's possible somehow?

alexey-bataev commented 10 years ago

Hi, try to add to cmake the following option when building your clang: -DC_INCLUDE_DIRS:="$(dirname $(xcrun -find clang))/../lib/c++/v1:$(dirname $(xcrun -find clang))/../include"

Best regards, Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

alexey-bataev commented 10 years ago

Hi again, small fix: -DC_INCLUDE_DIRS="$(dirname $(xcrun -find clang))/../lib/c++/v1:$(dirname $(xcrun -find clang))/../include:/usr/include"

Best regards, Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

JuergenSimon commented 10 years ago

Hello,

I managed to compile LLVM/OpenMP with the following cmake flags:

cmake -DCMAKE_CXX_FLAGS="-isystem $(dirname $(xcrun -find clang))/../lib/c++/v1 -isystem $(dirname $(xcrun -find clang))/../include" -DC_INCLUDE_DIRS="$(dirname $(xcrun -find clang))/../lib/c++/v1:$(dirname $(xcrun -find clang))/../include:/usr/include" -DCMAKE_BUILD_TYPE=Release

and it seems to do the trick. Thanks a lot, Alexey!

alexey-bataev commented 10 years ago

No problems, I'm glad I could help you.

Best regards, Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

JuergenSimon commented 9 years ago

Sorry for imposing on you again, but after upgrading to XCode 6.1, I'm back at square one. I think the c++ stdlib headers are moved away, because they no longer reside in /usr/include, even after installing command line tools.

I modified LLVM's cmake parameters to account for changes in the layout, but I'm failing to get it right. Here's the statement(s) I am using. I wrapped it in a script called rebuild.sh in my llvm-build folder:

#!/bin/bash                                                                                                                                                                                       
# copy script to /tmp, clean folder and copy it back                                                                                                                                              
cp rebuild.sh /tmp
rm -rf ./*
cp /tmp/rebuild.sh .
# find Apple's CLANG                                                                                                                                                                              
export CLANG_ROOT=`ls -1d $(dirname $(xcrun -find clang))/../..`
CLANG_ROOT=`cd "${CLANG_ROOT}";pwd`
echo "CLANG_ROOT=${CLANG_ROOT}"
# Add standard lib's headers                                                                                                                                                                      
STDLIB_INCLUDE=`ls -1d $(dirname $(find /usr/include -name cmath | grep -v tr1))`
echo "STDLIB_INCLUDE=${STDLIB_INCLUDE}"
cmake -DCMAKE_CXX_FLAGS="-isystem $CLANG_ROOT/usr/lib/c++/v1 -isystem $CLANG_ROOT/usr/include" -DC_INCLUDE_DIRS="$CLANG_ROOT/usr/include/c++/v1:$CLANG_ROOT/usr/include:$STDLIB_INCLUDE:/usr/incl\
ude" -DCMAKE_BUILD_TYPE=Release ../llvm
make
make check
make install

Now with this, I can compile a simple file like the one i posted further back, however I get compilation errors on more complex components that look like this error here:

/usr/include/c++/4.2.1/bits/stringfwd.h:54:48: error: unknown type name 'char_traits'
  template,

Do you happen to know where the problem is?

alexey-bataev commented 9 years ago

Hi, Sorry for a delay with an answer, I was traveling without an access to my e-mail. At first, try to remove

-DCMAKE_CXX_FLAGS="-isystem $CLANG_ROOT/usr/lib/c++/v1 -isystem $CLANG_ROOT/usr/include" from cmake command.

Also you don't need to "Add standard lib's headers", they are already set. Just run cmake with the following options

cmake -DC_INCLUDE_DIRS="$CLANG_ROOT/usr/include/c++/v1:$CLANG_ROOT/usr/include:/usr/include" -DCMAKE_BUILD_TYPE=Release ../llvm

Best regards,

Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

28.10.2014 20:00, Jürgen Lorenz Simon пишет:

Sorry for imposing on you again, but after upgrading to XCode 6.1, I'm back at square one. I think the c++ stdlib headers are moved away, because they no longer reside in /usr/include, even after installing command line tools.

I modified LLVM's cmake parameters to account for changes in the layout, but I'm failing to get it right. Here's the statement(s) I am using. I wrapped it in a script called rebuild.sh in my llvm-build folder:

!/bin/bash

copy script to /tmp, clean folder and copy it back

cp rebuild.sh /tmp rm -rf ./* cp /tmp/rebuild.sh .

find Apple's CLANG

export CLANG_ROOT=ls -1d $(dirname $(xcrun -find clang))/../.. CLANG_ROOT=cd "${CLANG_ROOT}";pwd echo "CLANG_ROOT=${CLANG_ROOT}"

Add standard lib's headers

STDLIB_INCLUDE=ls -1d $(dirname $(find /usr/include -name cmath | grep -v tr1)) echo "STDLIB_INCLUDE=${STDLIB_INCLUDE}"

cmake -DCMAKE_CXX_FLAGS="-isystem $CLANG_ROOT/usr/lib/c++/v1 -isystem $CLANG_ROOT/usr/include" -DC_INCLUDE_DIRS="$CLANG_ROOT/usr/include/c++/v1:$CLANG_ROOT/usr/include:$STDLIB_INCLUDE:/usr/incl\ ude" -DCMAKE_BUILD_TYPE=Release ../llvm

make make check make install

Now with this, I can compile a simple file like the one i posted further back, however I get compilation errors on more complex components that look like this error here:

/usr/include/c++/4.2.1/bits/stringfwd.h:54:48: error: unknown type name 'char_traits' template,

Do you happen to know where the problem is?

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

JuergenSimon commented 9 years ago

Hello, no problem. I tried your suggestion and I ran into the problem that forced me to add the stdlib path in the first place. I get the following error during compilation:

/usr/local/bin/clang++  -g -dynamiclib -Wl,-headerpad_max_install_names   -o libradolan.dylib -install_name /Users/simon/Projects/Meteo/Ertel/netbeans_workspace/meanie3d/radolan/libradolan.dylib CMakeFiles/radolan.dir/src/read.c.o CMakeFiles/radolan.dir/src/coordinatesystem.cpp.o CMakeFiles/radolan.dir/src/radolan_utils.cpp.o CMakeFiles/radolan.dir/src/observationfile.cpp.o CMakeFiles/radolan.dir/src/shapefile.cpp.o /usr/lib/libz.dylib /usr/local/lib/libhdf5.dylib /usr/local/lib/libhdf5_hl.dylib /usr/local/lib/libshp.dylib /usr/local/lib/libnetcdf_c++4.dylib /usr/local/lib/libnetcdf.dylib 
Undefined symbols for architecture x86_64:
  "__ZNKSs5c_strEv", referenced from:
      __ZN7Radolan17RDObservationFileC2ENS_10RDScanTypeE in observationfile.cpp.o
      __ZN7Radolan17RDObservationFile10reportRainEffll in observationfile.cpp.o
  "__ZNKSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv", referenced from:
      __ZN7Radolan17RDObservationFileC2ENS_10RDScanTypeE in observationfile.cpp.o
      __ZN7Radolan17RDObservationFile10reportRainEffll in observationfile.cpp.o
...

Obviously it has found the header files, but the stdlibc++ symbols are not resolved. Also adding -lstdc++ does not help, indicating that the built-in search paths do not resolve to the correct library. Which is why I tried to resolve a path to the correct stdc++ library in the first place. Got more ideas?

alexey-bataev commented 9 years ago

I'll look at this tomorrow and I'll do my best to resolve your issues.

alexey-bataev commented 9 years ago

Hi again, try to configure with the next command

cmake -DC_INCLUDE_DIRS="$CLANG_ROOT/usr/include/c++/v1:$CLANG_ROOT/usr/include:/usr/include"-DLLVM_ENABLE_LIBCXX=ON-DCMAKE_BUILD_TYPE=Release ../llvm

Best regards,

Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

05.11.2014 16:37, Jürgen Lorenz Simon пишет:

Hello, no problem. I tried your suggestion and I ran into the problem that forced me to add the stdlib path in the first place. I get the following error during compilation:

/usr/local/bin/clang++ -g -dynamiclib -Wl,-headerpad_max_install_names -o libradolan.dylib -install_name /Users/simon/Projects/Meteo/Ertel/netbeans_workspace/meanie3d/radolan/libradolan.dylib CMakeFiles/radolan.dir/src/read.c.o CMakeFiles/radolan.dir/src/coordinatesystem.cpp.o CMakeFiles/radolan.dir/src/radolan_utils.cpp.o CMakeFiles/radolan.dir/src/observationfile.cpp.o CMakeFiles/radolan.dir/src/shapefile.cpp.o /usr/lib/libz.dylib /usr/local/lib/libhdf5.dylib /usr/local/lib/libhdf5_hl.dylib /usr/local/lib/libshp.dylib /usr/local/lib/libnetcdf_c++4.dylib /usr/local/lib/libnetcdf.dylib Undefined symbols for architecture x86_64: "ZNKSs5c_strEv", referenced from: __ZN7Radolan17RDObservationFileC2ENS_10RDScanTypeE in observationfile.cpp.o ZN7Radolan17RDObservationFile10reportRainEffll in observationfile.cpp.o "ZNKSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv", referenced from: ZN7Radolan17RDObservationFileC2ENS_10RDScanTypeE in observationfile.cpp.o __ZN7Radolan17RDObservationFile10reportRainEffll in observationfile.cpp.o ...

Obviously it has found the header files, but the stdlibc++ symbols are not resolved. Also adding -lstdc++ does not help, indicating that the built-in search paths do not resolve to the correct library. Which is why I tried to resolve a path to the correct stdc++ library in the first place. Got more ideas?

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

JuergenSimon commented 9 years ago

Thanks a lot, Alexey. I tried your suggestion but the result is the same. Unresolved symbols from C++ standard library:

/usr/local/bin/clang++ -lstdc++ -g -dynamiclib -Wl,-headerpad_max_install_names   -o libradolan.dylib -install_name /Users/simon/Projects/Meteo/Ertel/netbeans_workspace/meanie3d/radolan/libradolan.dylib CMakeFiles/radolan.dir/src/read.c.o CMakeFiles/radolan.dir/src/coordinatesystem.cpp.o CMakeFiles/radolan.dir/src/radolan_utils.cpp.o CMakeFiles/radolan.dir/src/observationfile.cpp.o CMakeFiles/radolan.dir/src/shapefile.cpp.o /usr/lib/libz.dylib /usr/local/lib/libhdf5.dylib /usr/local/lib/libhdf5_hl.dylib /usr/local/lib/libshp.dylib /usr/local/lib/libnetcdf_c++4.dylib /usr/local/lib/libnetcdf.dylib 
Undefined symbols for architecture x86_64:
  "__ZNKSs5c_strEv", referenced from:
      __ZN7Radolan17RDObservationFileC2ENS_10RDScanTypeE in observationfile.cpp.o
      __ZN7Radolan17RDObservationFile10reportRainEffll in observationfile.cpp.o
  "__ZNKSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv", referenced from:
      __ZN7Radolan17RDObservationFileC2ENS_10RDScanTypeE in observationfile.cpp.o
      __ZN7Radolan17RDObservationFile10reportRainEffll in observationfile.cpp.o
  "__ZNKSt9basic_iosIcSt11char_traitsIcEEntEv", referenced from:
      __ZN7Radolan17RDObservationFileC2ENS_10RDScanTypeE in observationfile.cpp.o
...
alexey-bataev commented 9 years ago

Hmm, your clang should not pass

-lstdc++

option, instead it must use -lc++.

Best regards,

Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

06.11.2014 11:10, Jürgen Lorenz Simon пишет:

Thanks a lot, Alexey. I tried your suggestion but the result is the same. Unresolved symbols from C++ standard library:

/usr/local/bin/clang++ -lstdc++ -g -dynamiclib -Wl,-headerpad_max_install_names -o libradolan.dylib -install_name /Users/simon/Projects/Meteo/Ertel/netbeans_workspace/meanie3d/radolan/libradolan.dylib CMakeFiles/radolan.dir/src/read.c.o CMakeFiles/radolan.dir/src/coordinatesystem.cpp.o CMakeFiles/radolan.dir/src/radolan_utils.cpp.o CMakeFiles/radolan.dir/src/observationfile.cpp.o CMakeFiles/radolan.dir/src/shapefile.cpp.o /usr/lib/libz.dylib /usr/local/lib/libhdf5.dylib /usr/local/lib/libhdf5_hl.dylib /usr/local/lib/libshp.dylib /usr/local/lib/libnetcdf_c++4.dylib /usr/local/lib/libnetcdf.dylib Undefined symbols for architecture x86_64: "ZNKSs5c_strEv", referenced from: __ZN7Radolan17RDObservationFileC2ENS_10RDScanTypeE in observationfile.cpp.o ZN7Radolan17RDObservationFile10reportRainEffll in observationfile.cpp.o "ZNKSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv", referenced from: ZN7Radolan17RDObservationFileC2ENS_10RDScanTypeE in observationfile.cpp.o ZN7Radolan17RDObservationFile10reportRainEffll in observationfile.cpp.o "ZNKSt9basic_iosIcSt11char_traitsIcEEntEv", referenced from: __ZN7Radolan17RDObservationFileC2ENS_10RDScanTypeE in observationfile.cpp.o ...

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

JuergenSimon commented 9 years ago

Really? I thought that only applies if you're targeting c++11? As far as I know my project is still c++0x. Be that as it may: I found the mistake: before your advise on how to build clang, I had the problem that the c++ standard headers were not found. Thus I added to my project's cmake script a line that created the following include flag:

-I/usr/include/c++/4.2.1

This is apparently wrong, as the headers clang was compiled with seem to be somewhere in ${CLANG_ROOT}. I removed this statement and the -lstdc++ and clang++ works as expected now. To recap for anyone who runs into problems with the Xcode 6.1 update: the cmake statement Alexey gave above works:

cmake -DC_INCLUDE_DIRS="$CLANG_ROOT/usr/include/c++/v1:$CLANG_ROOT/usr/include:/usr/include" -DLLVM_ENABLE_LIBCXX=ON -DCMAKE_BUILD_TYPE=Release ../llvm

Thank you again for your support.

alexey-bataev commented 9 years ago

libstdc++ was removed in latest MacOS/XCode releases, now there is only libc++. It musty be used in all C++ modes, including C++11, C++0x, etc.

Best regards,

Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

06.11.2014 12:13, Jürgen Lorenz Simon пишет:

Really? I thought that only applies if you're targeting c++11? As far as I know my project is still c++0x. Be that as it may: I found the mistake: before your advise on how to build clang, I had the problem that the c++ standard headers were not found. Thus I added to my project's cmake script a line that created the following include flag:

-I/usr/include/c++/4.2.1

This is apparently wrong, as the headers clang was compiled with seem to be somewhere in ${CLANG_ROOT}. I removed this statement and the -lstdc++ and clang++ works as expected now. To recap for anyone who runs into problems with the Xcode 6.1 update: the cmake statement Alexey gave above works:

cmake -DC_INCLUDE_DIRS="$CLANG_ROOT/usr/include/c++/v1:$CLANG_ROOT/usr/include:/usr/include" -DLLVM_ENABLE_LIBCXX=ON -DCMAKE_BUILD_TYPE=Release ../llvm

Thank you again for your support.

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

JuergenSimon commented 9 years ago

If I use that, I get a warning about linker output not being used. When did this change exactly?

alexey-bataev commented 9 years ago

I don't remember precisely, maybe when they released 10.9 and XCode5. Apple dropped support for libstdc++ as it is very old and switched to libc++ .

Best regards,

Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

06.11.2014 12:30, Jürgen Lorenz Simon пишет:

If I use that, I get a warning about linker output not being used. When did this change exactly?

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

programminggit commented 9 years ago

Helo JuergenSimon,

I'm encountering the same issue as you on Yosemite using Xcode 6.1.1

I replaced Xcode clang with the openmp-clang and have working openmp test code.

However, attempting to compile boost 1_49_0 with it (./b2 install) I ran into problems of libc++ headers not being found. The libc++ headers exist in the Xcode 6.1.1 package but I haven't found a way to tell clang-openmp to look in that location for the headers and no options to pass to ./b2 this header path. I tried exporting CPATH & CPLUS_PATH but this didn't help.

I'm wondering if I should revert to vanilla clang to compile boost and then switch it back to clang-openmp for application development.

Did you succeed in compiling boost with clang-openmp ?

Regards

Peter Clark

alexey-bataev commented 9 years ago

Peter, try to build clang-omp with the following commands:

export CLANG_ROOT=ls -1d $(dirname $(xcrun -find clang))/../.. cmake -DC_INCLUDE_DIRS="$CLANG_ROOT/usr/include/c++/v1:$CLANG_ROOT/usr/include:/usr/include" -DLLVM_ENABLE_LIBCXX=ON -DCMAKE_BUILD_TYPE=Release ../llvm

Best regards,

Alexey Bataev

Software Engineer Intel Compiler Team Intel Corp.

10.01.2015 15:03, peterashleyclark пишет:

Helo JuergenSimon,

I'm encountering the same issue as you on Yosemite using Xcode 6.1.1

I replaced Xcode clang with the openmp-clang and have working openmp test code.

However, attempting to compile boost 1_49_0 with it (./b2 install) I ran into problems of libc++ headers not being found. The libc++ headers exist in the Xcode 6.1.1 package but I haven't found a way to tell clang-openmp to look in that location for the headers and no options to pass to ./b2 this header path. I tried exporting CPATH & CPLUS_PATH but this didn't help.

I'm wondering if I should revert to vanilla clang to compile boost and then switch it back to clang-openmp for application development.

Did you succeed in compiling boost with clang-openmp ?

Regards

Peter Clark

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

DelightRun commented 9 years ago

Hi guys, it seems i got the same problem:

Undefined symbols for architecture x86_64: "ZNKSt316locale9use_facetERNS0_2idE", referenced from: ZNSt3113basic_ostreamIcNS_11char_traitsIcEEElsEi in extractor.cpp.o ZNSt314endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0EES7 in extractor.cpp.o ZNSt3113basic_ostreamIcNS_11char_traitsIcEEElsEj in extractor.cpp.o ZNSt3124put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in extractor.cpp.o "ZNKSt318ios_base6getlocEv", referenced from: ZNSt3113basic_ostreamIcNS_11char_traitsIcEEElsEi in extractor.cpp.o ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0EES7 in extractor.cpp.o ZNSt3113basic_ostreamIcNS_11char_traitsIcEEElsEj in extractor.cpp.o

......

programminggit commented 9 years ago

I didn't use brew but compiled the custom clang-omp compiler on mavericks and yosemite by following the steps defined at http://clang-omp.github.io

I had to add in an extra step to compile in libc++ support as follows:

On the Clang / OpenMP page (http://clang-omp.github.io/) it asks you to download the following:-

$ 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

If you want to include c++11 support you should also download:- $git clone https://github.com/llvm-mirror/libcxx llvm/projects/libcxx

[If you take a look in the CMakeCache.txt file you can see that libcxx source code is expected in the folder pointed to by LLVM_EXTERNAL_LIBCXX_SOURCE_DIR.]

*Note. I had to make a slight modification to the build instructions referred to in Kyle Halladays OSX Mavericks instructions, replacing: ../configure --enable-optimized with ../configure --enable-optimized CC=/usr/bin/clang CXX=/usr/bin/clang++

Hope this helps - good luck!

DelightRun commented 9 years ago

Thanks, but I fix it..Should add -lc++