bugGNU Octave - Bugs: bug #41335, Building Octave with C++11

 
 

bug #41335: Building Octave with C++11

Submitter:  None
Submitted:  Fri 24 Jan 2014 04:18:25 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Samuel Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 25 Jan 2014 01:17:00 PM UTC, comment #7: 

Thanks for the fast bugfix!

Greetings,
Samuel

PS: I'll donate sth as soon as the fsf donation site doesn't throw a db error anymore. Octave is a fine piece of software :)

Anonymous
Sat 25 Jan 2014 08:25:40 AM UTC, comment #6: 
Mike Miller <mtmiller>
Group Member
Sat 25 Jan 2014 07:43:22 AM UTC, comment #5: 

This change seems fine to me. I'd say go ahead and apply it to stable.

John W. Eaton <jwe>
Group administrator
Sat 25 Jan 2014 06:09:11 AM UTC, comment #4: 

And confirmed building the current stable branch (3.8.0+) with clang 3.3 and libc++ with -std=c++11 on Debian GNU/Linux, same errors encountered there.

Patch attached, if this can be applied safely to stable this patch should work. It works for me with clang 3.3 and with gcc 4.8.2. Otherwise we can wait and fix this on default, and there are other clang bugs to be fixed there with the classdef work, see bug #41178.

(file #30368)

Mike Miller <mtmiller>
Group Member
Fri 24 Jan 2014 06:19:27 PM UTC, comment #3: 

Note that


os.good ()


is not exactly the same thing as


!! os


or


! os.fail ()


which is what the current conversion should be doing. It would be good to try 3.8.0 to make sure of these errors, and also catch any additional compatibility problems at the same time.

Mike Miller <mtmiller>
Group Member
Fri 24 Jan 2014 06:01:25 PM UTC, comment #2: 

That's ok for me, since it compiles with the reported changes.
I just noticed, that the f9bc7b7125e3 commit (default head), I just downloaded from http://hg.savannah.gnu.org/hgweb/octave/, had the same 'bug' as the macports version.

PS: I still find some in the 3.8.0 tag:
http://hg.savannah.gnu.org/hgweb/octave/file/b72bcf5f78cc/libinterp/corefcn/ls-mat4.cc#l588
http://hg.savannah.gnu.org/hgweb/octave/file/b72bcf5f78cc/libinterp/octave-value/ov-cell.cc#l783

Greetings,
Samuel

Anonymous
Fri 24 Jan 2014 04:35:08 PM UTC, comment #1: 

Best to move up to the current version which
is 3.8.0.  It definitely will compile on 10.9.
In a week or so 3.8.1 will be
released, so if you are not in a big hurry
you might choose to wait for that.
Look on the web site for descriptions of the
progress since 3.6.4

Michael Godfrey <godfrey>
Group Member
Fri 24 Jan 2014 04:18:25 PM UTC, original submission:  

When compiling octave 3.6.4 from macports on Mac OS X 10.9 with the cxxflags
    -std=c++11 -stdlib=libc++
and the libflag
    -lc++
some files won't compile, since the compiler cannot convert std::ostream& to bool anymore.

It works, if
    return os;
is replaced with
    return os.good();
in these files:
   ls-mat4.cc
   ov-cell.cc
   ov-class.cc
   ov-fcn-handle.cc
   ov-struct.cc

Greetings,
Samuel

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #30368:  clang-c++11.diff added by mtmiller (4KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by godfrey (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-25 mtmiller StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2014-01-25 mtmiller Attached File- Added clang-c++11.diff, #30368
        StatusNeed Info Patch Submitted
        Release3.6.4 3.8.0
        Operating SystemMac OS Any
    2014-01-24 mtmiller StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code