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 Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Marius Schamschula Open/Closed:  Closed
Release:  4.0.3 Operating 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)

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?

hg clone -b stable https://bitbucket.org/carandraug/octave-image
cd octave-image
hg up macosx-clang-cxx11-bug49306
make release
## the package will be on target/image-2.6.0.tar.gz

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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only project members can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-10-11 carandraug StatusNone => Fixed
        Open/ClosedOpen => Closed
    2016-10-10 mschamschula Carbon-Copy- => Added mschamschula@gmail.com

    Back to the top


    Powered by Savane 3.5