Bug#906708: hepmc: FTBFS on i386 / arm64 / ppc64el / s390x

Adrian Bunk bunk at debian.org
Mon Aug 20 18:54:33 BST 2018


On Mon, Aug 20, 2018 at 04:19:43PM +0000, Lumin wrote:
> control: tags -1 +patch +confirmed
> 
> > Fix attached.
> 
> > -  double eps = 1.e-15; // allowed differnce between doubles
> > +  double eps = 4.e-15; // allowed difference between doubles
> 
> No no no, please DON'T do this!
> 
> This precision issue is triggered by a GCC optimization bug,

Most of the time when people claim something would be a GCC bug
it turns out to be a bug in the software.

Do you have a bug number in the upstream gcc Bugzilla or a testcase
demonstrating that GCC violates the standard?

> and simply bumping floating point tolerance for scientific software
> especially physics software is bad....

That's what upstream does.

Differences in floating point results are a complicated topic.

And it is for example well-known that the x87 excess precision
does cause different results depending on the exact pattern of
FPU usage - which nicely explains the difference on i386.

> The fix of this RC is to simply change the default compiler to Clang.
> Or disable -O2 optimization with -O0
> 
> the real patch:
> 
> debian/rules:
> export CC=clang
> export CXX=clang++

No no no, please DON'T do this!

Note that the only thing that would need to be compiled with lower 
optimization would the the testcase (tested on i386), in this case the 
difference is not in the library (the relevant code isinline in the header).

If this is actually a compiler bug (which I doubt) then compiling the 
testcase with lower optimization would not fix anything.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



More information about the debian-science-maintainers mailing list