Actions
Bug #2209
closedwaf configure fails with clang on linux because of -stdlib=libc++
Start date:
Due date:
% Done:
100%
Estimated time:
Description
On Ubuntu 14.10
davide@ndnbox:~/NFD$ clang++ --version
Ubuntu clang version 3.5.0-4ubuntu2 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
davide@ndnbox:~/NFD$ CXX=clang++ ./waf configure --debug --with-tests
[...]
Checking for 'g++' (C++ compiler) : clang++
Checking supported CXXFLAGS : -std=c++0x -std=c++11 -stdlib=libc++ -pedantic -Wall -O0 -g3 -fcolor-diagnostics -fdiagnostics-color -Werror -Wno-error=unneeded-internal-declaration
Checking supported LINKFLAGS :
[...]
Checking boost includes : 1.55.0
Checking boost libs : ok
Checking for boost linkage : Could not link against boost libraries using supplied options
The configuration failed
(complete log in /home/davide/NFD/build/config.log)
davide@ndnbox:~/NFD$ tail -n33 build/config.log
------------------------------------------
Checking for boost linkage
==>
#include <boost/system/error_code.hpp>
int main() { boost::system::error_code c; }
<==
[1/2] Compiling build/.conf_check_1e35a10396c7e46959c846e051d6b159/test.cpp
['clang++', '-std=c++0x', '-std=c++11', '-stdlib=libc++', '-pedantic', '-Wall', '-O0', '-g3', '-fcolor-diagnostics', '-fdiagnostics-color', '-Werror', '-Wno-error=unneeded-internal-declaration', '-I/usr/include', '-D_DEBUG=1', '-DHAVE_LIBRT=1', '-DHAVE_LIBRESOLV=1', '-DWITH_TESTS=1', '../test.cpp', '-c', '-o', '/home/davide/NFD/build/.conf_check_1e35a10396c7e46959c846e051d6b159/testbuild/test.cpp.1.o']
err: In file included from ../test.cpp:2:
In file included from /usr/include/boost/system/error_code.hpp:14:
In file included from /usr/include/boost/system/config.hpp:13:
In file included from /usr/include/boost/config.hpp:40:
/usr/include/boost/config/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found
# include <cstddef>
^
1 error generated.
from /home/davide/NFD: Test does not build: Traceback (most recent call last):
File "/home/davide/NFD/.waf-1.8.2-a01aa13963437a19e5d8748cf2afd71b/waflib/Configure.py", line 337, in run_build
bld.compile()
File "/home/davide/NFD/.waf-1.8.2-a01aa13963437a19e5d8748cf2afd71b/waflib/Build.py", line 184, in compile
raise Errors.BuildError(self.producer.error)
BuildError: Build failed
-> task in 'testprog' failed (exit status 1):
{task 140174880514768: cxx test.cpp -> test.cpp.1.o}
['clang++', '-std=c++0x', '-std=c++11', '-stdlib=libc++', '-pedantic', '-Wall', '-O0', '-g3', '-fcolor-diagnostics', '-fdiagnostics-color', '-Werror', '-Wno-error=unneeded-internal-declaration', '-I/usr/include', '-D_DEBUG=1', '-DHAVE_LIBRT=1', '-DHAVE_LIBRESOLV=1', '-DWITH_TESTS=1', '../test.cpp', '-c', '-o', '/home/davide/NFD/build/.conf_check_1e35a10396c7e46959c846e051d6b159/testbuild/test.cpp.1.o']
Actions