Clang Darwin trunk Cray 8.0 and max_digits10 support - problem in config?

I note that the test of ztest_max_digits10 and zztest_max_digits10 in http://www.boost.org/development/tests/trunk/developer/math.html both fail for these platforms. ztest_max_digits10 tests of native std::numeric_limits<>::max_digits10 is supported. zztest_max_digits10 test if BOOST_NO_NUMERIC_LIMITS_LOWEST is a proxy to signal support. where using std::numeric_limits<>::max_digits10 should be possible using BOOST_NO_NUMERIC_LIMITS_LOWEST as a proxy for Clang the messages are In file included from ../libs/math/test/zztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found # include <cstddef> In file included from ../libs/math/test/ztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found or for Cray CC-1353 crayc++: INTERNAL File = /opt/gcc/4.4.4/snos/include/g++/bits/move.h, Line = 34 CIF Error #include <cstddef> ^ This appears to be a problem in the config - a missing include. Suggestions? Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com

On Mon, Jul 09, 2012 at 03:18:46PM +0100, Paul A. Bristow wrote:
I note that the test of ztest_max_digits10 and zztest_max_digits10 in
http://www.boost.org/development/tests/trunk/developer/math.html
both fail for these platforms.
ztest_max_digits10 tests of native std::numeric_limits<>::max_digits10 is supported. zztest_max_digits10 test if BOOST_NO_NUMERIC_LIMITS_LOWEST is a proxy to signal support.
where using std::numeric_limits<>::max_digits10 should be possible using BOOST_NO_NUMERIC_LIMITS_LOWEST as a proxy
for Clang the messages are
In file included from ../libs/math/test/zztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found # include <cstddef>
In file included from ../libs/math/test/ztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found
or for Cray CC-1353 crayc++: INTERNAL File = /opt/gcc/4.4.4/snos/include/g++/bits/move.h, Line = 34 CIF Error
#include <cstddef> ^ This appears to be a problem in the config - a missing include.
A user complained on the IRC the other day about <cstddef> being missing on his FreeBSD system when using libc++. It turned out that he had forgotten to set WITH_LIBCPLUSPLUS=yes for his system, as advised in [1]. <cstddef> has been in the standard since at least C++03, so if your toolchain is missing it, there's something properly wrong with it. I see now that the clang in the test link is on darwin, but it still smells of mis-deployment. [1] http://lists.freebsd.org/pipermail/freebsd-stable/2012-May/067645.html -- Lars Viklund | zao@acc.umu.se

Paul A. Bristow wrote:
for Clang the messages are
In file included from ../libs/math/test/zztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found # include <cstddef>
In file included from ../libs/math/test/ztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found
boost/config/select_stdlib_config.hpp includes <cstddef> to determine which stdlib is used. It seems that, due to some misconfiguration in the test runner, clang cannot find <cstddef>. In my system (Mac OS X 10.7, clang trunk, libc++ and boost trunk), the two tests run fine. Regards, Michel

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Michel Morin Sent: Monday, July 09, 2012 3:52 PM To: boost@lists.boost.org Subject: Re: [boost] Clang Darwin trunk Cray 8.0 and max_digits10 support - problem in config?
Paul A. Bristow wrote:
for Clang the messages are
In file included from ../libs/math/test/zztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found # include <cstddef>
In file included from ../libs/math/test/ztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found
boost/config/select_stdlib_config.hpp includes <cstddef> to determine which stdlib is used. It seems that, due to some misconfiguration in the test runner, clang cannot find <cstddef>. In my system (Mac OS X 10.7, clang trunk, libc++ and boost trunk), the two tests run fine.
Well, that's reassuring :-) Is there anything else I should do to alert the test runners that very many tests will now fail on their platforms until this is corrected? Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com

