
Cygwin has been shipping clang for six months or so. Has anyone gotten the cygwin/clang distribution (or any other clang distribution) to build boost? What toolset did you use? What does your user-config.jam file look like? Do you run bjam/b2 from the Windows command line or the bash command line? Thanks, --Beman

On 10/22/2012 12:25 PM, Beman Dawes wrote:
Cygwin has been shipping clang for six months or so. Has anyone gotten the cygwin/clang distribution (or any other clang distribution) to build boost?
What toolset did you use?
What does your user-config.jam file look like?
Do you run bjam/b2 from the Windows command line or the bash command line?
I build clang from source on cygwin and use that. I like to track their upstream closely since they quickly fix the bugs I report. My user-config.jam has this: using clang : : /usr/local/bin/clang++ : <compileflags>-std=gnu++11 ; Then I run bjam from bash. Works ok, but clang has a long-ish startup time under cygwin. Several seconds per TU. HTH, -- Eric Niebler BoostPro Computing http://www.boostpro.com

On Mon, Oct 22, 2012 at 3:07 PM, Eric Niebler <eric@boostpro.com> wrote:
Cygwin has been shipping clang for six months or so. Has anyone gotten the cygwin/clang distribution (or any other clang distribution) to build boost?
What toolset did you use?
What does your user-config.jam file look like?
Do you run bjam/b2 from the Windows command line or the bash command
On 10/22/2012 12:25 PM, Beman Dawes wrote: line?
I build clang from source on cygwin and use that. I like to track their upstream closely since they quickly fix the bugs I report. My user-config.jam has this:
using clang : : /usr/local/bin/clang++ : <compileflags>-std=gnu++11 ;
Then I run bjam from bash. Works ok, but clang has a long-ish startup time under cygwin. Several seconds per TU.
Have you tried building a statically linked version? I had this problem not under cygwin but under MSys - building a statically linked clang fixed it.
HTH,
-- Eric Niebler BoostPro Computing http://www.boostpro.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- chris

n 10/22/2012 8:53 PM, Chris Glover wrote:
On Mon, Oct 22, 2012 at 3:07 PM, Eric Niebler wrote:
Works ok, but clang has a long-ish startup time under cygwin. Several seconds per TU.
Have you tried building a statically linked version? I had this problem not under cygwin but under MSys - building a statically linked clang fixed it.
Someone else suggested this to me recently, so I tried to figure out what parameters I needed to pass to configure, but failed. Any hints? -- Eric Niebler BoostPro Computing http://www.boostpro.com

On Tue, Oct 23, 2012 at 8:52 AM, Eric Niebler <eric@boostpro.com> wrote:
Someone else suggested this to me recently, so I tried to figure out what parameters I needed to pass to configure, but failed. Any hints?
A hint yes, because I've not actually had success using the configure script under MSYS - I instead use cmake. What I pass to cmake is the following; -DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -static-libgcc --disable-shared --enable-static" -DCMAKE_SHARED_LINKER_FLAGS="-static-libstdc++ -static-libgcc --disable-shared --enable-static" Maybe something similar (or even the same) to LDFLAGS? I don't remember where I originally got this from, but some googling shows the same options listed on the clang_complete wiki. -- chris

On 10/22/2012 8:53 PM, Chris Glover wrote:
On Mon, Oct 22, 2012 at 3:07 PM, Eric Niebler <eric@boostpro.com> wrote:
I build clang from source on cygwin and use that. I like to track their upstream closely since they quickly fix the bugs I report. My user-config.jam has this:
using clang : : /usr/local/bin/clang++ : <compileflags>-std=gnu++11 ;
Then I run bjam from bash. Works ok, but clang has a long-ish startup time under cygwin. Several seconds per TU.
Have you tried building a statically linked version? I had this problem not under cygwin but under MSys - building a statically linked clang fixed it.
Following up on this. I don't know what changed recently, but the performance of my clang under cygwin has improved dramatically. I have updated cygwin and rebuilt clang from scratch. I didn't do anything specifically to switch to a statically linked cygwin. I haven't investigated. Guess: perhaps the cygwin upgrade caused a rebaseall? Happy camper, -- Eric Niebler BoostPro Computing http://www.boostpro.com

