bugGNU Octave - Bugs: bug #47212, Faddeeva build failure: need...

 
 

bug #47212: Faddeeva build failure: need better configure test for std::isinf / std::isnan

Submitted by:  None
Submitted on:  Sun 21 Feb 2016 02:16:12 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: FixedAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 23 Mar 2016 06:23:42 AM UTC, comment #6:

I fixed this in a slightly different way on the default branch here:

http://hg.savannah.gnu.org/hgweb/octave/rev/ffbd3e86e0be

If this doesn't fix the problem for you let us know on this bug report.

Mike Miller <mtmiller>
Project Administrator
Fri 04 Mar 2016 01:37:33 AM UTC, comment #5:

No build failures now! Thank you Mike!

There are still the unrelated failures related to inf and nan described in bug #47214, but if not many users have old compilers, that can be downgraded at your discretion.

Anonymous
Thu 03 Mar 2016 09:52:58 PM UTC, comment #4:

Can you please try the attached patch? The configure tests have actually already been in place for quite a while, but Fadeeva uses its own faulty logic. Let me know if this patch allows you to compile with gcc 4.6 (you shouldn't have to run configure again, just patch and make if you have an already partially-built tree).

(file #36538)

Mike Miller <mtmiller>
Project Administrator
Thu 03 Mar 2016 05:56:58 PM UTC, comment #3:

Yes, the intention is to use std::isinf and std::isnan when building under C++11, see

http://hg.savannah.gnu.org/hgweb/octave/file/0196666bf900/liboctave/cruft/Faddeeva/Faddeeva.cc#l184

The way it tells that the compiler is building to the C++11 standard is by the value of the __cplusplus macro. Unfortunately, gcc 4.6 doesn't do this correctly (probably because it was still early in the development to the standard).

With gcc 4.6 on Ubuntu 12.04:

These macros are supposed to be

So the logic in Fadeeva.cc is failing here. I think this could actually be improved by checking for std::isinf and std::isnan in configure rather than relying on the C++ version.

Mike Miller <mtmiller>
Project Administrator
Sun 21 Feb 2016 05:29:02 PM UTC, comment #2:

Thanks for the report. I also see that you are building with gcc 4.6, which may be partially to blame. There may have been fixes to the libstdc++ headers that are relevant to this resolution error. I don't see any build errors with gcc 5.3.1.

We may still want to make this change to accomodate older compilers.

Mike Miller <mtmiller>
Project Administrator
Sun 21 Feb 2016 02:27:07 PM UTC, comment #1:

Changing isnan and isinf to std::isnan and std::isinf in Fadeeva.cc solves the build problem.

Please verify that the semantics are equivalent.

Anonymous
Sun 21 Feb 2016 02:16:12 PM UTC, original submission:

This may be a namespace side-effect of the move to C++11. An overloaded function "isnan(double&)" in Faddeeva is ambiguous and is mapped to the wrong function.

Could the authors of Faddeeva specify the namespace to be used for isnan? Is it std::isnan?

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #36538:  bug47212.diff added by mtmiller (1KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 23 Mar 2016 06:23:42 AM UTCmtmillerStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Thu 03 Mar 2016 09:52:58 PM UTCmtmillerAttached File-=>Added bug47212.diff, #36538
      StatusConfirmed=>Patch Submitted
    Thu 03 Mar 2016 05:56:58 PM UTCmtmillerStatusNone=>Confirmed
      SummaryFaddeeva build failure due to unresolved namespace=>Faddeeva build failure: need better configure test for std::isinf / std::isnan

    Back to the top


    Powered by Savane 3.1-cleanup1