Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 707758 - games-util/grfcodec-6.0.6: src/command.cpp:306:9: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ [-Wnarrowing], while using gcc-10
Summary: games-util/grfcodec-6.0.6: src/command.cpp:306:9: error: narrowing conversion...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard: ~arch only
Keywords: PullRequest
: 732770 (view as bug list)
Depends on:
Blocks: gcc-10
  Show dependency tree
 
Reported: 2020-02-01 12:49 UTC by lekto
Modified: 2021-01-01 14:50 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,5.65 KB, text/plain)
2020-02-01 12:49 UTC, lekto
Details
build.log (build.log,29.40 KB, text/plain)
2020-02-01 12:50 UTC, lekto
Details
patch (bug707758.patch,440 bytes, patch)
2020-05-16 09:06 UTC, lekto
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lekto 2020-02-01 12:49:53 UTC
Created attachment 610408 [details]
emerge --info

x86_64-pc-linux-gnu-g++ -c -o objs/command.o -idirafter/usr/include  -DGCC32 -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wno-format-nonliteral -DWITH_FMEMOPEN -DWITH_PNG -I/usr/include/libpng16 -O2 -march=native -pipe -MMD -MF objs/command.o.d -MT objs/command.o src/command.cpp
src/command.cpp: In function ‘bool parse_comment(const string&)’:
src/command.cpp:306:9: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ [-Wnarrowing]
  306 |   case -1:
      |         ^
Comment 1 lekto 2020-02-01 12:50:15 UTC
Created attachment 610410 [details]
build.log
Comment 2 lekto 2020-05-16 09:06:20 UTC
Created attachment 639508 [details, diff]
patch
Comment 3 Iñigo 2020-07-03 06:57:07 UTC
Portage 2.3.103 (python 3.7.8-final-0, default/linux/amd64/17.1/desktop/gnome, gcc-10.1.0, glibc-2.31-r5, 5.7.6-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.7.6-gentoo-x86_64-Intel-R-_Core-TM-_i5-6300U_CPU_@_2.40GHz-with-gentoo-2.7
KiB Mem:    16273212 total,   1426512 free
KiB Swap:    3929084 total,   3928536 free
Timestamp of repository gentoo: Fri, 03 Jul 2020 02:00:01 +0000
Head commit of repository gentoo: ab920b9d80f7c69355afe027e16ded68562cab15
sh bash 5.0_p17
ld GNU ld (Gentoo 2.34 p4) 2.34.0
app-shells/bash:          5.0_p17::gentoo
dev-lang/perl:            5.30.3-r1::gentoo
dev-lang/python:          2.7.18::gentoo, 3.7.8::gentoo, 3.8.3::gentoo, 3.9.0_beta3::gentoo
dev-util/cmake:           3.17.3::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2::gentoo
sys-devel/binutils:       2.34-r1::gentoo
sys-devel/gcc:            10.1.0-r1::gentoo
sys-devel/gcc-config:     2.3.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

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

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

thegreatmcpain
    location: /var/lib/layman/thegreatmcpain
    masters: gentoo bobwya
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.bytemark.co.uk/gentoo/ https://mirror.bytemark.co.uk/gentoo/ http://mirror.bytemark.co.uk/gentoo/ rsync://mirror.bytemark.co.uk/gentoo/ http://mirrors.evowise.com/gentoo/ https://mirrors.evowise.com/gentoo/ https://www.mirrorservice.org/sites/distfiles.gentoo.org/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/ ftp://ftp.mirrorservice.org/sites/distfiles.gentoo.org/ rsync://rsync.mirrorservice.org/distfiles.gentoo.org/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/var/cache/binpkgs"
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 aalib acl acpi alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli colord crypt cups dbus dri dts dvd dvdr eds egl elogind emboss encode evo exif fbcon flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk highlight iconv icu introspection ipv6 jpeg lcms ldap libcaca libnotify libsecret libtirpc mad mng mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp spell split-usr ssl startup-notification svg tcpd tiff tracker truetype udev udisks unicode upower usb vorbis vulkan vulkan-overlay wayland wxwidgets x264 xattr xcb xml xv xvid zlib zsh-completion" ABI_X86="32 64" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby25" 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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2020-07-19 09:40:24 UTC
*** Bug 732770 has been marked as a duplicate of this bug. ***
Comment 5 rnddim 2020-08-07 08:11:30 UTC
I just encountered this bug as well. Could it be the GCC version? (I have 10.2).
Comment 6 Jiří Helebrant 2020-08-11 11:35:57 UTC
Upstream bugreport here: https://github.com/OpenTTD/grfcodec/issues/5 (with a link to a Fedora patch)
Comment 7 Larry the Git Cow gentoo-dev 2020-10-22 21:09:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33caed6639914466158fa7c7a16b8e09773a473e

commit 33caed6639914466158fa7c7a16b8e09773a473e
Author:     Matt Smith <matt@offtopica.uk>
AuthorDate: 2020-10-17 13:53:18 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2020-10-22 21:08:16 +0000

    games-util/grfcodec: Fix build failure with GCC 10
    
    Patch taken from Fedora's grfcodec package.
    
    Closes: https://bugs.gentoo.org/707758
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Matt Smith <matt@offtopica.uk>
    Closes: https://github.com/gentoo/gentoo/pull/17954
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 games-util/grfcodec/files/grfcodec-6.0.6-gcc10.patch | 12 ++++++++++++
 games-util/grfcodec/grfcodec-6.0.6.ebuild            |  4 +++-
 2 files changed, 15 insertions(+), 1 deletion(-)