bugGNU Octave - Bugs: bug #49306, octave-image 2.6.0 fails to build...

 
 

bug #49306: octave-image 2.6.0 fails to build using clang++

Submitted by:  Marius Schamschula <mschamschula>
Submitted on:  Mon 10 Oct 2016 06:09:56 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: FixedAssigned to: None
Originator Name: Marius SchamschulaOpen/Closed: Closed
Release: 4.0.3Operating System: Mac OS

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)

Tue 11 Oct 2016 02:41:11 PM UTC, comment #6:

Cool. I have pushed the change to the official repo http://hg.code.sf.net/p/octave/image/rev/37b23774302f

I will wait a few more days for others to report any regressions and build issues and then make a 2.6.1 release.

Carnë Draug <carandraug>
Project Member
Tue 11 Oct 2016 01:53:35 PM UTC, comment #5:

The update on mercurial configured and built w/o any errors (tested under macOS 10.12.0 Sierra), save the need to have generate_html and md5sum installed (md5sum is not in OS X/macOS, but can be installed via the md5sha1sum ports in MacPorts or Homebrew).

Marius Schamschula <mschamschula>
Tue 11 Oct 2016 01:30:07 PM UTC, comment #4:

I have made some changes to use the ac_prog_cxx provided by gnulib (what Octave core and the parallel packages are now doing as well). Can you please check if the package generated this way would work for Mac?

Carnë Draug <carandraug>
Project Member
Tue 11 Oct 2016 09:00:50 AM UTC, comment #3:

This could be the issue with a too old version of src/m4/std-gnu11.m4, as pointed out by Mike Miller for one of 'my' packages. (The image package, IIRR, uses only a part of this macro, but could do a respective update.)

Olaf Till <i7tiol>
Project Member
Mon 10 Oct 2016 07:28:26 PM UTC, comment #2:

With the same configuration (octave 4.0.3 and clang++) I have no issue building octave-parallel 3.1.1, which also requires C++11, on all versions of OS X/macOS that support C++11.

Marius Schamschula <mschamschula>
Mon 10 Oct 2016 06:55:38 PM UTC, comment #1:

Just a note about compilers:

src/configure seems to fail to determine that clang++ supports C++11.

I "manually" ran configure from within the src directory, and it successfully configured against g++, in my case g++ 6.2.0.

Running make, however, invokes clang++, and succeeds with the edit shown.

Marius Schamschula <mschamschula>
Mon 10 Oct 2016 06:09:56 PM UTC, original submission:

There is a problem building image 2.6.0 under macOS using clang++:

/opt/local/bin/mkoctfile -Wall -g -O2 -c connectivity.cc
In file included from connectivity.cc:17:
./connectivity.h:42:27: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
connectivity () = default;
^
./connectivity.h:179:10: error: expected expression
fill = [&] (const octave_idx_type dim) -> void
^
./connectivity.h:170:6: warning: unused variable 'im_v' [-Wunused-variable]
P* im_v = im.fortran_vec ();
^
connectivity.cc:341:3: note: in instantiation of function template specialization 'octave::image::connectivity::set_padding<boolNDArray, bool>' requested here
set_padding (size, padded_size, mask, true);
^
2 warnings and 1 error generated.
make: *** [connectivity.o] Error 1

It turns out, that clang++ wants to be given the language standard as an argument.

I solved this issue by manually adding -std=c++11 to FLAGGED_MKOCTFILE in src/Makefile

This should happen programmatically.

Marius Schamschula <mschamschula>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by i7tiol (Posted a comment)
  • -unavailable- added by mschamschula (Submitted the item)
  • -unavailable- added by mschamschula
  •  

    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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 11 Oct 2016 02:41:17 PM UTCcarandraugStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 10 Oct 2016 06:09:56 PM UTCmschamschulaCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1