[Boost-users] Unrecoverable block scoping error

55 views
Skip to first unread message

Martin M

unread,
Sep 24, 2004, 8:27:58 PM9/24/04
to boost...@lists.boost.org
I use boost iterators and BGL in my project, which I normally compile
with gcc. However, I wanted to try how portable it is, and tried to
compile it with MSVC++ 6.

After having sorted out a few minor quirks in my code, I get the error
message "c:\program files\hack\microsoft visual
studio\local\include\boost\type_traits\broken_compiler_spec.hpp(23) :
fatal error C1506: unrecoverable block scoping error"

Where could this stem from? I installed boost for VC++ from within
Cygwin with the command line
bjam "--prefix=c:\program files\hack\microsoft visual studio\local"
"-sTOOLS=msvc" "--builddir=../boost_msvc_build" "-sMSVC_ROOT=c:\program
files\hack\microsoft visual studio\vc98" install

Any ideas?

/ martin


_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

David Abrahams

unread,
Sep 25, 2004, 7:57:22 PM9/25/04
to boost...@lists.boost.org
Martin M <martin.m...@aass.oru.se> writes:

> I use boost iterators and BGL in my project, which I normally compile
> with gcc. However, I wanted to try how portable it is, and tried to
> compile it with MSVC++ 6.
>
> After having sorted out a few minor quirks in my code, I get the error
> message "c:\program files\hack\microsoft visual
> studio\local\include\boost\type_traits\broken_compiler_spec.hpp(23) :
> fatal error C1506: unrecoverable block scoping error"
>
> Where could this stem from? I installed boost for VC++ from within
> Cygwin with the command line
> bjam "--prefix=c:\program files\hack\microsoft visual studio\local"
> "-sTOOLS=msvc" "--builddir=../boost_msvc_build" "-sMSVC_ROOT=c:\program
> files\hack\microsoft visual studio\vc98" install
>
> Any ideas?

Try building with an NT (not Cygwin) build of bjam from within a
regular NT command shell.

--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

Martin M

unread,
Sep 26, 2004, 10:37:15 AM9/26/04
to boost...@lists.boost.org
David Abrahams wrote:
> Try building with an NT (not Cygwin) build of bjam from within a
> regular NT command shell.

Thanks for your reply. When I try that, I get output looking like below. It
says that the /Ze and /Za command-line options are incompatible. Do you know
how I can change that?


C:\hack\Cygwin\home\martin\source\libs\boost_1_31_0>bjam
"-sMSVC_ROOT=c:\program files\hack\microsoft visual studio\vc98"
--"prefix=c:\program files\hack\" -sTOOLS=msvc --builddir=..\boost_msvc_build install
---------------------------------------------------------------------
skipping Boost.Python library build due to missing or incorrect configuration

couldn't find Python.h in "c:/tools/python/include"

You can configure the location of your python installation by setting:
PYTHON_ROOT - currently "c:/tools/python"
PYTHON_VERSION - The 2-part python Major.Minor version number (e.g.
"2.2", NOT "2.2.1") - currently "2.2"

The following are automatically configured from PYTHON_ROOT if not
otherwise set:

PYTHON_LIB_PATH - path to Python library object; currently
"c:/tools/python/libs"
---------------------------------------------------------------------
....found 5266 targets...
....updating 693 targets...
vc-C++ bin\boost\libs\date_time\build\boost_date_time.dll\vc7.1\debug\greg_month
..obj
Command line error D2016 : '/Ze' and '/Za' command-line options are incompatible



"cl" /Zm800 -nologo -GX -c -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -DBOOST
_ALL_DYN_LINK=1 /Z7 /Od /Ob0 /GX /GR /MDd /Op /Zc:forScope /Zc:wchar_t -I"bin
\boost\libs\date_time\build" -I"C:\HACK\Cygwin\home\martin\source\libs\boost_1_
31_0" -I"C:\PROGRA~1\HACK\MICROS~1\VC98\include" -Fo"bin\boost\libs\date_time\
build\boost_date_time.dll\vc7.1\debug\greg_month.obj" -Tp"C:\HACK\Cygwin\home\m
artin\source\libs\boost_1_31_0\libs\date_time\build\../src/gregorian/greg_month.
cpp"

