bugGNU Octave - Bugs: bug #45096, image package: imreconstruct FTBFS...

 
 

bug #45096: image package: imreconstruct FTBFS with g++ 5.1

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Wed 13 May 2015 11:44:43 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: otherOperating 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)

Tue 28 Jul 2015 05:00:13 PM UTC, comment #20:

I pushed this instead

http://hg.code.sf.net/p/octave/image/rev/c506938a4ca6

It checks if the compiler displays the buggy behaviour and links the user here if that's the case.

Carnë Draug <carandraug>
Project Member
Mon 20 Jul 2015 10:13:13 PM UTC, comment #19:

The following among many others are in the fedora 22
updates-testing repo:
gcc.x86_64 5.1.1-4.fc22
gcc-arm-linux-gnu.x86_64 5.1.1-2.fc22

So, presumably coming at least before 23...

Michael Godfrey <godfrey>
Project Member
Mon 20 Jul 2015 05:40:16 PM UTC, comment #18:

This is finally applied in gcc-5.1.1-5, but apparently this is not building on arm and so no update has been filed yet. So it's in the works, but not yet there in Fedora.

Orion Poplawski <opoplawski>
Sat 18 Jul 2015 10:27:29 PM UTC, comment #17:

And, it looks like this has been pretty fully
defined. So, anyone who hits this can just read this
bug report. And, the gcc fix will likely have reached
Fedora by the time Octave 4.0 does.

Michael Godfrey <godfrey>
Project Member
Sat 18 Jul 2015 10:23:05 PM UTC, comment #16:

Right:
[godfrey@pbdsl4 EMandG]$ rpm -q --changelog gcc|grep 65843
[godfrey@pbdsl4 EMandG]$

So, it looks like not.

Michael Godfrey <godfrey>
Project Member
Sat 18 Jul 2015 09:16:39 PM UTC, comment #15:

@Michael, to check whether Fedora has the fix applied, look in the rpm changelog (rpm -q --changelog gcc) and look for maybe bug numbers or SVN revision numbers.

Mike Miller <mtmiller>
Project Administrator
Sat 18 Jul 2015 09:08:36 PM UTC, comment #14:

Michael Godfrey said on comment #13:

> Fedora 22 with all curret updates shows:
> gcc-5.1.1-4.fc22.x86_64
> as its version. How does that relate to
> gcc 5.1.1-14? And, does it have the patch?
>
> If not, quite a few users may be affected.


Fedora 22 also only has Octave 3.8. This means that users of the image package can do the following:

  1. - install image package via yum (recommended)
  2. - install the image release 2.2.2 via pkg (why would they do this?)
  3. - build octave 4.0 from source and install the image package via pkg

Only the third case will be affected by this bug. And if they are building octave from source, they should be capable enough to apply this simple patch themselves.

Users of all other release-type distros seems to be unaffected. Rolling-release type of distros will get the gcc fix soon too. So this bug will only affect users of Fedora 22. And Fedora has a short release-cycle and hopefully Fedora 23 will have the gcc bug fixed.

The following will hopefully catch the eye of anyone that ends here and save them the trouble of reading the whole thing.

  • HOW TO FIX THIS WITH GCC 5.1 *

This issue is caused by gcc bug 65843. To workaround this issue, open the image package tarball, and remove the word "const" from lines 154 and 213 of "src/imreconstruct.cc"

Carnë Draug <carandraug>
Project Member
Sat 18 Jul 2015 02:19:46 PM UTC, comment #13:

Fedora 22 with all curret updates shows:
gcc-5.1.1-4.fc22.x86_64
as its version. How does that relate to
gcc 5.1.1-14? And, does it have the patch?

If not, quite a few users may be affected.

Michael Godfrey <godfrey>
Project Member
Sat 18 Jul 2015 03:04:59 AM UTC, comment #12:

Yeah, I honestly don't know. It's up to you if it's worth the effort of adding this check and maintaining it for a very narrow affected subset of gcc versions out there. As far as I'm concerned this bug report is enough documentation for people who may encounter the build failure in the future now that we've determined it actually is a gcc bug and has already been fixed.

Mike Miller <mtmiller>
Project Administrator
Sat 18 Jul 2015 12:15:51 AM UTC, comment #11:

Mike said on comment #10

> Debian testing now has gcc 5.1.1-14, which includes the upstream bug fix,


Do you think that most Linux distributions will be backporting that patch? I'm still unsure about having this fix in the image package. In part because of the extra complexity to the package. But also because it triggers bug #41027 which causes a lot of warnings. I think all those warnings will confuse users and we will get a lot of emails asking about the warnings.