On Jul 9, 2012, at 10:03 AM, Paul A. Bristow wrote:
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Michel Morin Sent: Monday, July 09, 2012 3:52 PM To: boost@lists.boost.org Subject: Re: [boost] Clang Darwin trunk Cray 8.0 and max_digits10 support - problem in config?
Paul A. Bristow wrote:
for Clang the messages are
In file included from ../libs/math/test/zztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found # include <cstddef>
In file included from ../libs/math/test/ztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found
boost/config/select_stdlib_config.hpp includes <cstddef> to determine which stdlib is used. It seems that, due to some misconfiguration in the test runner, clang cannot find <cstddef>. In my system (Mac OS X 10.7, clang trunk, libc++ and boost trunk), the two tests run fine.
Well, that's reassuring :-)
Is there anything else I should do to alert the test runners that very many tests will now fail on their platforms until this is corrected?
This is, I'm afraid, out of the test runners hands. The issue is that clang (the same binary) works fine on these platforms if we disable c++11, not sure why enabling c++11 triggers missing cstddef header problems. We may need to followup with the clang developers to see if this behavior is known / expected or considered a bug. -- Noel

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Belcourt, Kenneth Sent: Monday, July 09, 2012 11:21 PM To: <boost@lists.boost.org> Subject: Re: [boost] [EXTERNAL] Clang Darwin trunk Cray 8.0 and max_digits10 support - problem in config?
On Jul 9, 2012, at 10:03 AM, Paul A. Bristow wrote:
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Michel Morin Sent: Monday, July 09, 2012 3:52 PM To: boost@lists.boost.org Subject: Re: [boost] Clang Darwin trunk Cray 8.0 and max_digits10 support - problem in config?
Paul A. Bristow wrote:
for Clang the messages are
In file included from ../libs/math/test/zztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found # include <cstddef>
In file included from ../libs/math/test/ztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found
boost/config/select_stdlib_config.hpp includes <cstddef> to determine which stdlib is used. It seems that, due to some misconfiguration in the test runner, clang cannot find <cstddef>. In my system (Mac OS X 10.7, clang trunk, libc++ and boost trunk), the two tests run fine.
Well, that's reassuring :-)
Is there anything else I should do to alert the test runners that very many tests will now fail on their platforms until this is corrected?
This is, I'm afraid, out of the test runners hands. The issue is that clang (the same binary) works fine on these platforms if we disable c++11, not sure why enabling c++11 triggers missing cstddef header problems. We may need to followup with the clang developers to see if this behavior is known / expected or considered a bug.
Well - I fear it will prevent any useful Boost.Test results on this configuration until it is resolved. If really, really necessary, I could revert this change for a short time until that is done. (Does the fact the Cray test runner has the same problem give any clues?) Paul

