Failing to build Boost.Test library using Clang 3.1 on Netbeans

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 { ^ i:/boost-trunk\boost/test/detail/config.hpp:106:29: note: expanded from macro 'BOOST_TEST_DECL' # define BOOST_TEST_DECL BOOST_SYMBOL_EXPORT ^ i:/boost-trunk\boost/config/platform/win32.hpp:30:42: note: expanded from macro 'BOOST_SYMBOL_EXPORT' # define BOOST_SYMBOL_EXPORT __declspec(dllexport) ^ <built-in>:150:38: note: expanded from macro '__declspec' #define __declspec(a) __attribute__((a)) but the link stage to build the library fails with many Cannot export boost::test_tools::tt_detail::check_impl(boost::test_tools::predicate_result const&, boost::unit_test::lazy_ostream const&, boost::unit_test::basic_cstring<char const>, unsigned int, boost::test_tools::tt_detail::tool_level, boost::test_tools::tt_detail::check_type, unsigned int, ...): symbol not found (full output window message attached). 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*. Where would/should __clang__ be defined in order to select this compiler? My user-config.jam contains (in an attempt to cure ) # Clang compiler using mingw32 dw2 Ruben's release. using clang : 3.1 : "C:/mingw32-dw2/bin/clang++.exe" : <cxxflags>-v <cxxflags>-std="c++11" <cflags>-nostdinc # Do not include MSVC C headers. #<cflag>-c-include-dirs=??? <cxxflags>-nostdinc++ # Do not include MSVC C++ headers. # Use mingw-dw2 for includes <cxxflags>-cxx-include-arch="C:/mingw32-dw2/i686-w64-mingw32" <cxxflags>-cxx-include-32bit-dir=32 <cxxflags>-cxx-include-root="C:/mingw32-dw2/include/c++/4.6.3" <cxxflags>-stdlib=libc++ #<compileflags>-std=gnu++11 #<define>BOOST_STDLIB_CONFIG="i:/boost-trunk/boost/config/stdlib/libstdcpp3.hpp" <linkflags>-stdlib=libc++ ; Any views on my woes? Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com

Hi Paul, 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.
but the link stage to build the library fails with many
Cannot export boost::test_tools::tt_detail::check_impl(boost::test_tools::predicate_resul t const&, boost::unit_test::lazy_ostream const&, boost::unit_test::basic_cstring<char const>, unsigned int, boost::test_tools::tt_detail::tool_level, boost::test_tools::tt_detail::check_type, unsigned int, ...): symbol not found
(full output window message attached).
Right, no dllexport, no exported symbols. Please try a static build for now.
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?
Where would/should __clang__ be defined in order to select this compiler?
My user-config.jam contains (in an attempt to cure )
# Clang compiler using mingw32 dw2 Ruben's release. using clang
: 3.1 : "C:/mingw32-dw2/bin/clang++.exe" : <cxxflags>-v
<cxxflags>-std="c++11" <cflags>-nostdinc # Do not include MSVC C headers. #<cflag>-c-include-dirs=??? <cxxflags>-nostdinc++ # Do not include MSVC C++ headers. # Use mingw-dw2 for includes <cxxflags>-cxx-include-arch="C:/mingw32-dw2/i686-w64-mingw32" <cxxflags>-cxx-include-32bit-dir=32 <cxxflags>-cxx-include-root="C:/mingw32-dw2/include/c++/4.6.3" <cxxflags>-stdlib=libc++ #<compileflags>-std=gnu++11
#<define>BOOST_STDLIB_CONFIG="i:/boost-trunk/boost/config/stdlib/libstdcpp3 .hpp" <linkflags>-stdlib=libc++ ;
Any views on my woes?
Thanks for your config. I'll try to set up clang but this mght take a while. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

-----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?
My user-config.jam contains (in an attempt to cure )
Thanks for your config. I'll try to set up clang but this mght take a while.
If your think that this is what is required, I'll give it a shot. Thanks Paul

-----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

HI Paul, On Friday, 16. November 2012 17:26:46 Paul A. Bristow wrote:
So I'm doing something wrong here.
So, I've done a new install of clang and gcc from rubenvb personal builds and can reproduce your problems with my fresh install. This can be "workaround" by using using clang : 3.1 : e:/dev/apps/mingw64/bin/clang++ : # options <cxxflags>-Ie:/dev/apps/mingw64/include/c++/4.7.2 <cxxflags>-Ie:/dev/apps/mingw64/include/c++/4.7.2/x86_64-w64- mingw32 ; that means explicitly specifying the include paths. It seems that <include> seems to be broken whereas <define> works in user-config.jam. Will investigate this later. Unfortunately, linking then fails with lots and lots of missing symbols from the standard library. Conclusion: Either the build is broken or (most posssible) I have messed up the installation. I found my old installation on our (not yet removed) windows compile server and there everything works out of the box. clang-linux.link bin\foo.test\clang-linux-3.1\debug\link-static\foo.exe testing.capture-output bin\foo.test\clang-linux-3.1\debug\link-static\foo.run ====== BEGIN OUTPUT ====== Running 1 test case... foo.cpp(7): error: in "foo": check false failed *** 1 failure detected in test suite "foo" Setup: E:\Home\hunold\src\test\graph>clang++ -v clang version 3.1 (trunk 146147) Target: i686-w64-mingw32 Thread model: posix E:\Home\hunold\src\test\graph>gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=e:/home/hunold/mingw32/bin/../libexec/gcc/i686-w64- mingw32/4.6.3/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: /home/ruben/mingw-w64/toolchain/src/gcc/configure --host=i686- w64-mingw32 --build=x86_64-linux-gnu --target=i686- w64-mingw32 --with-sysroot=/home/ruben/mingw- w64/toolchain/mingw32mingw32/mingw32 --prefix=/home/ruben/mingw- w64/toolchain/mingw32 mingw32/mingw32 --with-libiconv-prefix=/home/ruben/mingw- w64/toolchain/mingw32mingw32/prereq_install --with-gmp=/home/ruben/mingw- w64/toolchain/mingw32mingw32/prereq_install --with-mpfr=/home/ruben/mingw- w64/toolchain/mingw32mingw32/prereq_install --with-mpc=/ home/ruben/mingw-w64/toolchain/mingw32mingw32/prereq_install --with- ppl=/home/ruben/mingw-w64/toolchain/mingw32mingw32/prereq_inst all --with-cloog=/home/ruben/mingw-w64/toolchain/mingw32mingw32/prereq_install --enable-cloog-backend=isl --with-host-libstdcxx='- lstdc++ -lm -lgcc_eh' --enable-shared --enable-static --enable-threads=posix --disable-multilib --enable-languages=c,lto,c++,fortr an,objc,obj-c++,java --enable-libgomp --enable-sjlj-exceptions --enable-fully- dynamic-string --disable-nls --disable-werror --enab le-checking=release --disable-win32-registry --disable-rpath --disable-werror CFLAGS='-O2 -mtune=core2 -fomit-frame-pointer -momit -leaf-frame-pointer -fgraphite-identity -floop-interchange -floop-block -floop- parallelize-all' LDFLAGS= Thread model: posix gcc version 4.6.3 20111208 (prerelease) (GCC) I think both older versions from Ruben, too. I set up those machine at least half a year ago, so I don't remember details. I'll do a new setup and report again. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

Hi Paul. On Friday, 16. November 2012 19:48:18 Jürgen Hunold wrote:
I think both older versions from Ruben, too. I set up those machine at least half a year ago, so I don't remember details.
I'll do a new setup and report again.
Working setup is: e:\Home\hunold\src\test\graph>clang++ -v clang version 3.1 (tags/RELEASE_31/final 161181) (llvm/tags/RELEASE_31/final 161243) Target: i686-w64-mingw32 Thread model: posix e:\Home\hunold\src\test\graph>g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=e:/dev/apps/mingw32-dw2/bin/../libexec/gcc/i686-w64- mingw32/4.6.3/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: /home/ruben/mingw-w64/src/gcc/configure --host=i686-w64- mingw32 --build=x86_64-linux-gnu --target=i686-w64-mingw32 --with- sysroot=/home/ruben/m ingw-w64/mingw32mingw32-dw2/mingw32-dw2 --prefix=/home/ruben/mingw- w64/mingw32mingw32-dw2/mingw32-dw2 --with-gmp=/home/ruben/mingw- w64/prereq/i686-w64-mingw32-d w2/install --with-mpfr=/home/ruben/mingw-w64/prereq/i686-w64-mingw32- dw2/install --with-mpc=/home/ruben/mingw-w64/prereq/i686-w64-mingw32- dw2/install --with-ppl =/home/ruben/mingw-w64/prereq/i686-w64-mingw32-dw2/install --with- cloog=/home/ruben/mingw-w64/prereq/i686-w64-mingw32-dw2/install --enable- cloog-backend=isl --w ith-host-libstdcxx='-static -lstdc++ -lm' --enable-shared --enable-static -- enable-threads=win32 --enable-plugins --disable-multilib --enable- languages=c,lto,c+ +,objc,obj-c++,fortran,java --enable-libgomp --enable-dw2-exceptions -- disable-sjlj-exceptions --enable-fully-dynamic-string --enable-libstdcxx-time --disable-n ls --disable-werror --enable-checking=release --with-gnu-as --with-gnu-ld -- disable-win32-registry --disable-rpath --disable-werror --with-libiconv- prefix=/home /ruben/mingw-w64/prereq/i686-w64-mingw32-dw2/install CFLAGS='-O2 - march=nocona -mtune=core2 -fomit-frame-pointer -momit-leaf-frame-pointer - fgraphite-identity - floop-interchange -floop-block -floop-parallelize-all' LDFLAGS= Thread model: win32 gcc version 4.6.3 (GCC) Extracted from: i686-w64-mingw32-gcc-dw2-4.6.3-1-release-win32_rubenvb.7z i686-w64-mingw32-clang-3.1-release-win32_rubenvb.7z Those are the 32bit dw2 compilers from "Home / Toolchains targetting Win32 / Personal Builds / rubenvb / gcc-dw2-4.6- release" and "Home / Toolchains targetting Win32 / Personal Builds / rubenvb / clang-3.1- release" No special setup for clang needed. It seems the 64bit version of clang on windows is broken. These are gcc/clang/mingww64 issues. The notes for clang on the download pages especially state "I also provide 64- bit builds, but these are only useful for C." so I consider that "known bug". Using gcc-4.7.2 also fails. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

-----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 7:53 PM To: boost@lists.boost.org Subject: Re: [boost] Failing to build Boost.Test library using Clang 3.1 on Netbeans
Hi Paul.
On Friday, 16. November 2012 19:48:18 Jürgen Hunold wrote:
I think both older versions from Ruben, too. I set up those machine at least half a year ago, so I don't remember details.
I'll do a new setup and report again.
Working setup is:
e:\Home\hunold\src\test\graph>clang++ -v clang version 3.1 (tags/RELEASE_31/final 161181) (llvm/tags/RELEASE_31/final 161243) Target: i686-w64-mingw32 Thread model: posix
e:\Home\hunold\src\test\graph>g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=e:/dev/apps/mingw32-dw2/bin/../libexec/gcc/i686-w64- mingw32/4.6.3/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: /home/ruben/mingw-w64/src/gcc/configure --host=i686-w64- mingw32 --build=x86_64-linux-gnu --target=i686-w64-mingw32 --with- sysroot=/home/ruben/m ingw-w64/mingw32mingw32-dw2/mingw32-dw2 --prefix=/home/ruben/mingw- w64/mingw32mingw32-dw2/mingw32-dw2 --with-gmp=/home/ruben/mingw- w64/prereq/i686-w64- mingw32-d w2/install --with-mpfr=/home/ruben/mingw-w64/prereq/i686-w64-mingw32- dw2/install --with-mpc=/home/ruben/mingw-w64/prereq/i686-w64-mingw32- dw2/install --with-ppl =/home/ruben/mingw-w64/prereq/i686-w64-mingw32-dw2/install --with- cloog=/home/ruben/mingw- w64/prereq/i686-w64-mingw32-dw2/install --enable- cloog-backend=isl --w ith-host-libstdcxx='-static - lstdc++ -lm' --enable-shared --enable-static -- enable-threads=win32 --enable-plugins --disable-multilib --enable- languages=c,lto,c+ +,objc,obj-c++,fortran,java --enable-libgomp --enable-dw2-exceptions -- disable-sjlj-exceptions --enable-fully-dynamic-string --enable-libstdcxx-time --disable-n ls --disable-werror --enable-checking=release --with-gnu-as --with-gnu-ld -- disable-win32-registry --disable-rpath --disable- werror --with-libiconv- prefix=/home /ruben/mingw-w64/prereq/i686-w64-mingw32-dw2/install CFLAGS='-O2 - march=nocona -mtune=core2 -fomit-frame-pointer -momit-leaf-frame-pointer - fgraphite- identity - floop-interchange -floop-block -floop-parallelize-all' LDFLAGS= Thread model: win32 gcc version 4.6.3 (GCC)
Extracted from: i686-w64-mingw32-gcc-dw2-4.6.3-1-release-win32_rubenvb.7z i686-w64-mingw32-clang-3.1-release-win32_rubenvb.7z
Those are the 32bit dw2 compilers from "Home / Toolchains targetting Win32 / Personal Builds / rubenvb / gcc-dw2-4.6- release" and "Home / Toolchains targetting Win32 / Personal Builds / rubenvb / clang-3.1- release"
No special setup for clang needed. It seems the 64bit version of clang on windows is broken. These are gcc/clang/mingww64 issues.
The notes for clang on the download pages especially state "I also provide 64- bit builds, but these are only useful for C." so I consider that "known bug".
Using gcc-4.7.2 also fails.
Very many thanks for all your work on this. I am using 32 bit windows, so should work. I'll try your change to clang tool definition to see if I can reproduce this. 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: Saturday, November 17, 2012 9:16 AM To: boost@lists.boost.org Subject: Re: [boost] Failing to build Boost.Test library using Clang 3.1 on Netbeans
-----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 7:53 PM To: boost@lists.boost.org Subject: Re: [boost] Failing to build Boost.Test library using Clang 3.1 on Netbeans
Hi Paul.
On Friday, 16. November 2012 19:48:18 Jürgen Hunold wrote:
I think both older versions from Ruben, too. I set up those machine at least half a year ago, so I don't remember details.
I'll do a new setup and report again.
Working setup is:
e:\Home\hunold\src\test\graph>clang++ -v clang version 3.1 (tags/RELEASE_31/final 161181) (llvm/tags/RELEASE_31/final 161243) Target: i686-w64-mingw32 Thread model: posix
e:\Home\hunold\src\test\graph>g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=e:/dev/apps/mingw32-dw2/bin/../libexec/gcc/i686-w6 4- mingw32/4.6.3/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: /home/ruben/mingw-w64/src/gcc/configure --host=i686-w64- mingw32 --build=x86_64-linux-gnu --target=i686-w64-mingw32 --with- sysroot=/home/ruben/m ingw-w64/mingw32mingw32-dw2/mingw32-dw2 --prefix=/home/ruben/mingw- w64/mingw32mingw32-dw2/mingw32-dw2 --with-gmp=/home/ruben/mingw- w64/prereq/i686-w64- mingw32-d w2/install --with-mpfr=/home/ruben/mingw-w64/prereq/i686-w64-mingw32- dw2/install --with-mpc=/home/ruben/mingw-w64/prereq/i686-w64-mingw32- dw2/install --with-ppl =/home/ruben/mingw-w64/prereq/i686-w64-mingw32-dw2/install --with- cloog=/home/ruben/mingw- w64/prereq/i686-w64-mingw32-dw2/install --enable- cloog-backend=isl --w ith-host-libstdcxx='-static - lstdc++ -lm' --enable-shared --enable-static -- enable-threads=win32 --enable-plugins --disable-multilib --enable- languages=c,lto,c+ +,objc,obj-c++,fortran,java --enable-libgomp --enable-dw2-exceptions +-- disable-sjlj-exceptions --enable-fully-dynamic-string --enable-libstdcxx-time --disable-n ls --disable-werror --enable-checking=release --with-gnu-as --with-gnu-ld -- disable-win32-registry --disable-rpath --disable- werror --with-libiconv- prefix=/home /ruben/mingw-w64/prereq/i686-w64-mingw32-dw2/install CFLAGS='-O2 - march=nocona -mtune=core2 -fomit-frame-pointer -momit-leaf-frame-pointer - fgraphite- identity - floop-interchange -floop-block -floop-parallelize-all' LDFLAGS= Thread model: win32 gcc version 4.6.3 (GCC)
Extracted from: i686-w64-mingw32-gcc-dw2-4.6.3-1-release-win32_rubenvb.7z i686-w64-mingw32-clang-3.1-release-win32_rubenvb.7z
Those are the 32bit dw2 compilers from "Home / Toolchains targetting Win32 / Personal Builds / rubenvb / gcc-dw2-4.6- release" and "Home / Toolchains targetting Win32 / Personal Builds / rubenvb / clang-3.1- release"
No special setup for clang needed. It seems the 64bit version of clang on windows is broken. These are gcc/clang/mingww64 issues.
The notes for clang on the download pages especially state "I also provide 64- bit builds, but these are only useful for C." so I consider that "known bug".
Using gcc-4.7.2 also fails.
Very many thanks for all your work on this.
I am using 32 bit windows, so should work. I'll try your change to clang tool definition to see if I can reproduce this.
I have finally got this work using # Clang tool configuration based on as used by Jurgen Hunold 16 Nov 2012 using clang : #version 3.1 : # compiler "C:/mingw32-dw2/bin/clang++.exe" : # options (header path) <cxxflags>-v # verbose for testing. <cxxflags>-IC:/mingw32-dw2/include/c++/4.6.3 # for stdlib? <cxxflags>-IC:/mingw32-dw2/i686-w64-mingw32/include : ; but it failed to link because these two files were not found "C:/mingw32-dw2/bin/ar.exe" "C:/mingw32-dw2/bin/ranlib.exe" adding <root>"C:/mingw32-dw2/bin" didn't work, so I hacked it by adding set PATH=c:/mingw32-dw2/bin;%PATH% to my command file calling bjam ... (I've asked on the Boost Build list for suggestion on how this *should* be done). This general the expected libraries I:/boost-trunk/stage/lib/libbost_unit_test_framework-clang31-mt-sd-1_53.lib I:/boost-trunk/stage/lib/libbost_unit_test_framework-clang31-mt-s-1_53.lib and, after some difficulty getting NetBeans to find this file, I finally got a simple program using Boost.Test to work. Many thanks for your invaluable help. Paul
--- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com
participants (2)
-
Jürgen Hunold
-
Paul A. Bristow