Carnë Draug <carandraug>
Project Member
Fri 17 Jul 2015 03:00:06 AM UTC, comment #10:

Debian testing now has gcc 5.1.1-14, which includes the upstream bug fix, so I can no longer test that the patch works around the regression. But I can verify that configure shows

with your patch and it does compile for me now.

Mike Miller <mtmiller>
Project Administrator
Tue 07 Jul 2015 03:28:49 PM UTC, comment #9:

Sorry, the attached patch.

Orion Poplawski <opoplawski>
Tue 07 Jul 2015 03:23:09 PM UTC, comment #8:

Orion Poplawski said:

> Fixes compilation for me on Fedora Rawhide.


You mean dropping const or the attached patch that changes the build after testing the compiler?

Carnë Draug <carandraug>
Project Member
Tue 07 Jul 2015 03:18:19 PM UTC, comment #7:

Fixes compilation for me on Fedora Rawhide.

Orion Poplawski <opoplawski>
Fri 05 Jun 2015 02:19:03 PM UTC, comment #6:

Could anyone try the attached patch and report if it is good? It requires rerunning bootstrap at the root of the image package, configure, and then make.

It will print a bunch of warnings because of another bug in core, bug #41027

(file #34165)

Carnë Draug <carandraug>
Project Member
Fri 05 Jun 2015 12:58:30 PM UTC, comment #5:

Yes, dropping const fixes it.

Mike Miller <mtmiller>
Project Administrator
Fri 05 Jun 2015 11:42:32 AM UTC, comment #4:

This seems like a regression on gcc. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65843

From that bug report, it suggest that dropping const from imreconstruct.cc lines 154 and 213 does the trick. Can someone please test this?

Carnë Draug <carandraug>
Project Member
Tue 02 Jun 2015 02:53:38 PM UTC, comment #3:

Thank you. In the meantime managed to build all other packages (general, control, and other) with:
setenv CPPFLAGS -D_GLIBCXX_USE_CXX11_ABI=0
because of the g++5.1 changes (https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html)
but the image package still fails.
For the: setenv CXX g++-4.9, I realized that I do not have g++4.9.

-Deleted Account- <ckp>
Tue 02 Jun 2015 01:29:52 PM UTC, comment #2:

Sorry, it's an environment variable, not an Octave workspace variable. The following works for me:

assuming of course you have a system that has a g++-4.9 executable in your PATH.

Mike Miller <mtmiller>
Project Administrator
Mon 01 Jun 2015 10:19:40 PM UTC, comment #1:

Hello, I have similar problems and could not build any octave-forge-package with g++5.1. I have tried also the packages: general, control and image and have reported in the bugs: http://savannah.gnu.org/bugs/?45230.
You mention "If I set CXX=g++-4.9 it compiles fine".
I would be thankful please if you could tell me how to set that flag for the package build. I do not mind setting that flag (instead of the default g++5.1) as long as I can get a built working. I have tried the following:

>> CXX='g++-4.9'

CXX = g++-4.9

>> pkg install image-2.4.0.tar.gz


and the build fails with the same errors.
Thank you.

-Deleted Account- <ckp>
Wed 13 May 2015 11:44:43 AM UTC, original submission:

I am unable to install the image package on Debian testing with g++ 5.1 installed as the default compiler. The only problematic file is imreconstruct.cc. If I set CXX=g++-4.9 it compiles fine.

Here are the error messages from g++, a lot (maybe all?) of it seems to have to do with the 'scan' lambda function:

Mike Miller <mtmiller>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #34165:  workaround_gcc_65843.cset added by carandraug (3KiB - application/octet-stream)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by opoplawski (Posted a comment)
  • -unavailable- added by ckp (Posted a comment)
  • -unavailable- added by mtmiller (Submitted the item)
  •  

    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
    Sat 18 Jul 2015 09:08:36 PM UTCcarandraugStatusPatch Submitted=>Wont Fix
      Open/ClosedOpen=>Closed
    Mon 15 Jun 2015 02:04:51 PM UTCcarandraugStatusConfirmed=>Patch Submitted
    Fri 05 Jun 2015 02:19:03 PM UTCcarandraugAttached File-=>Added workaround_gcc_65843.cset, #34165
    Fri 05 Jun 2015 11:43:58 AM UTCcarandraugDependencies-=>bugs #45257 is dependent
    Tue 02 Jun 2015 01:29:51 PM UTCmtmillerStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1