Paul A. Bristow wrote:
Is there anything else I should do to alert the test runners that very many tests will now fail on their platforms until this is corrected?
This is, I'm afraid, out of the test runners hands. The issue is that clang (the same binary) works fine on these platforms if we disable c++11, not sure why enabling c++11 triggers missing cstddef header problems. We may need to followup with the clang developers to see if this behavior is known / expected or considered a bug.
Well - I fear it will prevent any useful Boost.Test results on this configuration until it is resolved. If really, really necessary, I could revert this change for a short time until that is done.
I will help Noel. If you want, I can run a test runner with clang in a C++11 mode tonight (it's morning now). Regards, Michel

On Jul 9, 2012, at 5:10 PM, Michel Morin wrote:
Paul A. Bristow wrote:
Is there anything else I should do to alert the test runners that very many tests will now fail on their platforms until this is corrected?
This is, I'm afraid, out of the test runners hands. The issue is that clang (the same binary) works fine on these platforms if we disable c++11, not sure why enabling c++11 triggers missing cstddef header problems. We may need to followup with the clang developers to see if this behavior is known / expected or considered a bug.
Well - I fear it will prevent any useful Boost.Test results on this configuration until it is resolved. If really, really necessary, I could revert this change for a short time until that is done.
I will help Noel. If you want, I can run a test runner with clang in a C++11 mode tonight (it's morning now).
Well, that would be helpful. Based on your other detailed response I have some Clang configuration problems that I need to fix. Having your tester would be a big help, thanks! -- Noel

Belcourt, Kenneth wrote:
If you want, I can run a test runner with clang in a C++11 mode tonight (it's morning now).
Well, that would be helpful.
I temporarily ran clang test runners * clang-cxx11-r159746 (in a C++11 mode) * clang-cxx03-r159746 (in a C++03 mode) and updated the results. Regards, Michel

On Jul 9, 2012, at 4:56 PM, Paul A. Bristow wrote:
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Belcourt, Kenneth Sent: Monday, July 09, 2012 11:21 PM To: <boost@lists.boost.org> Subject: Re: [boost] [EXTERNAL] Clang Darwin trunk Cray 8.0 and max_digits10 support - problem in config?
On Jul 9, 2012, at 10:03 AM, Paul A. Bristow wrote:
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Michel Morin Sent: Monday, July 09, 2012 3:52 PM To: boost@lists.boost.org Subject: Re: [boost] Clang Darwin trunk Cray 8.0 and max_digits10 support - problem in config?
Paul A. Bristow wrote:
for Clang the messages are
In file included from ../libs/math/test/zztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found # include <cstddef>
In file included from ../libs/math/test/ztest_max_digits10.cpp:27: In file included from ../boost/config.hpp:40: ../boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found
boost/config/select_stdlib_config.hpp includes <cstddef> to determine which stdlib is used. It seems that, due to some misconfiguration in the test runner, clang cannot find <cstddef>. In my system (Mac OS X 10.7, clang trunk, libc++ and boost trunk), the two tests run fine.
Well, that's reassuring :-)
Is there anything else I should do to alert the test runners that very many tests will now fail on their platforms until this is corrected?
This is, I'm afraid, out of the test runners hands. The issue is that clang (the same binary) works fine on these platforms if we disable c++11, not sure why enabling c++11 triggers missing cstddef header problems. We may need to followup with the clang developers to see if this behavior is known / expected or considered a bug.
Well - I fear it will prevent any useful Boost.Test results on this configuration until it is resolved. If really, really necessary, I could revert this change for a short time until that is done.
Michel has sent some very helpful instructions that should help me make progress. Please leave you change for now while I try to get clang c++11 support going.
(Does the fact the Cray test runner has the same problem give any clues?)
They are an entirely separate entity so no clues there. -- Noel

Hi Noel, Belcourt, Kenneth wrote:
This is, I'm afraid, out of the test runners hands. The issue is that clang (the same binary) works fine on these platforms if we disable c++11, not sure why enabling c++11 triggers missing cstddef header problems.
That's because you use libstdc++ in a C++03 mode and libc++ (-stdlib=libc++) in a C++11 mode. 1. What's your system? Mac OS X 10.6? 2. Did you install libc++? If not, please install it. See the instruction "Get it and get involved!" at http://libcxx.llvm.org/ . 3. If you already installed libc++ but the error happens, then your libc++ is not installed to the standard location. Could you check which directories are searched by clang (by compiling with "-v" option) and where your libc++ headers are installed? If you don't want to install libc++ to the standard location, you can pass -IPATH_TO_YOUR_LIBCXX_INCLUDE_DIR and -LPATH_TO_YOUR_LIBCXX_LIB_DIR as clang's command line options to specify the location of your libc++. P.S. -stdlib=libc++ should be added to <linkflags>, too. Regards, Michel

Hi Michel, On Jul 9, 2012, at 7:28 PM, Michel Morin wrote:
Belcourt, Kenneth wrote:
This is, I'm afraid, out of the test runners hands. The issue is that clang (the same binary) works fine on these platforms if we disable c++11, not sure why enabling c++11 triggers missing cstddef header problems.
That's because you use libstdc++ in a C++03 mode and libc++ (-stdlib=libc++) in a C++11 mode.
1. What's your system? Mac OS X 10.6?
Same failure pattern on both Darwin and Linux. Yes Darwin is: System Version: Mac OS X Server 10.6.8 (10K549)
2. Did you install libc++? If not, please install it. See the instruction "Get it and get involved!" at http://libcxx.llvm.org/ .
Sorry, missed this crucial step.
3. If you already installed libc++ but the error happens, then your libc++ is not installed to the standard location. Could you check which directories are searched by clang (by compiling with "-v" option) and where your libc++ headers are installed? If you don't want to install libc++ to the standard location, you can pass -IPATH_TO_YOUR_LIBCXX_INCLUDE_DIR and -LPATH_TO_YOUR_LIBCXX_LIB_DIR as clang's command line options to specify the location of your libc++.
The instructions suggest this: To build on Mac OS X 10.6 (Snow Leopard), you need a helper library and header found here. cp cxxabi.h to /usr/include, and cp libc++abi.dylib to /usr/lib. But I'm not a sysadmin so I can't write into those locations. Do you know if clang will work correctly if those files are located elsewhere?
P.S. -stdlib=libc++ should be added to <linkflags>, too.
Ah yes, I probably forgot to add this, thanks for pointing that out. Thank you very much for the detailed instructions, links, etc.. that really helps me out. -- Noel

First, as a user of the Boost libraries, I'd like to say thank you to Noel and all the testers for providing the testing resources. Belcourt, Kenneth wrote:
2. Did you install libc++? If not, please install it. See the instruction "Get it and get involved!" at http://libcxx.llvm.org/ .
Sorry, missed this crucial step. [...]
The instructions suggest this:
To build on Mac OS X 10.6 (Snow Leopard), you need a helper library and header found here. cp cxxabi.h to /usr/include, and cp libc++abi.dylib to /usr/lib.
But I'm not a sysadmin so I can't write into those locations. Do you know if clang will work correctly if those files are located elsewhere?
OK, so you cannot install libc++ to the standard location. Let's try the following and see how it goes: 1. Download and build libc++. 2. Move to "SOME_PATH/libcxx/lib" ("SOME_PATH" is the location where you downloaded libc++). Make a symbolic link or a copy of "libc++.1.dylib" as "libc++.dylib" in the same directory. 3. Copy "cxxabi.h" to "SOME_PATH/libcxx/include" and "libc++abi.dylib" to "SOME_PATH/libcxx/lib". 4. Run the test runner script with * adding "-ISOME_PATH/libcxx/include" to <cxxflags>, * adding "-LSOME_PATH/libcxx/lib" to <linkflags>, * adding "SOME_PATH/libcxx/lib" to environment variable "DYLD_LIBRARY_PATH". Maybe something like env DYLD_LIBRARY_PATH=SOME_PATH/libcxx/lib python run.py ... Regards, Michel

Hi Michel, On Jul 10, 2012, at 7:14 AM, Michel Morin wrote:
First, as a user of the Boost libraries, I'd like to say thank you to Noel and all the testers for providing the testing resources.
You're welcome. Regrettably I'm unable to contribute much to the code base so the least I can do is provide access to testers.
Belcourt, Kenneth wrote:
2. Did you install libc++? If not, please install it. See the instruction "Get it and get involved!" at http://libcxx.llvm.org/ .
The instructions suggest this:
To build on Mac OS X 10.6 (Snow Leopard), you need a helper library and header found here. cp cxxabi.h to /usr/include, and cp libc++abi.dylib to /usr/lib.
But I'm not a sysadmin so I can't write into those locations. Do you know if clang will work correctly if those files are located elsewhere?
OK, so you cannot install libc++ to the standard location. Let's try the following and see how it goes:
The Darwin clang c++11 tests are running, results should post in a few hours. Now that I understand the process, I'll attempt to bring up clang on linux with c++11 / libc++ support (might be the weekend before this happens). Couldn't have done it without your help, thanks again! -- Noel

Belcourt, Kenneth wrote:
The Darwin clang c++11 tests are running, results should post in a few hours.
All tests failed on Sandia-darwin-clang-trunk and Sandia-darwin-clang-trunk-c++11! In many cases, compilation succeeded but linking failed. [Sandia-darwin-clang-trunk] * Remove "-ISOME_PATH/libcxx/include" and "-LSOME_PATH/libcxx/lib". [Sandia-darwin-clang-trunk-c++11] * Did you make "libc++.dylib" (by symlinking or copying "libc++.1.dylib")? Regards, Michel

I was missing one more thing... Michel Morin wrote:
The Darwin clang c++11 tests are running, results should post in a few hours.
All tests failed on Sandia-darwin-clang-trunk and Sandia-darwin-clang-trunk-c++11! In many cases, compilation succeeded but linking failed. [...] [Sandia-darwin-clang-trunk-c++11] * Did you make "libc++.dylib" (by symlinking or copying "libc++.1.dylib")?
Before you build libc++ by the "libcxx/lib/buildit" script, please change the following lines of the script: * Line 55 -install_name /usr/lib/libc++.1.dylib to -install_name SOME_PATH/libcxx/lib/libc++.1.dylib * Line 56 -Wl,-reexport_library,/usr/lib/libc++abi.dylib \ to -Wl,-reexport_library,SOME_PATH/libcxx/lib/libc++abi.dylib \ Then, * build libcxx, * make a symlink or a copy of libc++.1.dylib. Could you try it? I think this is the reason the C++11 test runner still fails. Sorry for troubling you again. Regards, Michel

Hi Michel, On Jul 11, 2012, at 2:18 AM, Michel Morin wrote:
Belcourt, Kenneth wrote:
The Darwin clang c++11 tests are running, results should post in a few hours.
All tests failed on Sandia-darwin-clang-trunk and Sandia-darwin-clang-trunk-c++11! In many cases, compilation succeeded but linking failed.
I'm a stranger in a strange land. When building libc++.1.dylib the paths all look good. /home/kbelco/llvm_darwin/build/Release+Asserts/bin/clang algorithm.o bind.o chrono.o condition_variable.o debug.o exception.o future.o hash.o ios.o iostream.o locale.o memory.o mutex.o new.o random.o regex.o stdexcept.o string.o strstream.o system_error.o thread.o typeinfo.o utility.o valarray.o -arch i386 -arch x86_64 -o libc++.1.dylib -dynamiclib -nodefaultlibs -current_version 1 -compatibility_version 1 -install_name /home/kbelco/llvm_darwin/libcxx/lib/libc++.1.dylib -Wl,-reexport_library,/home/kbelco/libcppabi/libc++abi.dylib -Wl,-unexported_symbols_list,libc++unexp.exp /usr/lib/libSystem.B.dylib -std=c++0x -U__STRICT_ANSI__ But what really strange is this library I downloaded: sh-3.2$ ls -l /home/kbelco/libcppabi/libc++abi.dylib -rwxr-xr-x 1 kbelco kbelco 279396 Jul 10 15:21 /home/kbelco/libcppabi/libc++abi.dylib Seems to depend on /usr/lib/libc++abi.dylib: sh-3.2$ otool -L /home/kbelco/libcppabi/libc++abi.dylib /home/kbelco/libcppabi/libc++abi.dylib: /usr/lib/libc++abi.dylib (compatibility version 1.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0) but that library doesn't even exist. sh-3.2$ ls -l /usr/lib/libc+* ls: /usr/lib/libc+*: No such file or directory So I think that's why the c++11 tests all fail for /usr/lib/libc++abi.dylib. Note that there's a /usr/bin/clang but no /usr/bin/clang++ on this system. -- Noel

Belcourt, Kenneth wrote:
But what really strange is this library I downloaded:
sh-3.2$ ls -l /home/kbelco/libcppabi/libc++abi.dylib -rwxr-xr-x 1 kbelco kbelco 279396 Jul 10 15:21 /home/kbelco/libcppabi/libc++abi.dylib
Seems to depend on /usr/lib/libc++abi.dylib:
sh-3.2$ otool -L /home/kbelco/libcppabi/libc++abi.dylib /home/kbelco/libcppabi/libc++abi.dylib: /usr/lib/libc++abi.dylib (compatibility version 1.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
but that library doesn't even exist.
OK, so you need to change the install name of your libc++abi.dylib. 1. Copy or move the downloaded `libc++abi.dylib` to `SOME_PATH/libcxx/lib`. 2. `cd SOME_PATH/libcxx/lib` 3. Change the install name: install_name_tool -id SOME_PATH/libcxx/lib/libc++abi.dylib libc++abi.dylib (Actually you don't need to copy `libc++abi.dylib` to `SOME_PATH/libcxx/lib`. In that case, the command for changing the install name is: cd /home/kbelco/libcppabi install_name_tool -id /home/kbelco/libcppabi/libc++abi.dylib libc++abi.dylib Then, add `/home/kbelco/libcppabi` to <linkflags> and DYLD_LIBRARY_PATH.) As for `/usr/lib/libSystem.B.dylib`, I believe it is installed by default on Mac OS X 10.6. Regards, Michel

Now some tests pass on the C++11 runner, but many tests are still failing. Two fixes: * Change -I/home/kbelco/llvm_darwin/libcxx/include to -isystem /home/kbelco/llvm_darwin/libcxx/include in <cxxflags>. * Add -U__STRICT_ANSI__ to <cxxflags> (to avoid the bug in Mac OS X 10.6's math.h). Hope these are the two last pieces :) Regards, Michel

On Jul 13, 2012, at 8:27 AM, Michel Morin wrote:
Now some tests pass on the C++11 runner, but many tests are still failing.
Two fixes: * Change -I/home/kbelco/llvm_darwin/libcxx/include to -isystem /home/kbelco/llvm_darwin/libcxx/include in <cxxflags>.
* Add -U__STRICT_ANSI__ to <cxxflags> (to avoid the bug in Mac OS X 10.6's math.h).
Hope these are the two last pieces :)
I think that was it. I just posted some c++11 results for clang, looking good! Thanks so much for your patient help. -- Noel

Belcourt, Kenneth wrote:
Hope these are the two last pieces :)
I think that was it. I just posted some c++11 results for clang, looking good!
Glad to hear that. Bravo, Noel! Regards, Michel

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Michel Morin Sent: Saturday, July 14, 2012 4:51 AM To: boost@lists.boost.org Subject: Re: [boost] [EXTERNAL] Clang Darwin trunk Cray 8.0 and max_digits10 support - problem in config?
Belcourt, Kenneth wrote:
Hope these are the two last pieces :)
I think that was it. I just posted some c++11 results for clang, looking good!
Glad to hear that. Bravo, Noel!
Yeah! (Though not all the math tests have run yet - perhaps I need to be more patient ;-) Many thanks. Paul PS Just the Cray to sort out now ;-)

Belcourt, Kenneth wrote:
Now that I understand the process, I'll attempt to bring up clang on linux with c++11 / libc++ support (might be the weekend before this happens).
I don't know much about the situation around Linux, but I don't recommend to use libc++ on Linux. On Linux, please use libstdc++. (When using clang in a C++11 mode on Linux, pass the command-line option "-std=c++0x" but don't pass "-stdlib=libc++".) libstdc++-4.7 needs to be patched when used with clang (a patch is distributed at http://clang.llvm.org/cxx_status.html), but, IIRC, libstdc++-4.6 can be used with clang without any patch. Regards, Michel

Michel Morin wrote:
OK, so you cannot install libc++ to the standard location. Let's try the following and see how it goes:
1. Download and build libc++.
2. Move to "SOME_PATH/libcxx/lib" ("SOME_PATH" is the location where you downloaded libc++). Make a symbolic link or a copy of "libc++.1.dylib" as "libc++.dylib" in the same directory.
3. Copy "cxxabi.h" to "SOME_PATH/libcxx/include" and "libc++abi.dylib" to "SOME_PATH/libcxx/lib".
4. Run the test runner script with * adding "-ISOME_PATH/libcxx/include" to <cxxflags>, * adding "-LSOME_PATH/libcxx/lib" to <linkflags>, * adding "SOME_PATH/libcxx/lib" to environment variable "DYLD_LIBRARY_PATH". Maybe something like env DYLD_LIBRARY_PATH=SOME_PATH/libcxx/lib python run.py ...
Forgot to add one thing: When compiling, command line option "-IPATH_TO_TEST_RUNNER_BOOST_ROOT" should appear before "-ISOME_PATH/libcxx/include". For example, user-config.jam looks something like this using clang : trunk_cxx11 : $(HOME)/Clang/build/Release+Asserts/bin/clang++ : <cxxflags>"-std=c++0x -stdlib=libc++ -I$(HOME)/TestRunner/boost -I$(HOME)/Clang/libcxx/include" <linkflags>"-stdlib=libc++ -L$(HOME)/Clang/libcxx/lib" ; Regards, Michel

Michel Morin wrote:
When compiling, command line option "-IPATH_TO_TEST_RUNNER_BOOST_ROOT" should appear before "-ISOME_PATH/libcxx/include".
Or simply use "-isystem SOME_PATH/libcxx/include": using clang : trunk_cxx11 : $(HOME)/Clang/build/Release+Asserts/bin/clang++ : <cxxflags>"-std=c++0x -stdlib=libc++ -isystem $(HOME)/Clang/libcxx/include" <linkflags>"-stdlib=libc++ -L$(HOME)/Clang/libcxx/lib" ; Regards, Michel
participants (4)
-
Belcourt, Kenneth
-
Lars Viklund
-
Michel Morin
-
Paul A. Bristow