Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 645624 - media-libs/libnsgif-0.2.0 - src/lzw.c:1:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
Summary: media-libs/libnsgif-0.2.0 - src/lzw.c:1:32: error: unknown option after ‘#pra...
Status: RESOLVED DUPLICATE of bug 642164
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Virgil Dupras (RETIRED)
URL:
Whiteboard:
Keywords:
: 658666 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-01-24 19:54 UTC by Marek Benc
Modified: 2019-02-04 21:38 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,4.32 KB, text/plain)
2018-01-24 19:54 UTC, Marek Benc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Benc 2018-01-24 19:54:39 UTC
Created attachment 516500 [details]
build.log

It seems that as a part of mitigating a -Werror-related FTBFS, the maintainer of the package added a pragma to ignore -Wimplicit-fallthrough.  Unfortunately, since this warning was implemented in GCC 7, it is not available in GCC 6, and there, the build fails with the following error:

powerpc-unknown-linux-gnu-gcc -MMD -MP -D_BSD_SOURCE -D_DEFAULT_SOURCE -I/var/tmp/portage/media-libs/libnsgif-0.2.0/work/libnsgif-0.2.0-abi_ppc_32.ppc/include/ -I/var/tmp/portage/media-libs/libnsgif-0.2.0/work/libnsgif-0.2.0-abi_ppc_32.ppc/src -Wall -W -Wundef -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -pedantic -Werror -mcpu=7450 -O2 -maltivec -mabi=altivec -fno-strict-aliasing -pipe -D_ALIGNED="__attribute__((aligned))" -DNDEBUG  -std=c99 -fPIC -DPIC -o build-release-powerpc-unknown-linux-gnu-release-lib-shared/src_lzw.o -c src/lzw.c
src/lzw.c:1:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
                                ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors


Here is the output of emerge --info:
# emerge --info media-libs/libnsgif
Portage 2.3.19 (python 3.5.4-final-0, default/linux/powerpc/ppc32/17.0/desktop, gcc-6.4.0, glibc-2.25-r9, 4.9.72-gentoo ppc)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.72-gentoo-ppc-7450,_altivec_supported-with-gentoo-2.4.1
KiB Mem:     1030460 total,    126240 free
KiB Swap:    2097148 total,   2096024 free
Timestamp of repository gentoo: Wed, 24 Jan 2018 15:15:01 +0000
Head commit of repository gentoo: 3d8012b536f1ad0d0b6a5155e6156e299d7a7a31
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.cz.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 

ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=7450 -O2 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
CHOST="powerpc-unknown-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/sandbox.d /etc/terminfo"
CXXFLAGS="-mcpu=7450 -O2 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.fi.muni.cz/pub/linux/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
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 acl alsa altivec berkdb big-endian bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk iconv jpeg lcms ldap libnotify mad mng modules mp3 mp4 mpeg ncurses nls nptl ogg openmp pam pango pcre pdf png policykit ppc ppds qt3support readline sdl seccomp spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_PPC="32" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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="ieee1275" 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="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="fbdev" 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_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Marek Benc 2018-01-25 15:32:16 UTC
Same exact problem happens with dev-libs/libcss-0.7.0 (both are dependencies of www-client/netsurf):

 COMPILE: src/parse/parse.c
powerpc-unknown-linux-gnu-gcc -MMD -MP -D_BSD_SOURCE -D_DEFAULT_SOURCE -I/var/tmp/portage/dev-libs/libcss-0.7.0/work/libcss-0.7.0-abi_ppc_32.
ppc/include/ -I/var/tmp/portage/dev-libs/libcss-0.7.0/work/libcss-0.7.0-abi_ppc_32.ppc/src -Wall -W -Wundef -Wpointer-arith -Wcast-align -Wwr
ite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Werror -mcpu=7450 -O2 -maltivec -mabi=altivec -
fno-strict-aliasing -pipe -D_ALIGNED="__attribute__((aligned))" -DNDEBUG  -std=c99  -fPIC -DPIC -o build-release-powerpc-unknown-linux-gnu-re
lease-lib-shared/src_parse_parse.o -c src/parse/parse.c
src/parse/parse.c:2:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
                                ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Comment 2 zlg (RETIRED) gentoo-dev 2018-02-19 01:14:12 UTC
