SCIENTIFIC-LINUX-USERS Archives

September 2007

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Glenn Horton-Smith <[log in to unmask]>
Reply To:
Glenn Horton-Smith <[log in to unmask]>
Date:
Wed, 5 Sep 2007 15:36:03 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
Greetings,

   It seems that SL4's gcc4-c++ package ("GCC version 4.1 preview") 
doesn't install gcc 4.1's include files, but instead g++4 is configured 
to use gcc3.4.3's include files ("g++4 -v" reports the 
"--with-gxx-include-dir=/usr/include/c++/3.4.3" option was used).  This 
causes an enormous quantity of dire warning messages from various 
standard library classes (including <string>) when compiling almost 
anything with -O2 (such as CLHEP2 uses by default).  These warnings are 
all to the effect that "dereferencing type-punned pointer will break 
strict-aliasing rules."

   This almost seems like it might be a mistake, and it is actually a 
problem for me, as my whole reason for trying to compare gcc4 and 
gcc3.4.3 was to try to diagnose a discrepancy we think we're seeing in 
the behavior of a Geant4 simulation compiled with gcc4 on one system vs. 
gcc3.4.3 on another.  In particular, I've become somewhat suspicious of 
the type-punning in CLHEP2 because of a number of gcc bug reports of 
incorrect code being generated by gcc4.1 due to incorrect 
strict-aliasing optimizations.  But with g++4 configured to use a 
standard template library that's not compatible with g++4, I don't see 
there's much point in proceeding with it as is.

   So, my question: is it possible to get gcc4* rpms for SL4 which 
install and use /usr/include/c++/4.1.1?  (Also the corresponding version 
of libstdc++, for that matter.)  If yes, it will save me some work; if 
not, I guess I'll have to install GCC4 from source if I want to make the 
comparison.

             Best regards,
                            -Glenn Horton-Smith

ATOM RSS1 RSS2