Home Dashboard Directory Help
Search

error C1027: Inconsistent values for /Ym between creation and use of precompiled header (C++) by bugsurfer


Status: 

Closed
 as Deferred Help for as Deferred


12
0
Sign in
to vote
Type: Bug
ID: 731299
Opened: 3/15/2012 12:05:49 AM
Access Restriction: Public
0
Workaround(s)
view
10
User(s) can reproduce this bug

Description

While working on a small C++ solution, procompiled headers fail from time to time. If I clean and rebuild the project, it works again (for a while).

This happends randomly:
- On the same machine
- In the same session (VS not being restarted)
- Without other compilers or development tools being used

Hadware:
Lenovo ThinkPad w520 / 16 GB Ram (9 GB free), 250 GB SSD (25 GB fee on the C drive used for development).
Details
Sign in to post a comment.
Posted by Kevin.Sisco on 3/13/2013 at 11:05 AM
If you are using CMake there is a workaround for this issue here:

http://connect.microsoft.com/VisualStudio/feedback/details/746718/frequently-get-c1027-from-vc-100-compiler-after-installing-vs-2012-rc
Posted by ixSci on 1/18/2013 at 1:16 AM
Have the same issue from time to time and I don't provide Ym anywhere, only Yc. MSVS 2012 November CTP
Posted by Diego Frata on 12/21/2012 at 2:08 PM
I'm having this issue and I'm not using /Ym directly. The only flag I'm using is /Yu:

/Yu"valor/core/runtime/pre_compiled_headers.hpp" /GS /analyze- /W3 /Zc:wchar_t /I"include" /I"../../../Common/Libraries/3rd/boost_1_47_0" /I"../../../Common/Libraries/3rd/ConvertUTF" /ZI /Gm /Od /Fd"..\..\..\BuildResults\x86\Debug\Valor.Native.Core.Runtime.pdb" /fp:precise /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "VALORNATIVECORERUNTIME_EXPORTS" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /Oy- /MDd /Fa"obj\x86\Debug\" /EHsc /nologo /Fo"obj\x86\Debug\" /Fp"obj\x86\Debug\Valor.Native.Core.Runtime.pch" /Zm1036 /bigobj
Posted by Kevin.Sisco on 11/9/2012 at 7:54 AM
I have the same issue.

I see it in VS 2010 and VS 2012 but it didn't start happening in VS 2010 until after I moved from Vista 64 to Windows 7 64 and installed VS 2012.

I telecommute a lot for more job and I almost always get the problem when I change locations (office to home, home to office). It could be a coincidence but usually after I change locations I have to rebuild some of my projects from scratch and then they are fine until I change locations again.
Posted by Hasan Dogu Taskiran on 6/15/2012 at 7:55 AM
Is there a workaround for this?
Posted by Microsoft on 5/11/2012 at 6:28 PM
Hi: /Ym is an internal switch that is used between the driver (cl.exe) and the parsers (c1.dll and c1xx.dll) it is used to pass the address of the contiguous memory that has been reserved by cl.exe for the PCH. We do this reservation in the driver so that we can reserve the memory as early as possible in the process before too many DLLs have been loaded (and have grabed the memory we need). The compiler requires that the PCH is loaded at exactly the same address during a /Yu build as it was during a /Yc build -- the C1027 error you are seeing implies that in a /Yu build the driver was not able to reserve the memory at the required address.

Please note that we do not officially support this switch and it can be removed entirely from the product. Please remove it from your project settings. Most likely you have no need for it.

Tanveer Gani
Visual C++ Team
Posted by Microsoft on 5/10/2012 at 12:28 AM
Thank you for submitting feedback on Visual Studio 11 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by RolandSaller on 4/23/2012 at 7:18 AM
I have the same problem using VS 2010 SP1.
Posted by MS-Moderator01 on 3/15/2012 at 12:55 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.