Summary: | games-board/gnubg: local common.h breaks __attribute__ | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Helmut Jarausch <jarausch> |
Component: | [OLD] Games | Assignee: | Gentoo Games <games> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | octoploid, vapier |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://lists.gnu.org/archive/html/bug-gnubg/2015-07/msg00011.html | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 536984 |
Description
Helmut Jarausch
2015-06-12 15:40:05 UTC
Could you compile it with -fsanitize=undefined and see if anything pops up? Also many bugs were already fixed on the gcc-5 branch. Please try a newer gcc snapshot. (In reply to octoploid from comment #1) > Could you compile it with -fsanitize=undefined and see if anything pops up? The strange thing, it works, as well as when compiled with gcc-6.0.0-alpha20150531 without this option. Thanks, Helmut doesn't really seem to be a game bug to me. Same here with gcc-5.2.0 and -fsanitize=undefined. (In reply to Michael Weber from comment #5) > Same here with gcc-5.2.0 and -fsanitize=undefined. gcc-5.2.0 and -O0 works. # emerge --info Portage 2.2.20.1 (python 2.7.10-final-0, default/linux/amd64/13.0/developer, gcc-5.2.0, glibc-2.21-r1, 4.0.5-gentoo-headless.0 x86_64) ================================================================= System uname: Linux-4.0.5-gentoo-headless.0-x86_64-Intel_Core_2_Duo_P9xxx_-Penryn_Class_Core_2-with-gentoo-2.2 KiB Mem: 3948808 total, 980172 free KiB Swap: 2097148 total, 2076920 free sh bash 4.3_p42 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 distcc 3.2rc1 x86_64-pc-linux-gnu [disabled] ccache version 3.2.3 [enabled] app-shells/bash: 4.3_p42::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.22.0::gentoo dev-lang/python: 2.7.10::gentoo, 3.4.3::gentoo dev-util/ccache: 3.2.3::gentoo dev-util/cmake: 3.3.1-r1::gentoo dev-util/pkgconfig: 0.28-r3::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.17::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.10.3::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.9.3::gentoo, 5.2.0::gentoo sys-devel/gcc-config: 1.8::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.21-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: git://git.gentoo.org/repo/gentoo.git priority: -1000 ceres location: /etc/portage/overlay masters: gentoo priority: 0 fslmude location: /var/lib/layman/fslmude sync-type: git sync-uri: git://git.fs.lmu.de/fslmude-overlay.git masters: gentoo priority: 50 gamerlay location: /var/lib/layman/gamerlay sync-type: git sync-uri: git://git.gentoo.org/proj/gamerlay.git masters: gentoo priority: 50 java location: /var/lib/layman/java sync-type: git sync-uri: git://anongit.gentoo.org/proj/java.git masters: gentoo priority: 50 lorem_ipsum location: /var/lib/layman/lorem_ipsum sync-type: git sync-uri: git://github.com/lorem-ipsum/ebuilds.git masters: gentoo priority: 50 xmw location: /var/lib/layman/xmw sync-type: git sync-uri: git://anongit.gentoo.org/dev/xmw.git masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=core2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/bin/trivdm /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb /var/spool/munin-async/.ssh" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/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=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=core2" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS=" --buildpkg y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildpkg ccache cgroup collision-protect compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-log strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="https://lore.xmw.de/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" PKGDIR="/var/cache/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="/var/tmp" USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx djvu dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jbig jpeg jpeg2k lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 raw readline sdl seccomp session snmp spell sse sse2 ssl ssse3 startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vim-syntax vorbis wxwidgets x264 xcb xml xv xvid zlib zsh-completion" ABI_X86="64" ALSA_CARDS="intel-hda" 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" 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 en_US en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="i965 intel nvidia radeon" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON if you build with -O2 -fno-builtin, does it work ? it's a bug in gnubg. their common.h does: #if !_GNU_SOURCE && !defined (__attribute__) #define __attribute__(X) #endif and then it proceeds to include glibc headers. since glibc relies on gcc attributes, things start to fall down quickly. specifically, the problem here is that w/newer gcc defaulting to a newer C standard where the behavior of "static inline" has changed. glibc would use __attribute__((gnu_inline)) on the string functions to get the correct behavior, but gnubg has broken that. that leads to copying.c including string.h which ends up including local dummy copies of the string functions (like memset). so when gnubg starts up, glibc and such libraries call memset which is the dummy call in gnubg which calls itself thus getting stuck. i e-mailed upstream and cc-ed people in that older thread (although for some reason my e-mail isn't showing up in the archive) in the mean time, i committed this hack: http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e121815fa352616db9031e5c366065c577795b22 |