Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio 2019 crash including boost/bimap.hpp #29

Open
dgplayer opened this issue Apr 13, 2021 · 11 comments
Open

Visual Studio 2019 crash including boost/bimap.hpp #29

dgplayer opened this issue Apr 13, 2021 · 11 comments

Comments

@dgplayer
Copy link

`
simply #include <boost/bimap.hpp> crashes the Visual Studio 2019 compiler.
crash occurs when stdafx.h includes boost/bimap.hpp

boost_1_75_0

C/C++ project properties:

Disable language extensions: no
Conformance mode: Defailt
Wchar_t as Built-In: yes
Force loop scope: yes
enforce type conversion: not set
RTTI: not set
Open MP: not set
C++ Language Standard ISO C++ 14
C Language Standard: Default (Legacy MSVC)
Enaable experimental: not set

1>stdafx.cpp
1>H:\Svn\ThirdParty-2019\boost_1_75_0\boost\operators.hpp(161,1): fatal error C1001: Internal compiler error.
1>(compiler file 'msc1.cpp', line 1588)
1> To work around this problem, try simplifying or changing the program near the locations listed above.
1>If possible please provide a repro here: https://developercommunity.visualstudio.com
1>Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
1>H:\Svn\ThirdParty-2019\boost_1_75_0\boost\operators.hpp(141): message : see reference to class template instantiation 'boost::operators_impl::equality_comparable2<T,U,B>' being compiled
1> with
1> [
1> T=boost::serialization::version_type,
1> U=unsigned int,
1> B=boost::operators_impl::operators_detail::empty_baseboost::serialization::version_type
1> ]
1>H:\Svn\ThirdParty-2019\boost_1_75_0\boost\operators.hpp(421): message : see reference to class template instantiation 'boost::operators_impl::less_than_comparable2<T,U,boost::operators_impl::equality_comparable2<T,U,B>>' being compiled
1> with
1> [
1> T=boost::serialization::version_type,
1> U=unsigned int,
1> B=boost::operators_impl::operators_detail::empty_baseboost::serialization::version_type
1> ]
1>H:\Svn\ThirdParty-2019\boost_1_75_0\boost\operators.hpp(168): message : see reference to class template instantiation 'boost::operators_impl::totally_ordered2<boost::serialization::version_type,unsigned int,boost::operators_impl::operators_detail::empty_base>' being compiled
1> with
1> [
1> T=boost::serialization::version_type
1> ]
1>H:\Svn\ThirdParty-2019\boost_1_75_0\boost\operators.hpp(152): message : see reference to class template instantiation 'boost::operators_impl::equality_comparable1<T,B>' being compiled
1> with
1> [
1> T=boost::serialization::version_type,
1> B=boost::operators_impl::totally_ordered2<boost::serialization::version_type,unsigned int,boost::operators_impl::operators_detail::empty_baseboost::serialization::version_type>
1> ]
1>H:\Svn\ThirdParty-2019\boost_1_75_0\boost\operators.hpp(427): message : see reference to class template instantiation 'boost::operators_impl::less_than_comparable1<T,boost::operators_impl::equality_comparable1<T,B>>' being compiled
1> with
1> [
1> T=boost::serialization::version_type,
1> B=boost::operators_impl::totally_ordered2<boost::serialization::version_type,unsigned int,boost::operators_impl::operators_detail::empty_baseboost::serialization::version_type>
1> ]
1>H:\Svn\ThirdParty-2019\boost_1_75_0\boost\serialization\serialization.hpp(52): message : see reference to class template instantiation 'boost::operators_impl::totally_ordered1<boost::serialization::version_type,boost::operators_impl::totally_ordered2<boost::serialization::version_type,unsigned int,boost::operators_impl::operators_detail::empty_base>>' being compiled
1> with
1> [
1> T=boost::serialization::version_type
1> ]
1>INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\CL.exe'
1> Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
`

@mclow mclow transferred this issue from boostorg/boost Apr 13, 2021
@JonCavesMSFT
Copy link

Hi: some questions: which 2019 compiler? Using the latest build, the just about to be released 16.10 toolset, the most recent 16.9 and 16.8 toolsets I am not seeing any crash. Also the exact command-line would also be helpful.

Thanks

@dgplayer
Copy link
Author

dgplayer commented Apr 14, 2021 via email

@dgplayer
Copy link
Author

dgplayer commented Apr 14, 2021 via email

@dgplayer
Copy link
Author

dgplayer commented Apr 14, 2021 via email

@dgplayer
Copy link
Author

dgplayer commented Apr 14, 2021 via email

@JonCavesMSFT
Copy link

Hi: thanks for the information but it is not quite what I need. Try adding /Bd /Bv to the command line (and remove /showIncludes) and append that output. I just tried the exact build you reference above, 19.28.29910.0, with a pretty vanilla command line and it built without a crash. Note: I also don't have access to the header files you #include before <boost\bimap.hpp>

Thanks
JonCaves

@dgplayer
Copy link
Author

dgplayer commented Apr 14, 2021 via email

@JonCavesMSFT
Copy link

Perfect! That allows me to see exactly what the problem is: it is the use of '/Gm' (AKA Minimal Rebuild). The use of the switch already gives a driver warning:

cl : Command line warning D9035 : option 'Gm' has been deprecated and will be removed in a future release

And just last week I disabled it in the 'live' compiler. If you remove this switch your code should compile.

Thanks
JonCaves

@dgplayer
Copy link
Author

dgplayer commented Apr 14, 2021 via email

@JonCavesMSFT
Copy link

That isn't an error it is a single warning (with several continuation messages showing the template instantiation stack) and, as warnings are not being treated as errors, the compile succeeds.

I don't know what VCTIP is (or why the call to CreateFile failed) but it doesn't appear to have caused the build to fail.

Thanks
JonCaves

@mclow
Copy link

mclow commented Apr 14, 2021

And the warning for concept_check

1>H:\Svn\ThirdParty-2019\boost_1_75_0\boost\concept_check.hpp(355,12): warning C4834: discarding return value of function with 'nodiscard' attribute

has been fixed, and the fix will appear in the 1.76.0 release (which is imminent)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants