[filesystem] running afoul of _HAS_ITERATOR_DEBUGGING - VC 9.0

Hello,
I'm a boost newbie, so please bear with me if this sounds trivial.
I'm rebuilding our code that uses boost heavily with VC 9.0 on
Windows 2008, 32-bit.
All of our code is compiled with _SECURE_SCL=0 & _HAS_ITERATOR_DEBUGGING=0.
And I rebuild boost with the same flags.
Our code links with boost as static libraries.
However, at runtime - I'm seeing access violations occuring
in the Microsoft secure STL code that should have been disabled with
_HAS_ITERATOR_DEBUGGING=0.
A specific example, when we call filesystem::basic_path::normalize(),
this calls:
// path.hpp
template

AMDG Raman wrote:
I'm a boost newbie, so please bear with me if this sounds trivial.
I'm rebuilding our code that uses boost heavily with VC 9.0 on Windows 2008, 32-bit.
All of our code is compiled with _SECURE_SCL=0 & _HAS_ITERATOR_DEBUGGING=0. And I rebuild boost with the same flags.
Exactly how did you build Boost? In Christ, Steven Watanabe

Steven Watanabe
Exactly how did you build Boost?
Hi Steve, This is the commandline I use to build boost. bjam toolset=msvc-9.0 define=_CRT_SECURE_NO_WARNINGS=0 define=_SCL_SECURE_NO_WARNINGS=0 define=_SECURE_SCL=0 define=_HAS_ITERATOR_DEBUGGING=0 --build-type=complete threading=multi --layout=versioned --without-python --without-mpi stage -j4>boost_build_vc90.log -Raman

Hi ! On Monday 19 January 2009, Raman wrote:
Steven Watanabe
writes: Exactly how did you build Boost? This is the commandline I use to build boost.
bjam toolset=msvc-9.0 define=_CRT_SECURE_NO_WARNINGS=0 define=_SCL_SECURE_NO_WARNINGS=0 define=_SECURE_SCL=0 define=_HAS_ITERATOR_DEBUGGING=0 --build-type=complete threading=multi --layout=versioned --without-python --without-mpi stage -j4>boost_build_vc90.log
This will definetely not work. You are missing some quotes. Use define="_SCL_SECURE_NO_WARNINGS=0" for all #defines having a "=" inside. Tip: Use -n to check if the command line really works as expected. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * juergen.hunold@ivembh.de ! www.ivembh.de * * Geschäftsführer: ! Sitz des Unternehmens: Hannover * Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965 * PD Dr.-Ing. Alfons Radtke !

Juergen Hunold
This will definetely not work. You are missing some quotes.
Hi Juergen, I didn't think this was a problem but I rebuilt boost with quotes around the defines. It made no difference. I also added the option "-d+2" to my commandline - and could see that with or without the quotes, the defines are being passed down correctly, as seen below. Thanks Raman file bin.v2\libs\date_time\build\msvc-9.0\release\ link-static\threading-multi\date_generators.obj.rsp "libs\date_time\src\gregorian\date_generators.cpp" -Fo"bin.v2\libs\date_time\build\msvc-9.0\release \link-static\threading-multi\date_generators.obj" -TP /O2 /Ob2 /W3 /GR /MD /Zc:forScope /Zc:wchar_t /wd4675 /EHs -c -DBOOST_ALL_NO_LIB=1 -DBOOST_DATE_TIME_STATIC_LINK -DDATE_TIME_INLINE -DNDEBUG -D_CRT_SECURE_NO_WARNINGS=0 -D_HAS_ITERATOR_DEBUGGING=0 -D_SCL_SECURE_NO_WARNINGS=0 -D_SECURE_SCL=0 "-I."

AMDG Raman wrote:
I didn't think this was a problem but I rebuilt boost with quotes around the defines. It made no difference.
I also added the option "-d+2" to my commandline - and could see that with or without the quotes, the defines are being passed down correctly, as seen below.
Thanks Raman
-D_CRT_SECURE_NO_WARNINGS=0
-D_HAS_ITERATOR_DEBUGGING=0
-D_SCL_SECURE_NO_WARNINGS=0
-D_SECURE_SCL=0
Ok. So it looks like Boost is being compiled correctly. If you are using any other libraries you might want to check that they are compiled correctly as well. For this kind of problem, the fact that it manifests itself inside Boost is no guarantee that the problem is actually in Boost. Also you can try temporarily adding a #error inside the offending #if _HAS_ITERATOR_DEBUGGING to see if you get an error in any translation unit. In Christ, Steven Watanabe
participants (3)
-
Juergen Hunold
-
Raman
-
Steven Watanabe