Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Help with hitting maximum record length in the compiler with debug info?

jlperla
Beginner
302 Views
I am using Intel 11.1 on Windows 7 x64 (doing a 32bit build with nmake).

I am doing some heavy template metaprogramming, so perhaps the complete templates are getting long. After adding in some namespaces, I am now getting the error on debug compilation:

Debug generation WARNING: Debug information will be incomplete
due to a symbol or type CodeView record exceeding the maximum
record length of 65535. In some cases you can avoid this error
by decreasing the length of identifiers.
The current member is: arg<1>.value



Strangely, it seems to work fine when I did the debug build from within Visual Studio.

Is there any setting or workaround/compiler setting for this? Or should I just get rid of the namespaces, etc.?

Thanks,
Jesse
0 Kudos
10 Replies
jlperla
Beginner
302 Views
Quoting - jlperla
I am using Intel 11.1 on Windows 7 x64 (doing a 32bit build with nmake).

I am doing some heavy template metaprogramming, so perhaps the complete templates are getting long. After adding in some namespaces, I am now getting the error on debug compilation:

One more thing: It only seems to be happening when I use pre-compliled headers? For example, the following on the command line.

/Yc:\working\etk_binaries\etk_headers.pch"
0 Kudos
JenniferJ
Moderator
302 Views
Quoting - jlperla
One more thing: It only seems to be happening when I use pre-compliled headers? For example, the following on the command line.

/Yc:\working\etk_binaries\etk_headers.pch"


Two questions.
1. within VS IDE, it builds ok. Could you paste the compile-option here?
2. above option "/Yc:...", is it used for compilingthe file that gives the warning below?

Jennifer

Debug generation WARNING: Debug information will be incomplete
due to a symbol or type CodeView record exceeding the maximum
record length of 65535. In some cases you can avoid this error
by decreasing the length of identifiers.
The current member is: arg<1>.value

0 Kudos
jlperla
Beginner
302 Views


Two questions.
1. within VS IDE, it builds ok. Could you paste the compile-option here?
2. above option "/Yc:...", is it used for compilingthe file that gives the warning below?

Jennifer

Debug generation WARNING: Debug information will be incomplete
due to a symbol or type CodeView record exceeding the maximum
record length of 65535. In some cases you can avoid this error
by decreasing the length of identifiers.
The current member is: arg<1>.value

--------------------------
Attempt 1, with "nmake" (generated from cmake) and the command flags "/MP /Qstd:c++0x /YX /Fpc:\working\etk_binaries\etk_headers.pch"

Note the /YX and /Fpc: This used to work with intel 11.0 (though perhaps I was using things wrong).
=>THIS CAUSES NO ERRORS, but says that '/YX' is being deprecated, and I read in docs that it is /Yc replaces it. This also creates a precompiled header file.


---------------------------
Attempt 2: same thing, but now following the deprecation advice followed. "nmake" and the flags "/MP /Qstd:c++0x /Yc:\working\etk_binaries\etk_headers.pch"

But now that I doublecheck it, I don't think that it is creating the precompiled headers with the new setting. So this is strange . Am I using the precompiled headres wrong and could that cause problems?

What is the easiest way to get precompiled headers always working with a named file and debug information put into it? I really had a lot of trouble figuring out all the settings in the documentation.

....................................
Attempt 3: using the cmake to generate visual studio files, it compiles without problems and has the following command line. However, I notice now that it isn't generating precompiled header usage here, so this may be a red herring.

/c /Od /I "C:workinglibrariesboost" /I "C:workinglibrariescoin" /I "C:workinglibrariesetk" /I "C:workinglibrariestinyxpath" /I "C:workinglibrariesmumpsmumps" /I "C:workinglibrariesfadbad" /I "C:workinglibrariesloki" /I "C:workinglibrariesknitro" /I "C:appsIntelCompiler11.1�51mklinclude" /I "c:appsmpich2include" /I "C:workinglibrariesquantlib" /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "BOOST_HAS_TR1" /D "HAVE_MA27" /D "HAVE_MC19" /D "HAVE_MUMPS" /D "COIN_HAS_MUMPS" /D "CMAKE_INTDIR="Debug"" /D "_MBCS" /EHsc /RTC1 /MDd /GS /fp:fast /Fo"etk_template.dirDebug" /W3 /nologo /Zi /TP /Zm1000 /MP /Qstd:c++0x


