Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 618350

Summary: media-gfx/inkscape-0.91-r3 complains when compiled with gcc-7.1.0-r1: the argument for abs() must not be unsigned int
Product: Gentoo Linux Reporter: milan hodoscek <milan>
Component: Current packagesAssignee: Gentoo Graphics Project <graphics+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: alexander, b.buschinski, eugene.shalygin, iskatu, jstein, mail, plevine457, thomas, toralf
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/7632
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 617524    
Attachments: gcc-7.1.0 fix
failed build log: error: call of overloaded 'abs(unsigned int)' is ambiguous

Description milan hodoscek 2017-05-13 12:45:30 UTC
media-gfx/inkscape-0.91-r3 complains when compiled with gcc-7.1.0-r1

inly the first operand in the two operand expression is cast
in the flood-tool.cpp file for the abs() functions. I guess the total is still unsingned so I added few more parentheses.
Comment 1 milan hodoscek 2017-05-13 12:47:25 UTC
Created attachment 472494 [details, diff]
gcc-7.1.0 fix

fix for casting the abs() function parameter
Comment 2 milan hodoscek 2017-05-13 12:48:48 UTC
Portage 2.3.5 (python 3.5.3-final-0, default/linux/amd64/13.0/systemd, gcc-7.1.0, glibc-2.24-r1, 4.11.0-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.11.0-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E31245_@_3.30GHz-with-gentoo-2.3
KiB Mem:    16325540 total,   4874920 free
KiB Swap:    3940672 total,   3920192 free
Timestamp of repository gentoo: Fri, 12 May 2017 19:30:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.0) 2.27
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo, 3.5.3::gentoo, 3.6.1-r1::gentoo
dev-util/cmake:           3.8.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.26::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            4.8.5::gentoo, 5.4.0-r3::gentoo, 6.3.0::gentoo, 7.1.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://s6/portage
    priority: -1000

local
    location: /usr/local/portage
    masters: gentoo
    priority: 0

flatpak-overlay
    location: /var/lib/layman/flatpak-overlay
    masters: gentoo
    priority: 50

kde
    location: /var/lib/layman/kde
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

Installed sets: @kde-apps-next, @kde-frameworks-live, @kde-plasma-live, @mykde
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=corei7"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/chromium/policies/managed/chrome-gnome-shell.json /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/opt/chrome/policies/managed/chrome-gnome-shell.json /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=corei7"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=corei7"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j 8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac aacplus aalib acl alac alsa amd64 amr ansi apache2 apng applet assistant audacious audiofile autoipd avahi berkdb bitmapfonts bittorrent boost branding btrfs bzip2 cairo canna cdda cdio cdr cjk clang cli clozurecl clucene cracklib crossdev crypt css curl cxx daap dbus dconf dcraw declarative demosaic device-mapper dga dirac dri dv dvd dvdr dvdread eds egl emacs emovix encode eps exif extensions extra extras f77 faac faad fastcgi fdk ffmpeg flac fltk fontconfig foomaticdb fortran fortran2003 fortran95 frei0r g3dvl gcj gd gdbm gdu gif gimp gimpprint gkrellm glamor gles2 glib gnuplot gphoto2 gsf gstreamer gtk gtk3 gudev gzip hdri hwdb hwinfo iconv icu imagemagick infinality introspection ipv6 java javascript jbig jpeg jpeg2k kde kdenlive kdepim kdrive lapack latex lcms ldap legacy-systray libinput libkms libxml2 lxc mad matplotlib matroska mbox mdnsresponder-compat melt minizip mjpeg mng modemmanager modules mozilla mp3 mp4 mpm-itk multilib multiuser musepack musicbrainz mysql native-exceptions ncurses network networkmanager nftables nls nptl nsplugin nss numpy objc offensive ogg oggvorbis openbabel openexr opengl openmp opus pam pcntl pcre pcre16 pdf perl plasma plotutils png pnm policykit posix postscript preview-latex printsupport private-headers pstricks pulseaudio python python3 qml qt3support qt5 rar readline rendering rle romio rtc sasl schroedinger scipy script scripttools sdl seccomp semantic-desktop session smp smpeg sna sndfile sockets socks5 sox speex spell sql sqlite ssl staging static-libs svc svg systemd tagwriting tbb tcl tcltk tcpd tetex tga theora threads tiff tk tracker truetype udev udisks unicode upcall usb uvm vaapi vala vcd vdr vhosts vim vim-pager vorbis vpx wav wavpack webm webp widgets winbind wmf wxgtk1 x264 xattr xcb xetex xft xinerama xkb xml xmp xorg xvfb xvid xvmc yv12 zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="krita stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="nss" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="us" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="us" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.5 3.6"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

media-gfx/inkscape-0.91-r3::gentoo was built with the following:
USE="cdr dbus exif imagemagick jpeg latex lcms nls openmp postscript spell static-libs -dia -gnome -inkjar -visio -wpg" ABI_X86="64" PYTHON_TARGETS="python2_7"
CFLAGS="-O2 -pipe -march=corei7 -fno-strict-aliasing"
CXXFLAGS="-O2 -pipe -march=corei7 -fno-strict-aliasing -std=c++11"
Comment 3 Jonas Stein gentoo-dev 2017-05-13 18:42:28 UTC
sounds like a fix that should go upstream. Please report to the inkscape team.
Comment 4 milan hodoscek 2017-05-13 20:10:43 UTC
(In reply to Jonas Stein from comment #3)
> sounds like a fix that should go upstream. Please report to the inkscape
> team.

I checked the inkscape web site and they seem to be aware of but I couldn't get their fix. According to a comment the fix in the attachment above seems to be OK. But there will be an upstream fix in the new release of inkscape, so this is just temporary for the media-gfx/inkscape-0.91-r3
Comment 5 milan hodoscek 2017-06-01 08:50:32 UTC
the patch also works for inkscape-0.92.1-r1. The upstream fix might come in 0.93 release ??
Comment 6 Jason A. Donenfeld gentoo-dev 2017-07-17 12:07:55 UTC
Looks like inkscape ships this upstream:

https://gitlab.com/inkscape/inkscape/commit/3876176ec28cac3b70f0b330b760aaa561236ee7.patch

Might be smart to put this in the ebuild?
Comment 7 dE 2017-12-17 09:43:26 UTC
Created attachment 510428 [details]
failed build log: error: call of overloaded 'abs(unsigned int)' is ambiguous

I get 

error: call of overloaded 'abs(unsigned int)' is ambiguous
Comment 8 Jonas Stein gentoo-dev 2018-01-07 22:43:03 UTC
*** Bug 638392 has been marked as a duplicate of this bug. ***
Comment 9 Alexander Tsoy 2018-03-27 07:24:22 UTC
This was already fixed in a stable 0.92.2. Do we really need a fix for 0.91 ?
Comment 10 Peter Levine 2018-03-27 08:41:25 UTC
(In reply to Alexander Tsoy from comment #9)
> This was already fixed in a stable 0.92.2. Do we really need a fix for 0.91 ?

Nope.  I'm just going through all the open GCC-7 bugs.  Close if you wan't.