problem with building program_options (VC8)
I have build boost libraries with command line bjam --toolset=msvc --user-config=config32.jam --stagedir=. debug-symbols=on stage File config32.jam is: using msvc : 8.0 : : <cxxflags>"-wd4996 -wd4103 -Zp4" <define>_CRT_SECURE_NO_DEPRECATE <define>_CRT_NONSTDC_NO_DEPRECATE <define>_SECURE_SCL=0 <define>BOOST_SPIRIT_THREADSAFE <define>BOOST_THREAD_USE_DLL <define>BOOST_THREAD_BUILD_DLL ; The resulting libboost_program_options-vc80-mt-1_34.lib has size 7,420,264 bytes and my program, builded with /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_SECURE_SCL=0" /D "BOOST_THREAD_USE_DLL", crashes. When I changed config32.jam to using msvc : 8.0 : : <cxxflags>"-wd4996 -wd4103 -Zp4 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SECURE_SCL=0 -DBOOST_SPIRIT_THREADSAFE -DBOOST_THREAD_USE_DLL -DBOOST_THREAD_BUILD_DLL " ; The resulting libboost_program_options-vc80-mt-1_34.lib size is 7,233,568 bytes and my program works well. This looks like <define> in config file sometimes has no effect. Furthermore, program options library is alignment-sensitive.
Sergey Skorniakov wrote:
I have build boost libraries with command line bjam --toolset=msvc --user-config=config32.jam --stagedir=. debug-symbols=on stage File config32.jam is: using msvc : 8.0 : : <cxxflags>"-wd4996 -wd4103 -Zp4" <define>_CRT_SECURE_NO_DEPRECATE <define>_CRT_NONSTDC_NO_DEPRECATE <define>_SECURE_SCL=0 <define>BOOST_SPIRIT_THREADSAFE <define>BOOST_THREAD_USE_DLL <define>BOOST_THREAD_BUILD_DLL ;
The resulting libboost_program_options-vc80-mt-1_34.lib has size 7,420,264 bytes and my program, builded with /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_SECURE_SCL=0" /D "BOOST_THREAD_USE_DLL", crashes.
When I changed config32.jam to using msvc : 8.0 : : <cxxflags>"-wd4996 -wd4103 -Zp4 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SECURE_SCL=0 -DBOOST_SPIRIT_THREADSAFE -DBOOST_THREAD_USE_DLL -DBOOST_THREAD_BUILD_DLL " ;
The resulting libboost_program_options-vc80-mt-1_34.lib size is 7,233,568 bytes and my program works well. This looks like <define> in config file sometimes has no effect.
Per http://boost.org/boost-build2/doc/html/bbv2/reference/tools.html#bbv2.refere..., it should have no effect indeed.
Furthermore, program options library is alignment-sensitive.
Sorry, what is that, why is that a bad thing, and what are you proposing to do about it? - Volodya
Per http://boost.org/boost-build2/doc/html/bbv2/reference/tools.html#bbv2.refere..., it should have no effect indeed.
Ok, my mistake.
Furthermore, program options library is alignment-sensitive.
Sorry, what is that, why is that a bad thing, and what are you proposing to do about it?
I talk about struct member alignment aka packing. As I see, boost\config\abi\msvc_prefix.hpp and msvc_suffix.hpp were designed especially to prevent situation when program crashes if different alignment was used while building library and application. If I build my program with -Zp4 (structure members aligned to 4 bytes) and boost::program_options without -Zp option (default alignment for MSVC is 8), my program will crashes. But there are no such effect with, for example, serialization or filesystem library. I think that
participants (2)
-
Sergey Skorniakov
-
Vladimir Prus