....failed vc-C++ bin\boost\libs\date_time\build\boost_date_time.dll\vc7.1\debug\
greg_month.obj...
vc-C++ bin\boost\libs\date_time\build\boost_date_time.dll\vc7.1\debug\greg_weekd
ay.obj
Command line error D2016 : '/Ze' and '/Za' command-line options are incompatible

David Abrahams

unread,
Sep 27, 2004, 8:08:33 PM9/27/04
to boost...@lists.boost.org
Martin M <martin.m...@aass.oru.se> writes:

> Thanks for your reply. When I try that, I get output looking like below. It
> says that the /Ze and /Za command-line options are incompatible. Do you know
> how I can change that?
>
>

<snip>

> ...found 5266 targets...
> ...updating 693 targets...
> vc-C++ bin\boost\libs\date_time\build\boost_date_time.dll\vc7.1\debug\greg_month
> .obj
> Command line error D2016 : '/Ze' and '/Za' command-line options are incompatible
>
>
>
> "cl" /Zm800 -nologo -GX -c -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -DBOOST
> _ALL_DYN_LINK=1 /Z7 /Od /Ob0 /GX /GR /MDd /Op /Zc:forScope /Zc:wchar_t -I"bin
> \boost\libs\date_time\build" -I"C:\HACK\Cygwin\home\martin\source\libs\boost_1_
> 31_0" -I"C:\PROGRA~1\HACK\MICROS~1\VC98\include" -Fo"bin\boost\libs\date_time\
> build\boost_date_time.dll\vc7.1\debug\greg_month.obj" -Tp"C:\HACK\Cygwin\home\m
> artin\source\libs\boost_1_31_0\libs\date_time\build\../src/gregorian/greg_month.
> cpp"

I have absolutely no clue. As you can see for yourself, neither '/Ze'
nor '/Za' appear in the command line. Jeff, do you have any ideas?

--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

Victor A. Wagner Jr.

unread,
Sep 28, 2004, 2:23:07 AM9/28/04
to boost...@lists.boost.org
there is a CL environment variable that may be messing things up.


>--
>Dave Abrahams
>Boost Consulting
>http://www.boost-consulting.com
>
>_______________________________________________
>Boost-users mailing list
>Boost...@lists.boost.org
>http://lists.boost.org/mailman/listinfo.cgi/boost-users

Victor A. Wagner Jr. http://rudbek.com
The five most dangerous words in the English language:
"There oughta be a law"

Stephen Jackson

unread,
Sep 28, 2004, 10:29:44 AM9/28/04
to boost...@lists.boost.org

>
> Thanks for your reply. When I try that, I get output looking like below. It
> says that the /Ze and /Za command-line options are incompatible. Do you
> know
> how I can change that?
>
>
> C:\hack\Cygwin\home\martin\source\libs\boost_1_31_0>bjam
> "-sMSVC_ROOT=c:\program files\hack\microsoft visual studio\vc98"
> --"prefix=c:\program files\hack\" -sTOOLS=msvc
> --builddir=..\boost_msvc_build install

[snip]

> ...found 5266 targets...
> ...updating 693 targets...
> vc-C++
> bin\boost\libs\date_time\build\boost_date_time.dll\vc7.1\debug\greg_month
> .obj
> Command line error D2016 : '/Ze' and '/Za' command-line options are
> incompatible
>

I have seen reports of the above error arising from confusion between
compiler versions. If I am using MSVC++ 6 and try to build a 7.1 target
with:
bjam -sTOOLS=vc7.1
then I get exactly the same error.

I cannot see why it would be trying to build a 7.x target from the
information you have supplied. However, I hope this information provides
you with some clue.

Stephen Jackson

Martin M

unread,
Sep 28, 2004, 5:37:27 PM9/28/04
to boost...@lists.boost.org
Stephen Jackson wrote:
>> Command line error D2016 : '/Ze' and '/Za' command-line options are
>> incompatible
>
> I have seen reports of the above error arising from confusion between
> compiler versions. If I am using MSVC++ 6 and try to build a 7.1 target
> with:
> bjam -sTOOLS=vc7.1
> then I get exactly the same error.

I did have some odd references to MS Visual Studio .NET in the error
output from bjam. That's probably what caused the error. I don't know
where that came from, since I don't have .NET installed, but after a
reboot and a bit of extra fiddling it all seems to work.

Thank you all for your time.

/ martin
Reply all
Reply to author
Forward
0 new messages