I'm having the same problem, and cannot merge www-client/netsurf as a result.

emerge --info:

Portage 2.3.24 (python 3.4.6-final-0, default/linux/amd64/17.0/developer, gcc-6.4.0, glibc-2.26-r6, 4.14.16-gentoo x86_64)
=================================================================
System uname: Linux-4.14.16-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.4.1
KiB Mem:    16425636 total,   1557744 free
KiB Swap:    8388604 total,   8388604 free
Head commit of repository gentoo: 1aca6ab4a915586e34380e14b316a86881f096f3

sh bash 4.4_p19
ld GNU ld (Gentoo 2.30 p1) 2.30.0
app-shells/bash:          4.4_p19::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.6-r1::gentoo, 3.5.4-r1::gentoo, 3.6.4::gentoo
dev-util/cmake:           3.10.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.30::gentoo
sys-devel/gcc:            4.9.4::gentoo, 6.4.0-r1::gentoo, 7.3.0::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.15::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: rsync://rsync.us.gentoo.org/gentoo-portage
    priority: -1000

zlg-overlay
    location: /home/zlg/projects/overlay
    masters: gentoo

0x4d4c
    location: /var/lib/layman/0x4d4c
    sync-type: laymansync
    sync-uri: https://github.com/0x4d4c/gentoo-overlay.git
    masters: gentoo
    priority: 50

gamerlay
    location: /var/lib/layman/gamerlay
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/gamerlay.git
    masters: gentoo
    priority: 50

games-overlay
    location: /var/lib/layman/games-overlay
    sync-type: laymansync
    sync-uri: git://github.com/hasufell/games-overlay.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

Installed sets: @base, @desktop, @dev, @esteam, @games
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask-enter-invalid --binpkg-respect-use=y --oneshot"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.evowise.com/gentoo/ http://gentoo.gossamerhost.com http://mirror.leaseweb.com/gentoo/ http://gentoo.mirrors.tds.net/gentoo http://cosmos.illinois.edu/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
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 acl acpi alsa amd64 bash-completion branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam flac fortran gdbm gif glamor gtk iconv ipv6 jpeg lcms ldap libnotify mad mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt5 readline sdl seccomp snmp spell ssl startup-notification svg tcpd tiff truetype udev unicode usb vim-syntax vorbis wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" 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" INPUT_DEVICES="keyboard mouse evdev joystick wacom" 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="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6" RUBY_TARGETS="ruby22 ruby23 ruby23 ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

---

Perhaps the `sed` call should be wrapped in a conditional, or the ebuild can make use of the `flag-o-matic` eclass to manage appropriate flags.
Comment 3 Pacho Ramos gentoo-dev 2018-06-27 10:25:30 UTC
*** Bug 658666 has been marked as a duplicate of this bug. ***
Comment 4 Andreas Proteus 2018-10-22 11:01:48 UTC
I managed to build libnsgif, libcss and netsurf by temporarily adding -w to my CFLAGs
Comment 5 Virgil Dupras (RETIRED) gentoo-dev 2018-11-30 03:53:27 UTC

*** This bug has been marked as a duplicate of bug 642164 ***
Comment 6 Larry the Git Cow gentoo-dev 2019-02-04 21:38:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63d944d3b20fd94ec685c538f1eea0a8c1da1644

commit 63d944d3b20fd94ec685c538f1eea0a8c1da1644
Author:     Virgil Dupras <vdupras@gentoo.org>
AuthorDate: 2019-02-04 21:22:05 +0000
Commit:     Virgil Dupras <vdupras@gentoo.org>
CommitDate: 2019-02-04 21:22:05 +0000

    media-libs/libnsgif: bump buildsystem dep
    
    Bug: https://bugs.gentoo.org/645624
    Signed-off-by: Virgil Dupras <vdupras@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 media-libs/libnsgif/libnsgif-0.2.1-r1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)