[rrd-users] Solaris10 IEEE optimization problem solved

Dave McGuire mcguire at neurotica.com
Sun Apr 8 08:32:15 CEST 2007


   Hi folks.  I'm new to the list; I just subscribed to mention that  
I've tracked down the IEEE math test failure that many have  
experienced when attempting to build rrdtool v1.2.19 under Solaris 10  
with Studio 11 compiler.  Some have reported that disabling all  
optimization will allow the configure script to complete...This is  
true, but...erm, suboptimal, pun intended.

   Like others who have been bitten by this, I usually use the "- 
fast" cc option with Studio 11.  This is basically a type of macro  
that enables over a dozen other optimization options.  I consulted  
the compiler's documentation to find out specifically which ones they  
are, and eliminated each one in turn until I found the one that  
causes the rrdtool configure script to fail.

   The offending option is "-fsimple=2", an aggressive optimization  
option which, according to the documentation, "allows the optimizer  
to make simplifying assumptions concerning floating-point  
arithmetic."  When this option is enabled, the optimizer performs  
certain somewhat dangerous operations which apparently trip up the  
IEEE math tests in rrdtool's configure script.

   The cc program's option parser is written such that any option,  
including one implied by a macro option like -fast, can be overridden  
by another option placed later on the command line.  I set my CFLAGS  
environment variable thusly:

$ export CFLAGS="-fast -fsimple=0"

   ...where the "-fsimple=0" disables the preceding "-fsimple=2"  
implied by -fast.  This allows the configure script to complete  
successfully, while retaining the remainder of the optimizations  
implied by -fast.  I also tested "-fsimple=1"...this also fails; - 
fsimple=0 is required.

            -Dave

-- 
Dave McGuire
Port Charlotte, FL




More information about the rrd-users mailing list