Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519856 - x11-misc/xscreensaver-5.29 with sys-devel/gcc-4.5.4 - memscroller.c:353:12: error: #pragma GCC diagnostic not allowed inside functions
Summary: x11-misc/xscreensaver-5.29 with sys-devel/gcc-4.5.4 - memscroller.c:353:12: e...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-14 00:42 UTC by Ulrich Fieseler
Modified: 2014-08-22 07:18 UTC (History)
0 users

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


Attachments
build.log from emerge -B xscreensaver with gcc 4.5.4 (build.log,182.45 KB, text/plain)
2014-08-14 00:47 UTC, Ulrich Fieseler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Fieseler 2014-08-14 00:42:46 UTC
When updating xscreensaver to version 5.29 with gcc 4.5.4 in place (more precisely, set to x86_64-pc-linux-gnu-4.5.4 using gcc-config), compilation fails with various error messages regarding "#pragma GCC diagnostic" not being allowed within functions. With gcc 4.6.3 (changed using gcc-config to x86_64-pc-linux-gnu-4.6.3) update works fine.

The ebuild should be changed to make sure gcc 4.6.3 (or whatever least version appropriate) is used (like libreoffice's ebuild does). See bugs #475494 or #491378 for similar problems.

Reproducible: Always

Output of emerge --info '=x11-misc/xscreensaver-5.29':

Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/kde, gcc-4.5.4, glibc-2.19-r1, 3.8.13-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.8.13-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1100T_Processor-with-gentoo-2.2
KiB Mem:    16439096 total,   5434440 free
KiB Swap:   25165820 total,  25165820 free
Timestamp of tree: Wed, 13 Aug 2014 12:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.7, 3.3.5-r1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.3.6-r1, 4.4.7, 4.5.4, 4.6.3, 4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo kde-sunset local_overlay
ACCEPT_KEYWORDS="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/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://ftp.halifax.rwth-aachen.de/gentoo http://distfiles.gentoo.org"
LANG="de_DE"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j7"
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"
PORTAGE_TMPDIR="/dev/shm"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/kde-sunset /usr/local/portage"
SYNC="rsync://ftp.halifax.rwth-aachen.de/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aacplus aacs acl acpi alsa amd64 amr avahi berkdb bittorrent blas bluetooth bluray branding bzip2 cairo caps cblas-external cdda cddb cdparanoia cdr cg chm cli consolekit cracklib crypt cuda cups cxx dbus declarative dga djvu dri dts dv dvb dvd dvdr dvi ebook emboss encode exif fam ffmpeg fftw firefox flac fontconfig fortran g3dvl gdbm gif git glew glut gphoto2 gpm graphviz gsm gstreamer http iconv id3tag idn ieee1394 imagemagick java jpeg kde kdeprefix kipi kpathsea ladspa lame lapack latex lcms ldap libnotify libvisual lzma mad mercurial mms mmx mmxext mng modules mozilla mp3 mp4 mpeg mplayer multilib musepack musicbrainz ncurses network nls nptl nsplugin nvidia ogg okular openal opencl opengl openmp openssl pam pango pcre pdf phonon plasma png policykit postproc postscript ppds pstricks qt3 qt3support qt4 qthelp quicktime readline rtmp samba scanner schroedinger sdl semantic-desktop session sndfile speex spell sse sse2 sse3 sse4a ssl startup-notification subversion svg t1lib tcpd theora threads thumbnail tiff truetype udev udisks upower usb v4l v4l2 vcd vdpau vorbis vpx wavpack windeco wmf wxwidgets x264 xcb xcomposite xine xml xscreensaver xv xvid xvmc 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" CAMERAS="ptp2 agfa_cl20" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en ru" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby20" SANE_BACKENDS="snapscan hp" USERLAND="GNU" VIDEO_CARDS="nvidia 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

x11-misc/xscreensaver-5.29 was built with the following:
USE="jpeg opengl pam perl -gdm -new-login (-selinux) -suid -xinerama" ABI_X86="64"
Comment 1 Ulrich Fieseler 2014-08-14 00:47:48 UTC
Created attachment 382860 [details]
build.log from emerge -B xscreensaver with gcc 4.5.4
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-20 08:38:42 UTC
What do you need gcc 4.5.4 for?
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-20 08:44:52 UTC
Please test with this patch:


--- a/hacks/memscroller.c
+++ b/hacks/memscroller.c
@@ -349,7 +349,7 @@
          from earlier days before the advent of virtual memory management."
             -- sbrk(2) man page on MacOS
        */
-#  if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) /* gcc >= 4.2 */
+#  if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) /* gcc >= 4.6 */
 #   pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #  endif
       himem = ((unsigned char *) sbrk(0)) - (2 * sizeof(void *));
Comment 4 Ulrich Fieseler 2014-08-21 23:08:03 UTC
Provided patch fixes compilation problem (test of resulting binary is currently impossible due to remote access of affected system, sorry). I tried to apply the patch by means of the user patch facility (/etc/portage/patches/...), but that seems to be missing from the ebuild and required patching it first (or am I missing something?):

--- /usr/portage/x11-misc/xscreensaver/xscreensaver-5.29.ebuild 2014-08-20 10:31:19.000000000 +0200
+++ xscreensaver-5.29.ebuild    2014-08-22 00:41:01.929876221 +0200
@@ -75,6 +75,9 @@
                "${FILESDIR}"/${PN}-5.20-tests-miscfix.patch \
                "${FILESDIR}"/${PN}-5.28-comment-style.patch

+        # apply user patches
+        epatch_user
+
        eautoconf
        eautoheader
 }
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-22 07:18:46 UTC
I added epatch_user, too.