Boost logo

Boost Users :

Subject: Re: [Boost-users] b2 build problem: fatal error C1189: #error : "This is a GCC specific test case"
From: Lemay.Steve (Steve.Lemay_at_[hidden])
Date: 2012-09-25 12:38:51


Don't know if this will help, but this is the contents of the batch file I used for VS2010... and currently works successfully for VS2012. There is also a precompile of Boost available via BoostPro and their freely provided tool.
====build_msvc.bat ===
@ECHO OFF

CLS
SET DRIVE=D:
SET BOOSTVER=1_51_0

@PUSHD %DRIVE%\boost_%BOOSTVER%

@IF NOT EXIST bjam.exe call bootstrap
@IF NOT EXIST bjam.txt bjam --help > bjam.txt
@IF NOT EXIST bjam_libs.txt bjam --show-libraries > bjam_libs.txt
@IF NOT EXIST bjam_obscure_options.txt bjam --help-options > bjam_obscure_options.txt
@IF EXIST build.log del build.log

@ECHO ON
@ECHO Building Boost libraries for Visual Studio

@REM Static library
bjam -a -q -j4 --prefix=%DRIVE%\boost --build-type=complete --build-dir=%DRIVE%\boostBuild_VS2_%BOOSTVER% toolset=msvc --variant=release link=static threading=multi runtime-link=shared --without-python --without-mpi install >build.log 2>&1

@POPD

=== adding QNX 6.5 SDK version *just 'cause you never know* ==

@ECHO OFF
:: In file tools\build\v2\tools\qcc.jam, in the "actions piecemeal archive" block, replace the line: ar rc "$(<)" "$(>)" with the following: ntox86-ar rc "$(<)" "$(>)"
:: For Boost 1.50 modify the following files until the bug is addressed.
:: boost\serialization\factory.hpp - line 27 remove "|| defined (__QNXNTO__)"
:: boost\test\impl\execution_monitor.ipp - add to line 56 "|| defined (__QNXNTO__)" remove line 61-66 as no longer necessary.
:: \libs\context\build\Jamfile.v2 needs to be modified to replace 'as' with 'ntox860-as' for Windows hosted cross compile (author hopefully has checked in mod for original bjam file for 1.52)
:: \libs\context\src\stack_utils_posix.cpp needs to be modified to provide definition for SIGSTKSZ at line #53 - #if !defined (SIGSTKSZ) #define SIGSTKSZ (8 * 1024) #endif

CLS
SET DRIVE=D:
SET BOOSTVER=1_51_0

@PUSHD %DRIVE%\boost_%BOOSTVER%

@IF NOT EXIST bjam.exe call bootstrap
@IF NOT EXIST bjam.txt bjam --help > bjam.txt
@IF NOT EXIST bjam_libs.txt bjam --show-libraries > bjam_libs.txt
@IF NOT EXIST bjam_obscure_options.txt bjam --help-options > bjam_obscure_options.txt
@IF EXIST build.log del build.log

@ECHO ON
@ECHO Building Boost libraries for QNX 6.5.x - targeting Turion 64.

@REM Static library gcc 4.7.1 and gcc 4.4.2
@REM bjam -a -q -j4 --prefix=%DRIVE%\boost --build-type=minimal --build-dir=%DRIVE%\boostBuild_QCC_%BOOSTVER% --layout=system toolset=qcc target-os=qnxnto threadapi=pthread --variant=release link=static threading=multi runtime-link=shared cxxflags="-DFD_SETSIZE=2048 -march=k8-sse3 -mtune=k8-sse3 -mmmx -msse3 -mfpmath=sse -mno-3dnow -mstackrealign -Wc,-fPIC,-fnothrow-opt,-std=c++11,-std=gnu++11" --without-mpi --without-python install >build.log 2>&1
bjam -a -q -j4 --prefix=%DRIVE%\boost --build-type=minimal --build-dir=%DRIVE%\boostBuild_QCC_%BOOSTVER% --layout=system toolset=qcc target-os=qnxnto threadapi=pthread --variant=release link=static threading=multi runtime-link=shared cxxflags="-DFD_SETSIZE=2048 -march=k8-sse3 -mtune=k8-sse3 -mmmx -msse3 -mfpmath=sse -mno-3dnow -mstackrealign -Wc,-fPIC,-std=c++0x,-std=gnu++0x" --without-mpi --without-python install >build.log 2>&1

@POPD

SGL
steven.lemay_at_[hidden]

-----Original Message-----
From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Gunther Laure
Sent: Tuesday, September 25, 2012 9:05 AM
To: boost-users_at_[hidden]
Subject: [Boost-users] b2 build problem: fatal error C1189: #error : "This is a GCC specific test case"

Hi guys!

I am getting a build error during build configuration using Visual Studio 2010:

...found 25 targets...
...updating 3 targets...
compile-c-c++ C:\Users\glaure\SvnProject\SW_APP\3rdparty\test\boost\bin.
compile-c-c++ v2\libs\regex\build\msvc-10.0\debug\address-model-64\threa
compile-c-c++ ding-multi\has_icu_test.obj
has_icu_test.cpp
libs\regex\build\has_icu_test.cpp(12) : fatal error C1083: Cannot open include file: 'unicode/uversion.h': No such file or directory

And more important:
compile-c-c++ C:\Users\glaure\SvnProject\SW_APP\3rdparty\test\boost\bin.
compile-c-c++ v2\libs\math\config\msvc-10.0\debug\address-model-64\threa
compile-c-c++ ding-multi\has_gcc_visibility.obj
has_gcc_visibility.cpp
libs\math\config\has_gcc_visibility.cpp(7) : fatal error C1189: #error
: "This is a GCC specific test case".

The error is only reproduceable when i am using the --build-dir option of b2.

Example:
b2.exe -j8 install --build-dir=C:/boost_test --libdir=C:/boost_lib/release address-model=64 --prefix=C:/boost --without-python link=shared threading=multi variant=release

Of course boost builds successfully, but the problem is that Visual Studio thinks that the build failed.

These checks are not done if you build boost within the source tree.

Currently I am using boost 1.50

Bye Gunther
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net