On Tue, Oct 23, 2012 at 6:25 AM, Beman Dawes <bdawes@acm.org> wrote:
Cygwin has been shipping clang for six months or so. Has anyone gotten the cygwin/clang distribution (or any other clang distribution) to build boost?
What toolset did you use?
What does your user-config.jam file look like?
Do you run bjam/b2 from the Windows command line or the bash command line?
Thanks,
--Beman
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
I do not use cygwin, however I have successfully been building and using Boost with Clang on Windows using the toolchain provided by rubenvb over at the Mingw-w64 project: http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Wi... My user-config.jam is empty. I compile with the following command line (windows command line):
set OLDCD=%CD% pushd %BOOST_ROOT% set OLDPATH=%PATH% set PATH=%MINGW32_CLANG%;%MINGW32_CLANG%\bin\;%PATH% b2 -j %NUMBER_OF_PROCESSORS% toolset=clang cxxflags=-std=c++11 address-model=32 architecture=x86 --stagedir=stage/clang-x86 link=static runtime-link=static threading=multi debug-symbols=on define=WINVER=_WIN32_WINNT_VISTA define=_WIN32_WINNT=_WIN32_WINNT_VISTA stage > %OLDCD%\clang32.txt set PATH=%OLDPATH% popd
Unfortunately Boost is detecting the compiler as "clang.linux", but other than that it seems to work for the most part. The stuff that doesn't work: * Boost.Context (it fails to assemble its assembler files) * Boost.Math (it attempts an 'rm' command, I assume because it thinks it's on *nix) * Boost.Python (the same ::hypot error that also plagues GCC in C++11 mode) Most everything else seems to work okay (though I have to use pragmas to disable a LOT of warnings when including boost headers, though that may simply be because I have all warnings enabled). Clang support on Windows still needs a lot of work (Ruben tells me that there's about half a person working on it on the Clang side), but perhaps some interest from the Boost community would help drive some more investment into the platform?

On 27/10/12 04:42, Joshua Boyce wrote:
* Boost.Python (the same ::hypot error that also plagues GCC in C++11 mode)
A C99, C++11 or POSIX implementation that does not provide hypot is non-conforming. So it's a matter of working around defects. It's probably due to reliance on Microsoft's libc, which doesn't have this symbol defined (though it does have it as _hypot).

* Boost.Python (the same ::hypot error that also plagues GCC in C++11 mode)
A C99, C++11 or POSIX implementation that does not provide hypot is non-conforming.
So it's a matter of working around defects. It's probably due to reliance on Microsoft's libc, which doesn't have this symbol defined (though it does have it as _hypot).
Right, but remember there is is no ::hypot in C++11, only std::hypot. John.

On Sun, Oct 28, 2012 at 2:38 AM, John Maddock <boost.regex@virgin.net>wrote:
* Boost.Python (the same ::hypot error that also plagues GCC in C++11
mode)
A C99, C++11 or POSIX implementation that does not provide hypot is non-conforming.
So it's a matter of working around defects. It's probably due to reliance on Microsoft's libc, which doesn't have this symbol defined (though it does have it as _hypot).
Right, but remember there is is no ::hypot in C++11, only std::hypot.
John.
______________________________**_________________ Unsubscribe & other changes: http://lists.boost.org/** mailman/listinfo.cgi/boost<http://lists.boost.org/mailman/listinfo.cgi/boost>
I had this issue a long time ago, and the answer I received at the time was: http://boost.2283326.n4.nabble.com/Boost-Python-Compile-Error-s-GCC-via-MinG... It's Python. Out-of-the-box Python 2.7 pyconfig.h on Windows defines
hypot as _hypot which subsequently cripples the declaration of hypot in <math.h> and ultimately breaks the using declaration in <cmath> .
A simple fix is to include <cmath> before including <boost/python.hpp> . Other than that, you may try configuring python yourself via autoreconf.

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Joshua Boyce Sent: Saturday, October 27, 2012 3:42 AM To: boost@lists.boost.org Subject: Re: [boost] [clang] Windows toolset support?
On Tue, Oct 23, 2012 at 6:25 AM, Beman Dawes <bdawes@acm.org> wrote:
Cygwin has been shipping clang for six months or so. Has anyone gotten the cygwin/clang distribution (or any other clang distribution) to build boost?
What toolset did you use?
What does your user-config.jam file look like?
Do you run bjam/b2 from the Windows command line or the bash command line?
I do not use cygwin, however I have successfully been building and using Boost with Clang on Windows using the toolchain provided by rubenvb over at the Mingw-w64 project: http://sourceforge.net/projects/mingw- w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/clang-3.1-release/
My user-config.jam is empty.
I compile with the following command line (windows command line):
set OLDCD=%CD% pushd %BOOST_ROOT% set OLDPATH=%PATH% set PATH=%MINGW32_CLANG%;%MINGW32_CLANG%\bin\;%PATH% b2 -j %NUMBER_OF_PROCESSORS% toolset=clang cxxflags=-std=c++11 address-model=32 architecture=x86 --stagedir=stage/clang-x86 link=static runtime-link=static threading=multi debug-symbols=on define=WINVER=_WIN32_WINNT_VISTA define=_WIN32_WINNT=_WIN32_WINNT_VISTA stage > %OLDCD%\clang32.txt set PATH=%OLDPATH% popd
Unfortunately Boost is detecting the compiler as "clang.linux", but other than that it seems to work for the most part.
The stuff that doesn't work: * Boost.Context (it fails to assemble its assembler files) * Boost.Math (it attempts an 'rm' command, I assume because it thinks it's on *nix) * Boost.Python (the same ::hypot error that also plagues GCC in C++11 mode)
Most everything else seems to work okay (though I have to use pragmas to disable a LOT of warnings when including boost headers, though that may simply be because I have all warnings enabled).
Clang support on Windows still needs a lot of work (Ruben tells me that there's about half a person working on it on the Clang side), but perhaps some interest from the Boost community would help drive some more investment into the platform?
This sounds rather promising. Having got Ruben's mingw gcc binary to work nicely with NetBeans, I tried to use Ruben's Clang binary, but I haven't got this configured right yet. Since NetBeans provides a nice IDE on Windows, I'm sure there will be lots of enthusiasm from Boosters to be able to use this compiler. Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Paul A. Bristow Sent: Monday, October 29, 2012 9:34 AM To: boost@lists.boost.org Subject: Re: [boost] [clang] Windows toolset support?
On Tue, Oct 23, 2012 at 6:25 AM, Beman Dawes <bdawes@acm.org> wrote:
Cygwin has been shipping clang for six months or so. Has anyone gotten the cygwin/clang distribution (or any other clang distribution) to build boost?
What toolset did you use?
What does your user-config.jam file look like?
Do you run bjam/b2 from the Windows command line or the bash command line?
I do not use cygwin, however I have successfully been building and using Boost with Clang on Windows using the toolchain provided by rubenvb over at the Mingw-w64 project: http://sourceforge.net/projects/mingw- w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/cl ang-3.1-release/
My user-config.jam is empty.
I compile with the following command line (windows command line):
set OLDCD=%CD% pushd %BOOST_ROOT% set OLDPATH=%PATH% set PATH=%MINGW32_CLANG%;%MINGW32_CLANG%\bin\;%PATH% b2 -j %NUMBER_OF_PROCESSORS% toolset=clang cxxflags=-std=c++11 address-model=32 architecture=x86 --stagedir=stage/clang-x86 link=static runtime-link=static threading=multi debug-symbols=on define=WINVER=_WIN32_WINNT_VISTA define=_WIN32_WINNT=_WIN32_WINNT_VISTA stage > %OLDCD%\clang32.txt set PATH=%OLDPATH% popd
Unfortunately Boost is detecting the compiler as "clang.linux", but other than that it seems to work for the most part.
The stuff that doesn't work: * Boost.Context (it fails to assemble its assembler files) * Boost.Math (it attempts an 'rm' command, I assume because it thinks it's on *nix) * Boost.Python (the same ::hypot error that also plagues GCC in C++11 mode)
Most everything else seems to work okay (though I have to use pragmas to disable a LOT of warnings when including boost headers, though that may simply be because I have all warnings enabled).
Clang support on Windows still needs a lot of work (Ruben tells me that there's about half a person working on it on the Clang side), but perhaps some interest from the Boost community would help drive some more investment into the platform?
This sounds rather promising.
Having got Ruben's mingw gcc binary to work nicely with NetBeans, I tried to use Ruben's Clang binary, but I haven't got this configured right yet. Since NetBeans provides a nice IDE on Windows, I'm sure there will be lots of enthusiasm from Boosters to be able to use this compiler.
But I am now trying to build the Boost libraries using the mingw. After some googling, I've added # Clang compiler using mingw32 dw2 Ruben's release. using clang : 3.1 : "C:/mingw32-dw2/bin/clang++.exe" : # <cxxflags>-std="c++11" <cxxflags>-v # diagnostics <cflags>-nostdinc # Do not include MSVC C headers. <cxxflags>-nostdinc++ # Do not include MSVC C++ headers. # Instead use mingw-dw2 for includes <cxxflags>-cxx-include-arch="C:/mingw32-dw2/i686-w64-mingw32" <cxxflags>-cxx-include-root="C:/mingw32-dw2/include/c++/4.6.3" <cxxflags>-cxx-include-32bit-dir=32 <cxxflags>-stdlib=libc++ <linkflags>-stdlib=libc++ ; # includes like <cstddef.h> are at C:\mingw32-dw2\include\c++\4.6.3 to my user_config.jam with this results compile.c++.without-pth i:\boost-trunk\boost\bin.v2\libs\test\build\clang-linux-3.1\debug\threading-multi\execution_monitor. obj clang version 3.1 (tags/RELEASE_31/final 161181) (llvm/tags/RELEASE_31/final 161243) Target: i686-w64-mingw32 Thread model: posix "C:/mingw32-dw2/bin/clang++.exe" -cc1 -triple i686-w64-mingw32 -S -disable-free -disable-llvm-verifier -main-file-name execution_monitor.cpp -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.22.0.20120323 -momit-leaf-frame-pointer -v -g -coverage-file C:/Users/Paul/AppData/Local/Temp/execution_monitor-536331.s -nostdinc++ -resource-dir "C:/mingw32-dw2/bin\\..\\lib\\clang\\3.1" -D BOOST_ALL_NO_LIB=1 -D BOOST_TEST_DYN_LINK=1 -I . -fmodule-cache-path "C:\\Users\\Paul\\AppData\\Local\\Temp\\clang-module-cache" -stdlib=libc++ -O0 -Wall -pedantic -fdeprecated-macro -fno-dwarf-directory-asm -ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-use-cxa-atexit -fno-inline -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o C:/Users/Paul/AppData/Local/Temp/execution_monitor-536331.s -x c++ "libs\\test\\src\\execution_monitor.cpp" clang -cc1 version 3.1 based upon LLVM 3.1 default target i686-w64-mingw32 ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "C:/mingw32-dw2/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include" ignoring nonexistent directory "/mingw/include" ignoring nonexistent directory "/usr/include" #include "..." search starts here: #include <...> search starts here: . C:/mingw32-dw2/bin/../lib/clang/3.1/include C:/mingw32-dw2/bin/../lib/clang/3.1/../../../i686-w64-mingw32/include C:/mingw32-dw2/bin/../lib/clang/3.1/../../../include c:/mingw/include End of search list. In file included from libs\test\src\execution_monitor.cpp:16: In file included from .\boost/test/impl/execution_monitor.ipp:28: In file included from .\boost/test/detail/config.hpp:19: In file included from .\boost/config.hpp:40: .\boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found # include <cstddef> ^ 1 error generated.

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Paul A. Bristow Sent: Monday, November 05, 2012 5:11 PM To: boost@lists.boost.org Subject: Re: [boost] [clang] Windows toolset support?
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Paul A. Bristow Sent: Monday, October 29, 2012 9:34 AM To: boost@lists.boost.org Subject: Re: [boost] [clang] Windows toolset support?
On Tue, Oct 23, 2012 at 6:25 AM, Beman Dawes <bdawes@acm.org> wrote:
Cygwin has been shipping clang for six months or so. Has anyone gotten the cygwin/clang distribution (or any other clang distribution) to build boost?
What toolset did you use?
What does your user-config.jam file look like?
Do you run bjam/b2 from the Windows command line or the bash command line?
I do not use cygwin, however I have successfully been building and using Boost with Clang on Windows using the toolchain provided by rubenvb over at the Mingw-w64 project: http://sourceforge.net/projects/mingw- w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/ cl ang-3.1-release/
My user-config.jam is empty.
I compile with the following command line (windows command line):
set OLDCD=%CD% pushd %BOOST_ROOT% set OLDPATH=%PATH% set PATH=%MINGW32_CLANG%;%MINGW32_CLANG%\bin\;%PATH% b2 -j %NUMBER_OF_PROCESSORS% toolset=clang cxxflags=-std=c++11 address-model=32 architecture=x86 --stagedir=stage/clang-x86 link=static runtime-link=static threading=multi debug-symbols=on define=WINVER=_WIN32_WINNT_VISTA define=_WIN32_WINNT=_WIN32_WINNT_VISTA stage > %OLDCD%\clang32.txt set PATH=%OLDPATH% popd
Unfortunately Boost is detecting the compiler as "clang.linux", but other than that it seems to work for the most part.
The stuff that doesn't work: * Boost.Context (it fails to assemble its assembler files) * Boost.Math (it attempts an 'rm' command, I assume because it thinks it's on *nix) * Boost.Python (the same ::hypot error that also plagues GCC in C++11 mode)
Most everything else seems to work okay (though I have to use pragmas to disable a LOT of warnings when including boost headers, though that may simply be because I have all warnings enabled).
Clang support on Windows still needs a lot of work (Ruben tells me that there's about half a person working on it on the Clang side), but perhaps some interest from the Boost community would help drive some more investment into the platform?
This sounds rather promising.
Having got Ruben's mingw gcc binary to work nicely with NetBeans, I tried to use Ruben's Clang binary, but I haven't got this configured right yet. Since NetBeans provides a nice IDE on Windows, I'm sure there will be lots of enthusiasm from Boosters to be able to use this compiler.
But I am now trying to build the Boost libraries using the mingw.
After some googling, I've added
# Clang compiler using mingw32 dw2 Ruben's release. using clang : 3.1 : "C:/mingw32-dw2/bin/clang++.exe" : # <cxxflags>-std="c++11" <cxxflags>-v # diagnostics <cflags>-nostdinc # Do not include MSVC C headers. <cxxflags>-nostdinc++ # Do not include MSVC C++ headers. # Instead use mingw-dw2 for includes <cxxflags>-cxx-include-arch="C:/mingw32-dw2/i686-w64-mingw32" <cxxflags>-cxx-include-root="C:/mingw32-dw2/include/c++/4.6.3" <cxxflags>-cxx-include-32bit-dir=32 <cxxflags>-stdlib=libc++ <linkflags>-stdlib=libc++ ;
# includes like <cstddef.h> are at C:\mingw32-dw2\include\c++\4.6.3
to my user_config.jam with this results
compile.c++.without-pth
i:\boost-trunk\boost\bin.v2\libs\test\build\clang-linux-3.1\debug\threading-multi\execution_monitor.
obj clang version 3.1 (tags/RELEASE_31/final 161181) (llvm/tags/RELEASE_31/final 161243) Target: i686-w64-mingw32 Thread model: posix "C:/mingw32-dw2/bin/clang++.exe" -cc1 -triple i686-w64-mingw32 -S -disable-free -disable-llvm-verifier -main-file-name execution_monitor.cpp -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.22.0.20120323 -momit-leaf-frame-pointer -v -g -coverage-file C:/Users/Paul/AppData/Local/Temp/execution_monitor- 536331.s -nostdinc++ -resource-dir "C:/mingw32-dw2/bin\\..\\lib\\clang\\3.1" -D BOOST_ALL_NO_LIB=1 -D BOOST_TEST_DYN_LINK=1 -I . -fmodule-cache-path "C:\\Users\\Paul\\AppData\\Local\\Temp\\clang-module-cache" -stdlib=libc++ -O0 -Wall -pedantic -fdeprecated-macro -fno-dwarf-directory-asm -ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-use-cxa-atexit -fno-inline -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has- weak -fobjc-fragile-abi -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o C:/Users/Paul/AppData/Local/Temp/execution_monitor-536331.s -x c++ "libs\\test\\src\\execution_monitor.cpp" clang -cc1 version 3.1 based upon LLVM 3.1 default target i686-w64-mingw32 ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "C:/mingw32-dw2/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include" ignoring nonexistent directory "/mingw/include" ignoring nonexistent directory "/usr/include" #include "..." search starts here: #include <...> search starts here: . C:/mingw32-dw2/bin/../lib/clang/3.1/include C:/mingw32-dw2/bin/../lib/clang/3.1/../../../i686-w64-mingw32/include C:/mingw32-dw2/bin/../lib/clang/3.1/../../../include c:/mingw/include End of search list.
In file included from libs\test\src\execution_monitor.cpp:16: In file included from .\boost/test/impl/execution_monitor.ipp:28: In file included from .\boost/test/detail/config.hpp:19: In file included from .\boost/config.hpp:40: .\boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found # include <cstddef> ^ 1 error generated.
Oops! Sorry pressed the send button too soon! I suspect I am not passing the right include info. "ignoring nonexistent directory "C:/mingw32-dw2/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include" suggests that my absolute address has not been interpreted as I expected. Suggestions most welcome. Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com

On Tue, Nov 6, 2012 at 4:16 AM, Paul A. Bristow <pbristow@hetp.u-net.com>wrote:
Having got Ruben's mingw gcc binary to work nicely with NetBeans, I tried to use Ruben's Clang binary, but I haven't got this configured right yet. Since NetBeans provides a nice IDE on Windows, I'm sure there will be lots of enthusiasm from Boosters to be able to use this compiler.
But I am now trying to build the Boost libraries using the mingw.
After some googling, I've added
# Clang compiler using mingw32 dw2 Ruben's release. using clang : 3.1 : "C:/mingw32-dw2/bin/clang++.exe" : # <cxxflags>-std="c++11" <cxxflags>-v # diagnostics <cflags>-nostdinc # Do not include MSVC C headers. <cxxflags>-nostdinc++ # Do not include MSVC C++ headers. # Instead use mingw-dw2 for includes <cxxflags>-cxx-include-arch="C:/mingw32-dw2/i686-w64-mingw32" <cxxflags>-cxx-include-root="C:/mingw32-dw2/include/c++/4.6.3" <cxxflags>-cxx-include-32bit-dir=32 <cxxflags>-stdlib=libc++ <linkflags>-stdlib=libc++ ;
# includes like <cstddef.h> are at C:\mingw32-dw2\include\c++\4.6.3
to my user_config.jam with this results
compile.c++.without-pth
i:\boost-trunk\boost\bin.v2\libs\test\build\clang-linux-3.1\debug\threading-multi\execution_monitor.
obj clang version 3.1 (tags/RELEASE_31/final 161181) (llvm/tags/RELEASE_31/final 161243) Target: i686-w64-mingw32 Thread model: posix "C:/mingw32-dw2/bin/clang++.exe" -cc1 -triple i686-w64-mingw32 -S -disable-free -disable-llvm-verifier -main-file-name execution_monitor.cpp -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.22.0.20120323 -momit-leaf-frame-pointer -v -g -coverage-file C:/Users/Paul/AppData/Local/Temp/execution_monitor- 536331.s -nostdinc++ -resource-dir "C:/mingw32-dw2/bin\\..\\lib\\clang\\3.1" -D BOOST_ALL_NO_LIB=1 -D BOOST_TEST_DYN_LINK=1 -I . -fmodule-cache-path "C:\\Users\\Paul\\AppData\\Local\\Temp\\clang-module-cache" -stdlib=libc++ -O0 -Wall -pedantic -fdeprecated-macro -fno-dwarf-directory-asm -ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-use-cxa-atexit -fno-inline -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has- weak -fobjc-fragile-abi -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o C:/Users/Paul/AppData/Local/Temp/execution_monitor-536331.s -x c++ "libs\\test\\src\\execution_monitor.cpp" clang -cc1 version 3.1 based upon LLVM 3.1 default target i686-w64-mingw32 ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "C:/mingw32-dw2/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include" ignoring nonexistent directory "/mingw/include" ignoring nonexistent directory "/usr/include" #include "..." search starts here: #include <...> search starts here: . C:/mingw32-dw2/bin/../lib/clang/3.1/include C:/mingw32-dw2/bin/../lib/clang/3.1/../../../i686-w64-mingw32/include C:/mingw32-dw2/bin/../lib/clang/3.1/../../../include c:/mingw/include End of search list.
In file included from libs\test\src\execution_monitor.cpp:16: In file included from .\boost/test/impl/execution_monitor.ipp:28: In file included from .\boost/test/detail/config.hpp:19: In file included from .\boost/config.hpp:40: .\boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found # include <cstddef> ^ 1 error generated.
Oops! Sorry pressed the send button too soon!
I suspect I am not passing the right include info.
"ignoring nonexistent directory "C:/mingw32-dw2/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include"
suggests that my absolute address has not been interpreted as I expected.
Suggestions most welcome.
Paul
This is how I use Clang on Windows: user-config.jam / site-config.jam are both empty. I define my own environmental variables (for convenience) for my various MinGW installations. For Clang, I use MINGW32_CLANG. And of course I define BOOST_ROOT to point to my Boost dir. I build Boost using this batch file (after bootstrap):
set OLDCD=%CD% pushd %BOOST_ROOT% set OLDPATH=%PATH% set PATH=%MINGW32_CLANG%;%MINGW32_CLANG%\bin\;%PATH% b2 -j %NUMBER_OF_PROCESSORS% toolset=clang cxxflags=-std=c++11 address-model=32 architecture=x86 --stagedir=stage/clang-x86 link=static runtime-link=static threading=multi debug-symbols=on define=WINVER=_WIN32_WINNT_VISTA define=_WIN32_WINNT=_WIN32_WINNT_VISTA stage > %OLDCD%\clang32.txt set PATH=%OLDPATH% popd
Notice that I add "%MINGW32_CLANG%;%MINGW32_CLANG%\bin\;" to my PATH. I found that to be the only real important step (I'm sure you could achieve the same thing with user-config, but I find this to be easier). All I've done to 'install' Clang is extract both the GCC dw2 archive and the Clang archive to the same directory. Specifically, these two archives: http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Wi... http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Wi... I do add some other command line args (a workaround for a couple of linker errors, and enabling some extra warnings) when actually building my projects which consume Boost, but for actually building the Boost libraries I think the process above is all that needs to be done... Perhaps you could try scrapping all your user-config stuff, because I've found it to be unnecessary. Sorry I can't help you fix your specific configuration.

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Joshua Boyce Sent: Monday, November 05, 2012 5:35 PM To: boost@lists.boost.org Subject: Re: [boost] [clang] Windows toolset support?
On Tue, Nov 6, 2012 at 4:16 AM, Paul A. Bristow <pbristow@hetp.u-net.com>wrote:
Having got Ruben's mingw gcc binary to work nicely with NetBeans, I tried to use Ruben's Clang binary, but I haven't got this configured right yet. Since NetBeans provides a nice IDE on Windows, I'm sure there will be lots of enthusiasm from Boosters to be able to use this compiler.
But I am now trying to build the Boost libraries using the mingw.
After some googling, I've added
# Clang compiler using mingw32 dw2 Ruben's release. using clang : 3.1 : "C:/mingw32-dw2/bin/clang++.exe" : # <cxxflags>-std="c++11" <cxxflags>-v # diagnostics <cflags>-nostdinc # Do not include MSVC C headers. <cxxflags>-nostdinc++ # Do not include MSVC C++ headers. # Instead use mingw-dw2 for includes <cxxflags>-cxx-include-arch="C:/mingw32-dw2/i686-w64-mingw32" <cxxflags>-cxx-include-root="C:/mingw32-dw2/include/c++/4.6.3" <cxxflags>-cxx-include-32bit-dir=32 <cxxflags>-stdlib=libc++ <linkflags>-stdlib=libc++ ;
# includes like <cstddef.h> are at C:\mingw32-dw2\include\c++\4.6.3
to my user_config.jam with this results
compile.c++.without-pth
i:\boost-trunk\boost\bin.v2\libs\test\build\clang-linux-3.1\debug\threading-multi\execution_monitor.
obj clang version 3.1 (tags/RELEASE_31/final 161181) (llvm/tags/RELEASE_31/final 161243) Target: i686-w64-mingw32 Thread model: posix "C:/mingw32-dw2/bin/clang++.exe" -cc1 -triple i686-w64-mingw32 -S -disable-free -disable-llvm-verifier -main-file-name execution_monitor.cpp -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.22.0.20120323 -momit-leaf-frame-pointer -v -g -coverage-file C:/Users/Paul/AppData/Local/Temp/execution_monitor- 536331.s -nostdinc++ -resource-dir "C:/mingw32-dw2/bin\\..\\lib\\clang\\3.1" -D BOOST_ALL_NO_LIB=1 -D BOOST_TEST_DYN_LINK=1 -I . -fmodule-cache-path "C:\\Users\\Paul\\AppData\\Local\\Temp\\clang-module-cache" -stdlib=libc++ -O0 -Wall -pedantic -fdeprecated-macro -fno-dwarf-directory-asm -ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-use-cxa-atexit -fno-inline -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has- weak -fobjc-fragile-abi -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o C:/Users/Paul/AppData/Local/Temp/execution_monitor-536331.s -x c++ "libs\\test\\src\\execution_monitor.cpp" clang -cc1 version 3.1 based upon LLVM 3.1 default target i686-w64-mingw32 ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "C:/mingw32-dw2/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include" ignoring nonexistent directory "/mingw/include" ignoring nonexistent directory "/usr/include" #include "..." search starts here: #include <...> search starts here: . C:/mingw32-dw2/bin/../lib/clang/3.1/include C:/mingw32-dw2/bin/../lib/clang/3.1/../../../i686-w64-mingw32/include C:/mingw32-dw2/bin/../lib/clang/3.1/../../../include c:/mingw/include End of search list.
In file included from libs\test\src\execution_monitor.cpp:16: In file included from .\boost/test/impl/execution_monitor.ipp:28: In file included from .\boost/test/detail/config.hpp:19: In file included from .\boost/config.hpp:40: .\boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found # include <cstddef> ^ 1 error generated.
Oops! Sorry pressed the send button too soon!
I suspect I am not passing the right include info.
"ignoring nonexistent directory "C:/mingw32-dw2/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include"
suggests that my absolute address has not been interpreted as I expected.
Suggestions most welcome.
Paul
This is how I use Clang on Windows:
user-config.jam / site-config.jam are both empty.
I define my own environmental variables (for convenience) for my various MinGW installations. For Clang, I use MINGW32_CLANG. And of course I define BOOST_ROOT to point to my Boost dir.
I build Boost using this batch file (after bootstrap):
set OLDCD=%CD% pushd %BOOST_ROOT% set OLDPATH=%PATH% set PATH=%MINGW32_CLANG%;%MINGW32_CLANG%\bin\;%PATH% b2 -j %NUMBER_OF_PROCESSORS% toolset=clang cxxflags=-std=c++11 address-model=32 architecture=x86 --stagedir=stage/clang-x86 link=static runtime-link=static threading=multi debug-symbols=on define=WINVER=_WIN32_WINNT_VISTA define=_WIN32_WINNT=_WIN32_WINNT_VISTA stage > %OLDCD%\clang32.txt set PATH=%OLDPATH% popd
Notice that I add "%MINGW32_CLANG%;%MINGW32_CLANG%\bin\;" to my PATH. I found that to be the only real important step (I'm sure you could achieve the same thing with user-config, but I find this to be easier).
All I've done to 'install' Clang is extract both the GCC dw2 archive and the Clang archive to the same directory. Specifically, these two archives: http://sourceforge.net/projects/mingw- w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-dw2-4.6-release/i686- w64-mingw32-gcc-dw2-4.6.3-1-release-win32_rubenvb.7z/download http://sourceforge.net/projects/mingw- w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/clang-3.1-release/i686-w64- mingw32-clang-3.1-release-win32_rubenvb.7z/download
I do add some other command line args (a workaround for a couple of linker errors, and enabling some extra warnings) when actually building my projects which consume Boost, but for actually building the Boost libraries I think the process above is all that needs to be done... Perhaps you could try scrapping all your user-config stuff, because I've found it to be unnecessary.
For me Boost_root is boost-trunk and I'm using the same Ruben's downloads I believe so I've set MINGW32_CLANG=c:/mingw32-dw2 (And this download works OK with NetBeans - for hello world programs (I'll try building boost.test on that IDE next). I've clear out my user-config.jam for clang and tried to use your command line thus b2 -q -j %NUMBER_OF_PROCESSORS% toolset=clang cxxflags=-std=c++11 address-model=32 architecture=x86 --stagedir=stage/clang-x86 link=static runtime-link=static threading=multi debug-symbols=on define=WINVER=_WIN32_WINNT_WIN7 define=_WIN32_WINNT=_WIN32_WINNT_WIN7 stage --with-test > build_dll_libs_trunk_test_JB_%date%_%tim%.log 2>&1 which looks the same to me as yours, but trying to compile Boost.test (which I presume you also did) I get compile.c++.without-pth bin.v2\libs\test\build\clang-linux-3.1\debug\address-model-32\architecture-x86\link-static\runtime-l ink-static\threading-multi\cpp_main.obj In file included from libs\test\src\cpp_main.cpp:16: In file included from .\boost/test/impl/cpp_main.ipp:20: In file included from .\boost/test/execution_monitor.hpp:81: In file included from .\boost/detail/fenv.hpp:69: c:/mingw32-dw2/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\fenv.h:57:11: error: no member named 'fenv_t' in the global namespace using ::fenv_t; ~~^ c:/mingw32-dw2/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\fenv.h:58:11: error: no member named 'fexcept_t' in the global namespace using ::fexcept_t; ~~^ It was to overcome this that I added other options (and then I get problems finding cstddef. But I'm puzzled how your system works without - and how you don't seem to need to define tool clang? Thanks for your help so far - I'm sure it will be *really* useful to get many people able to use this compiler. But any other suggestions? Thanks Paul

On Wed, Nov 7, 2012 at 2:32 AM, Paul A. Bristow <pbristow@hetp.u-net.com>wrote:
For me Boost_root is boost-trunk
and I'm using the same Ruben's downloads I believe so I've
set MINGW32_CLANG=c:/mingw32-dw2
(And this download works OK with NetBeans - for hello world programs (I'll try building boost.test on that IDE next).
I've clear out my user-config.jam for clang and tried to use your command line thus
b2 -q -j %NUMBER_OF_PROCESSORS% toolset=clang cxxflags=-std=c++11 address-model=32 architecture=x86 --stagedir=stage/clang-x86 link=static runtime-link=static threading=multi debug-symbols=on define=WINVER=_WIN32_WINNT_WIN7 define=_WIN32_WINNT=_WIN32_WINNT_WIN7 stage --with-test > build_dll_libs_trunk_test_JB_%date%_%tim%.log 2>&1
which looks the same to me as yours, but trying to compile Boost.test (which I presume you also did) I get
compile.c++.without-pth
bin.v2\libs\test\build\clang-linux-3.1\debug\address-model-32\architecture-x86\link-static\runtime-l ink-static\threading-multi\cpp_main.obj In file included from libs\test\src\cpp_main.cpp:16: In file included from .\boost/test/impl/cpp_main.ipp:20: In file included from .\boost/test/execution_monitor.hpp:81: In file included from .\boost/detail/fenv.hpp:69: c:/mingw32-dw2/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\fenv.h:57:11: error: no member named 'fenv_t' in the global namespace using ::fenv_t; ~~^ c:/mingw32-dw2/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\fenv.h:58:11: error: no member named 'fexcept_t' in the global namespace using ::fexcept_t; ~~^
It was to overcome this that I added other options (and then I get problems finding cstddef. But I'm puzzled how your system works without - and how you don't seem to need to define tool clang?
Thanks for your help so far - I'm sure it will be *really* useful to get many people able to use this compiler.
But any other suggestions?
Thanks
Paul
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Hi, It's great to finally see more interest for getting Clang on Windows working with Boost. As for your specific issues, I'm not quite sure what could be causing that... I have been successfully compiling and using Boost.Test for my project's testing. I know that recently there have been some big changes on trunk to Boost.Test which have caused crashes under Clang on some platforms (which included Windows when I tested it), so yesterday (or the day before, I forget) I switched to the release branch temporarily (I couldn't be bothered finding the offending commit at the time as I was busy fixing something else) and had no issues compiling there... Perhaps you could try the release branch and see if you're having the same issues? If so, your issues may be caused by the recent unstable Boost.Test change(s)... If that's not it though, please let me know and I'll set up a VM with a clean environment and try compiling under that to make sure there's nothing I've forgotten about (as I probably have!), then I'll post a full list of steps and scripts I used so others can reproduce my results. It will take me a few days to do this though as I am going away today and won't have access to my machine for 2 days. Thanks, and good luck!

On Wed, Nov 7, 2012 at 6:12 AM, Joshua Boyce <raptorfactor@raptorfactor.com>wrote:
On Wed, Nov 7, 2012 at 2:32 AM, Paul A. Bristow <pbristow@hetp.u-net.com>wrote:
For me Boost_root is boost-trunk
and I'm using the same Ruben's downloads I believe so I've
set MINGW32_CLANG=c:/mingw32-dw2
(And this download works OK with NetBeans - for hello world programs (I'll try building boost.test on that IDE next).
I've clear out my user-config.jam for clang and tried to use your command line thus
b2 -q -j %NUMBER_OF_PROCESSORS% toolset=clang cxxflags=-std=c++11 address-model=32 architecture=x86 --stagedir=stage/clang-x86 link=static runtime-link=static threading=multi debug-symbols=on define=WINVER=_WIN32_WINNT_WIN7 define=_WIN32_WINNT=_WIN32_WINNT_WIN7 stage --with-test > build_dll_libs_trunk_test_JB_%date%_%tim%.log 2>&1
which looks the same to me as yours, but trying to compile Boost.test (which I presume you also did) I get
compile.c++.without-pth
bin.v2\libs\test\build\clang-linux-3.1\debug\address-model-32\architecture-x86\link-static\runtime-l ink-static\threading-multi\cpp_main.obj In file included from libs\test\src\cpp_main.cpp:16: In file included from .\boost/test/impl/cpp_main.ipp:20: In file included from .\boost/test/execution_monitor.hpp:81: In file included from .\boost/detail/fenv.hpp:69: c:/mingw32-dw2/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\fenv.h:57:11: error: no member named 'fenv_t' in the global namespace using ::fenv_t; ~~^ c:/mingw32-dw2/bin\..\lib\clang\3.1/../../../include/c++/4.6.3\fenv.h:58:11: error: no member named 'fexcept_t' in the global namespace using ::fexcept_t; ~~^
It was to overcome this that I added other options (and then I get problems finding cstddef. But I'm puzzled how your system works without - and how you don't seem to need to define tool clang?
Thanks for your help so far - I'm sure it will be *really* useful to get many people able to use this compiler.
But any other suggestions?
Thanks
Paul
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Hi,
It's great to finally see more interest for getting Clang on Windows working with Boost.
As for your specific issues, I'm not quite sure what could be causing that... I have been successfully compiling and using Boost.Test for my project's testing.
I know that recently there have been some big changes on trunk to Boost.Test which have caused crashes under Clang on some platforms (which included Windows when I tested it), so yesterday (or the day before, I forget) I switched to the release branch temporarily (I couldn't be bothered finding the offending commit at the time as I was busy fixing something else) and had no issues compiling there... Perhaps you could try the release branch and see if you're having the same issues? If so, your issues may be caused by the recent unstable Boost.Test change(s)...
If that's not it though, please let me know and I'll set up a VM with a clean environment and try compiling under that to make sure there's nothing I've forgotten about (as I probably have!), then I'll post a full list of steps and scripts I used so others can reproduce my results. It will take me a few days to do this though as I am going away today and won't have access to my machine for 2 days.
Thanks, and good luck!
As a quick test, I just updated my checkout of /trunk to the latest revision and compiled with clang. This is what I got (only the normal failures I outlined originally, and none of the ones you are experiencing): https://dl.dropbox.com/u/74751/cpp/boost/logs/boost-compile-clang32-20121107...
participants (7)
-
Beman Dawes
-
Chris Glover
-
Eric Niebler
-
John Maddock
-
Joshua Boyce
-
Mathias Gaunard
-
Paul A. Bristow