Fails to build with gcc-7

Bug #1660992 reported by Mattia Rizzolo on 2017-02-01
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Alex Valavanis
inkscape (Debian)
Fix Released
Unknown

Bug Description

As it has been reported in debian in https://bugs.debian.org/853453#8 - build log available there.

I think it has to do with this change: https://gcc.gnu.org/gcc-7/porting_to.html#cmath

relevant failure line (but there are others, see the log):

/src/ui/tools/flood-tool.cpp:253:119: error: call of overloaded 'abs(unsigned int)' is ambiguous
             diff += abs(static_cast<int>(amc ? unpremul_alpha(bmc, amc) : 0) - (amop ? unpremul_alpha(bmop, amop) : 0));

Changed in inkscape (Debian):
status: Unknown → New
su_v (suv-lp) on 2017-02-01
tags: added: build
Changed in inkscape (Debian):
status: New → Confirmed
Alex Valavanis (valavanisalex) wrote :

Sounds like a fairly straightforward fix. I'll take a look.

Changed in inkscape:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Alex Valavanis (valavanisalex)
Alex Valavanis (valavanisalex) wrote :

More specifically, it's this issue: https://gcc.gnu.org/gcc-6/porting_to.html#overloaded-abs

Strictly, we're trying to take the absolute value of an unsigned integer, which doesn't make sense.

What we're *really* wanting to do is to check whether two unsigned ints are close to each other.

Alex Valavanis (valavanisalex) wrote :

Also, note that there are some places where we declare the throw(...) behaviour of functions. This kind of declaration is obsolete.

Alex Valavanis (valavanisalex) wrote :

Fix for the std::abs and throw() issues committed to trunk in r15477

Changed in inkscape:
status: In Progress → Fix Committed
milestone: none → 0.93
Stefan Husmann (stefan-husmann) wrote :

I am facing the same problem in the 0.92.x branch.

Mattia Rizzolo (mapreri) wrote :

somebody wrote a patch to have 0.92.x compile with gcc-7, I linked it here: https://bugs.debian.org/853453#19 - I haven't tested it though.

Maybe that's something that should be fixed for 0.92.x officially too.

Changed in inkscape (Debian):
status: Confirmed → Fix Released
Qantas94Heavy (qantas94heavy) wrote :

Fix released in Inkscape 0.92.2.

Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.