
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Jürgen Hunold Sent: Friday, November 16, 2012 4:54 PM To: boost@lists.boost.org Subject: Re: [boost] Failing to build Boost.Test library using Clang 3.1 on Netbeans
Hi Jurgen
On Friday, 16. November 2012 16:29:53 Paul A. Bristow wrote:
Target: i686-w64-mingw32 Thread model: posix)
(This is Ruben's mingw64 build)
on Netbeans 7.2 on Windows 7.
The compilation stage goes OK
(but with many warnings
In file included from i:/boost-trunk/libs/test/src/test_tools.cpp:16: In file included from i:/boost-trunk\boost/test/impl/test_tools.ipp:23: i:/boost-trunk\boost/test/tree/test_unit.hpp:164:7: warning: 'dllexport' attribute only applies to variables and functions class BOOST_TEST_DECL master_test_suite_t : public test_suite {
No, the compilation is broken because clang does not support dllexport on classes as clearly mentioned above.
Ah - *significance* may be clear to you, but escaped my understanding ;-)
Right, no dllexport, no exported symbols. Please try a static build for now.
OK I'll try static next.
I have also failed to build using bjam (missing <cstddef> so missing the right stdlib?) and I wonder if both these are connected with lack of a suitable boost/config.hpp which caters for Clang *on this configuration*.
Can you build with b2?
isn't b2.exe the same as bjam.exe?
I couldn't, but I was stuck with missing <cstddef> - I suspect the wrong or missing stdlib?
Any suggestions on what this should be?
Where would/should __clang__ be defined in order to select this compiler?
I take it that this means that I have got clang compiler selected OK. clang version 3.1 (tags/RELEASE_31/final 161181) (llvm/tags/RELEASE_31/final 161243) but for a static build I:\boost-trunk>b2 toolset=clang --build-dir=i:\boost-trunk variant=debug release link=static runtime-link=static threading=multi --with-test 1>build_clang_static_libs_trunk_test_16-Nov-2012_1714.log 2>&1 produces (similar to a dynamic build) compile.c++.without-pth i:\boost-trunk\boost\bin.v2\libs\test\build\clang-linux-3.1\debug\link-static\runtime-link-static\th reading-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-908962.s -nostdinc++ -resource-dir "C:/mingw32-dw2/bin\\..\\lib\\clang\\3.1" -D BOOST_ALL_NO_LIB=1 -I . -fmodule-cache-path "C:\\Users\\Paul\\AppData\\Local\\Temp\\clang-module-cache" -stdlib=libc++ -O0 -Wall -pedantic -std=c++11 -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-908962.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. "C:/mingw32-dw2/bin/clang++.exe" -c -x c++ -v -std=c++11 -nostdinc++ -cxx-include-arch=C:/mingw32-dw2/i686-w64-mingw32 -cxx-include-32bit-dir=32 -cxx-include-root=C:/mingw32-dw2/include/c++/4.6.3 -stdlib=libc++ -O0 -g -fno-inline -Wall -pedantic -g -mthreads -DBOOST_ALL_NO_LIB=1 -I"." -o "i:\boost-trunk\boost\bin.v2\libs\test\build\clang-linux-3.1\debug\link-static\runtime-link-static\t hreading-multi\execution_monitor.obj" "libs\test\src\execution_monitor.cpp" ...failed compile.c++.without-pth i:\boost-trunk\boost\bin.v2\libs\test\build\clang-linux-3.1\debug\link-static\runtime-link-static\th reading-multi\execution_monitor.obj... C:/mingw32-dw2/include/c++/4.6.3 does contain cstddef is starts saying // -*- C++ -*- forwarding header. but <cxxflags>-cxx-include-root="C:/mingw32-dw2/include/c++/4.6.3" doesn't seem to be in the search list above? So I'm doing something wrong here. Thanks Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com