Thanks for your help!
0 Kudos
jlperla
Beginner
302 Views


Two questions.
1. within VS IDE, it builds ok. Could you paste the compile-option here?
2. above option "/Yc:...", is it used for compilingthe file that gives the warning below?

Jennifer

Debug generation WARNING: Debug information will be incomplete
due to a symbol or type CodeView record exceeding the maximum
record length of 65535. In some cases you can avoid this error
by decreasing the length of identifiers.
The current member is: arg<1>.value


One comment I had from my previous code: I had the following at the top of my cpp file:
#include
#pragma hdrstop

...which I thought meant I didn't need to put in the name of a stdafx.hpp style file.

But I took my project and went through the visual studio GUI choosing my equivalent to stdafx. (in c:workinglibrariesetketkall.hpp), etc. The precomplied headers didn't seem to work, but here is the command line:

/c /Od /I "C:workinglibrariesboost" /I "C:workinglibrariescoin" /I "C:workinglibrariesetk" /I "C:workinglibrariestinyxpath" /I "C:workinglibrariesmumpsmumps" /I "C:workinglibrariesfadbad" /I "C:workinglibrariesloki" /I "C:workinglibrariesknitro" /I "C:appsIntelCompiler11.1�51mklinclude" /I "c:appsmpich2include" /I "C:workinglibrariesquantlib" /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "BOOST_HAS_TR1" /D "HAVE_MA27" /D "HAVE_MC19" /D "HAVE_MUMPS" /D "COIN_HAS_MUMPS" /D "CMAKE_INTDIR="Debug"" /D "_MBCS" /EHsc /RTC1 /MDd /GS /fp:fast /Yc"c:workinglibrariesetketkall.hpp" /Fp"etk_template.dirDebug/etk_template.pch" /Fo"etk_template.dirDebug" /W3 /nologo /Zi /TP /Zm1000 /MP /Qstd:c++0x

...and here is the output:
1>------ Build started: Project: etk_template, Configuration: Debug Win32 ------
1>Compiling with Intel C++ 11.1.051 [IA-32]... (Intel C++ Environment)
1>etk_template.cpp
1>etk_template2.cpp
1>using typeof emulation
1>C:workinglibrariesetketk/statistics/ublas_statistics.hpp(87): catastrophic error: error while deleting file "etk_template.dirDebugetk_template.pchi"
1> } } }//ublas
1> ^
1>
1>
1>Debug generation WARNING: Debug information will be incomplete
1>due to a symbol or type CodeView record exceeding the maximum
1>record length of 65535. In some cases you can avoid this error
1>by decreasing the length of identifiers.
1>The current member is: arg<1>.value
1>using typeof emulation
1>icl: error #10298: problem during post processing of parallel object compilation
1>Build log was saved at "file://c:workinglibrariesexamplesetk_templatebuild_visualstudioetk_template.dirDebugBuildLog.htm"
1>etk_template - 2 error(s), 0 warning(s)



0 Kudos
jimdempseyatthecove
Honored Contributor III
302 Views

65535 characters in a record seems a bit excessive even for rather large numbers of nestedtemplates. This error may be due to something else.

I seem to recall a problem that was "fixed" some time ago relating to templates with comments on the close brace line and in particular when the comment had some format or placement quirk (which I do not recall at this time). If you have nothing better to do, try removing the comment from this line:

1> } } }//ublas

(or put a line break after the last }

Jim Dempsey
0 Kudos
jlperla
Beginner
302 Views

65535 characters in a record seems a bit excessive even for rather large numbers of nestedtemplates. This error may be due to something else.

I seem to recall a problem that was "fixed" some time ago relating to templates with comments on the close brace line and in particular when the comment had some format or placement quirk (which I do not recall at this time). If you have nothing better to do, try removing the comment from this line:

1> } } }//ublas

(or put a line break after the last }

Jim Dempsey
Yup, this seemed to work. It was the last header in my precompiled headers before the "hdrstop" , so removing the comment/new line did the trick.

