11.0: PCH broken under Linux/intel64?

11.0: PCH broken under Linux/intel64?

VZ's picture

Hello,

I've just updated to 11.0 from 9.0 under Linux (Debian 4.0)/intel64 and PCH support doesn't seem to work any longer. Even in the simplest example with an empty header file header.hpp and 2 files src1.cpp and src2.cpp including and containing an empty main() in src1.cpp and nothing else at all in src2.cpp I get this:

% icpc -pch-create src.pch -Wall -c -o src1.o src1.cpp && icpc -pch-use src.pch -Wall -c -o src2.o src2.cpp && icpc -o src src[12].o
"src1.cpp": creating precompiled header file "src.pch"
Warning #677: memory usage conflict with precompiled header file "src.pch"

And the PCH is not used. Does anybody know what does this "memory usage conflict" mean exactly and how to avoid it?

I've found an advice to remove the stack size limit (ulimit -s unlimited) to fix this but it doesn't change anything for me. Nor does using (or not) #pragma hdrstop nor using plain -pch nor doing just about anything else I could think about.

Am I doing something horribly wrong or is PCH support really broken in this compiler version?

Thanks in advance for any help!
VZ

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
YannGolanski's picture
Quoting - VZ

Nor does using (or not) #pragma hdrstop nor using plain -pch nor doing just about anything else I could think about.

I believe that #pragma is a windows only addition.

-- Nescire autem quid ante quam natus sis acciderit, id est semper esse puerum. Quid enim est aetas hominis, nisi ea memoria rerum veterum cum superiorum aetate contexitur?
VZ's picture
Quoting - nanometrics Quoting - VZ

Nor does using (or not) #pragma hdrstop nor using plain -pch nor doing just about anything else I could think about.

I believe that #pragma is a windows only addition.

Thanks for your reply but unfortunately this doesn't really help as I had initially started without this #pragma and only tried it in desperation later.

Anyhow, to answer my own question, it does look like PCH support is broken in 11.0, at least in Linux/Intel64 version, as installing 10.1.021 (build 20081024) on the same machine and running the exact same command with it results in the expected

"src1.cpp": creating precompiled header file "src.pch"
"src2.cpp": using precompiled header file "src.pch"

output.

I'm rather puzzled how could such bug make it into a released version of the compiler but well, I'll just use v10 for now and hope for a fix in a later version.

VZ

Login to leave a comment.