Ashok Nalkund
2012-Jun-26 02:22 UTC
[LLVMdev] Error compiling llvm/clang with clang+libc++ with -std=cxx0x
Hi All, I'm using LLVM/Clang 3.1 release. I first compiled llvm/clang using GCC per the instructions on the web with cmake. I then compiled libc++ per the instructions on the web. I then tried to compile llvm/clang with previously compiled clang and libc++ using "-std=c++0x -stdlib=libc++" flags. But the compilation fails at:> [ 58%] Building CXX object tools/bugpoint/CMakeFiles/bugpoint.dir/ToolRunner.cpp.o > clang-3: warning: argument unused during compilation: '-stdlib=libc++' > clang-3: warning: argument unused during compilation: '-L/local/mnt/workspace/ashoknn/519_libcxx_transition/llvm/build/../../libcxx.artifacts/linux-clang/lib' > /local/mnt/workspace/ashoknn/519_libcxx_transition/llvm/src/tools/bugpoint/ToolRunner.cpp:131:12: error: invalid operands to binary expression ('llvm::raw_ostream' and 'std::ostringstream' > (aka 'basic_ostringstream<char>')) > errs() << OS; > ~~~~~~ ^ ~~If I remove the -std=c++0x, then the compilation is successful. I checked to see if libc++ itself was compiled with the flag and indeed it was. Any pointers? TIA, Ashok
Dimitry Andric
2012-Jun-26 08:30 UTC
[LLVMdev] Error compiling llvm/clang with clang+libc++ with -std=cxx0x
On 2012-06-26 04:22, Ashok Nalkund wrote: ...>> /local/mnt/workspace/ashoknn/519_libcxx_transition/llvm/src/tools/bugpoint/ToolRunner.cpp:131:12: error: invalid operands to binary expression ('llvm::raw_ostream' and 'std::ostringstream' >> (aka 'basic_ostringstream<char>')) >> errs() << OS; >> ~~~~~~ ^ ~~ >Hi Ashok, please try applying this diff from r155978 to your 3.1 release tree: --- llvm/trunk/tools/bugpoint/ToolRunner.cpp 2012/05/02 05:31:31 155977 +++ llvm/trunk/tools/bugpoint/ToolRunner.cpp 2012/05/02 05:39:10 155978 @@ -128,7 +128,7 @@ ErrorFile.close(); } - errs() << OS; + errs() << OS.str(); } return ReturnCode;
Ashok Nalkund
2012-Jun-26 16:54 UTC
[LLVMdev] Error compiling llvm/clang with clang+libc++ with -std=cxx0x
Thanks Dimitry. That worked. I see some warnings in my compilations:> Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/IntEqClasses.cpp.o > [ 2%] clang-3: warning: argument unused during compilation: '-nostdinc++' > Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/IntrusiveRefCntPtr.cpp.o > clang-3: warning: argument unused during compilation: '-stdlib=libc++'Is that expected? I'm using both -stdlib=libc++ and -std=cxx0x. I dont see them when I used just -stdlib=libc++ flag. Thanks, Ashok On 6/26/2012 1:30 AM, Dimitry Andric wrote:> On 2012-06-26 04:22, Ashok Nalkund wrote: > ... >>> /local/mnt/workspace/ashoknn/519_libcxx_transition/llvm/src/tools/bugpoint/ToolRunner.cpp:131:12: error: invalid operands to binary expression ('llvm::raw_ostream' and 'std::ostringstream' >>> (aka 'basic_ostringstream<char>')) >>> errs() << OS; >>> ~~~~~~ ^ ~~ >> > > Hi Ashok, please try applying this diff from r155978 to your 3.1 release tree: > > --- llvm/trunk/tools/bugpoint/ToolRunner.cpp 2012/05/02 05:31:31 155977 > +++ llvm/trunk/tools/bugpoint/ToolRunner.cpp 2012/05/02 05:39:10 155978 > @@ -128,7 +128,7 @@ > ErrorFile.close(); > } > > - errs() << OS; > + errs() << OS.str(); > } > > return ReturnCode; >
Seemingly Similar Threads
- [LLVMdev] Error compiling llvm/clang with clang+libc++ with -std=cxx0x
- [LLVMdev] Error compiling llvm/clang with clang+libc++ with -std=cxx0x
- [LLVMdev] [PATCH] bugpoint to escalate remote client return status 255
- [LLVMdev] ToolRunner.cpp:396: error: `SHLIBEXT' undeclared (first use this function)
- [LLVMdev] ToolRunner.cpp:396: error: `SHLIBEXT' undeclared (firstuse this function)