Now, if I could only figure out the mess of settings used in precompiled headeres... creation vs. use, etc. It is all so confusing. Right now I am using the following on the nmake command line:
"/Yd /Yc:\working\etk_binaries\etk_headers.pch"

Will that create/update the header file if required and allow me to reuse it between different .cpp being compiled at the same time (if they all used the #pragma hdrstop after the same header)?

0 Kudos
JenniferJ
Moderator
302 Views
Quoting - jimdempseyatthecove

1> } } }//ublas
(or put a line break after the last }


Wow, good catch with good eyes. THANKS!


Quoting - jlperla
Now, if I could only figure out the mess of settings used in precompiled headeres... creation vs. use, etc. It is all so confusing. Right now I am using the following on the nmake command line:
"/Yd /Yc:\working\etk_binaries\etk_headers.pch"

Will that create/update the header file if required and allow me to reuse it between different .cpp being compiled at the same time (if they all used the #pragma hdrstop after the same header)?


For pch use, you should have one file .cpp with includes to create the .pch file with /Yc, other .cpp files can use it with /Yu.
All the .cpp files should have the common includes at the begining with the same order so one .pch can be used by all others.

Jennifer
0 Kudos
jlperla
Beginner
302 Views
Quoting - jimdempseyatthecove

1> } } }//ublas
(or put a line break after the last }


Wow, good catch with good eyes. THANKS!



For pch use, you should have one file .cpp with includes to create the .pch file with /Yc, other .cpp files can use it with /Yu.
All the .cpp files should have the common includes at the begining with the same order so one .pch can be used by all others.

Jennifer
So there is no way to have it say "create if required and apply the same setting to all of the .cpp files?

If I have "Yc" in the compilation of a .cpp file and their have been no changes to the header files, will it always recompile it or just use it? Can I just put "Yc" on all of my .cpp files and get the same usage?

Also, I have a huge number of libraries being used and almost all of them are templated (I am using 1/2 of boost). There are probably only a couple non-templated funcitons and classes out of tens of thousands. Am I going to get much out of precompiled headers (since I understand that templated functions/classes are only partially compiled/parsed until instantiation)?
0 Kudos
jimdempseyatthecove
Honored Contributor III
302 Views
Quoting - jlperla
So there is no way to have it say "create if required and apply the same setting to all of the .cpp files?

If I have "Yc" in the compilation of a .cpp file and their have been no changes to the header files, will it always recompile it or just use it? Can I just put "Yc" on all of my .cpp files and get the same usage?

Also, I have a huge number of libraries being used and almost all of them are templated (I am using 1/2 of boost). There are probably only a couple non-templated funcitons and classes out of tens of thousands. Am I going to get much out of precompiled headers (since I understand that templated functions/classes are only partially compiled/parsed until instantiation)?

Not having a failing case here I can only throw out suggestons (as I did with the } } }//barf)

If the faulting text "} } }//barf" is generated by the precompiled headers (and you are editing the output) then I suggest you add something to the appropriate header file such that something additional is added there.

As I said in an earlier post, I suspect the problem in the compilerwas a buffer or line alignment issue where the boundary occured in the "} } }//barf" at a sensitive position. Adding code may move the position of the "} } }//barf" and thus hide the problem.

Jim Dempsey
0 Kudos
jlperla
Beginner
302 Views

Not having a failing case here I can only throw out suggestons (as I did with the } } }//barf)

If the faulting text "} } }//barf" is generated by the precompiled headers (and you are editing the output) then I suggest you add something to the appropriate header file such that something additional is added there.

As I said in an earlier post, I suspect the problem in the compilerwas a buffer or line alignment issue where the boundary occured in the "} } }//barf" at a sensitive position. Adding code may move the position of the "} } }//barf" and thus hide the problem.

Jim Dempsey

Sorry, I guess I miscommunicated before. Your previous suggestion solved the problem beautifully! Seems that you can't have comments and a lack of a newline in the last header before #pragma hdrstop.

My responses after this were just to try and figure out how to use precompiled headers and whether they will do my templated-centric code. I should have posted a separate question.

Thanks for your help.
0 Kudos
Reply