Created attachment 335004 [details] build log CCLD udevadm ./.libs/libudev-core.a(util.o): In function `safe_atolu': /var/tmp/portage/sys-fs/udev-197/work/systemd-197/src/shared/util.h:136: undefined reference to `_Static_assert' collect2: ld returned 1 exit status make: *** [systemd-udevd] Error 1 make: *** Waiting for unfinished jobs.... ./.libs/libudev-core.a(util.o): In function `safe_atolu': /var/tmp/portage/sys-fs/udev-197/work/systemd-197/src/shared/util.h:136: undefined reference to `_Static_assert' collect2: ld returned 1 exit status make: *** [udevadm] Error 1 * ERROR: sys-fs/udev-197 failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=sys-fs/udev-197'`, * the complete build log and the output of `emerge -pqv '=sys-fs/udev-197'`. * The complete build log is located at '/var/tmp/portage/sys-fs/udev-197/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-fs/udev-197/temp/environment'. * Working directory: '/var/tmp/portage/sys-fs/udev-197/work/systemd-197' * S: '/var/tmp/portage/sys-fs/udev-197/work/systemd-197'
Created attachment 335006 [details] environment
Portage 2.1.11.38 (default/linux/amd64/10.0, gcc-4.5.4, glibc-2.16.0, 3.7.1-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.7.1-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9450_@_2.66GHz-with-gentoo-2.2 Timestamp of tree: Thu, 10 Jan 2013 00:30:01 +0000 ld GNU ld (GNU Binutils) 2.23.1 app-shells/bash: 4.2_p42 dev-lang/python: 2.7.3-r3, 3.2.3-r2 dev-util/cmake: 2.8.10.2-r1 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.69 sys-devel/automake: 1.11.6, 1.12.6 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.5.4, 4.6.3 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.7 (virtual/os-headers) sys-libs/glibc: 2.16.0 Repositories: gentoo ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=core2 -ggdb -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" 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" CXXFLAGS="-O2 -march=core2 -ggdb -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--jobs=4" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="rsync://mirror.mcs.anl.gov/gentoo/ rsync://rsync.gtlib.gatech.edu/gentoo rsync://mirrors.rit.edu/gentoo/ http://gentoo.osuosl.org/ http://gentoo.netnitco.net http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://mirror.datapipe.net/gentoo ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.mirrors.easynews.com/linux/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://gentoo.imj.fr/pub/gentoo/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="--jobs=2 --load-average=7" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 acl amd64 avahi avi berkdb bzip2 cairo cli cracklib crypt cups cxx dbus divx dri dv dvd dvdread encode fame fortran gdbm gpm iconv ipv6 jpeg kvm mjpeg mmx modules mp3 mpeg mudflap multilib ncurses nls nptl ogg openmp pam pcre pppd python quicktime readline session sse sse2 sse3 ssl subtitles tcpd unicode vorbis xvid zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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" CAMERAS="ptp2" 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 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="en en_US" PHP_TARGETS="php5-3 php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="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: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
[ebuild U ] sys-fs/udev-197 [196-r1] USE="acl kmod openrc -doc -gudev -hwdb -introspection -keymap (-selinux) -static-libs"
This fails with gcc 4.5.4 but works with gcc 4.6.3. Should we care?
It compiled fine here with 4.5.4, so I could use some help finding what the issue might be that is different. Portage 2.2.0_alpha149 (default/linux/x86/10.0, gcc-4.5.4, glibc-2.15-r3, 3.5.7-gentoo i686) ================================================================= System Settings ================================================================= System uname: Linux-3.5.7-gentoo-i686-Intel-R-_Celeron-R-_D_CPU_3.20GHz-with-gentoo-2.2 Timestamp of tree: Wed, 09 Jan 2013 19:00:01 +0000 ld GNU ld (GNU Binutils) 2.22 app-shells/bash: 4.2_p37 dev-lang/python: 2.7.3-r2, 3.2.3 dev-util/cmake: 2.8.9 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.2 sys-apps/openrc: 9999::local sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.5.4, 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.6 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo local ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /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="--nospinner" FCFLAGS="-O2 -march=i686 -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 sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -march=i686 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl alsa berkdb bzip2 cli cracklib crypt cups curl cxx dri fortran gdbm gpg gpm iconv imap ipv6 javascript modules mudflap ncurses nls nptl openmp pam pcre portaudio pppd readline sep-usr session ssl tcpd unicode usb x86 zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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" CAMERAS="ptp2" 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 ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON ================================================================= Package Settings ================================================================= sys-fs/udev-197 was built with the following: USE="acl kmod openrc -doc -gudev -hwdb -introspection -keymap (-selinux) -static-libs"
It looks like I have an older glibc. @toolchain: Your help would be appreciated here. thanks much.
this is to be expected. _Static_assert is new to the c11 standard and gcc-4.5.x didn't include support for it (yet). not a bug in gcc. the issue most likely is that glibc-2.16 unconditionally defines static_assert in assert.h and then systemd just checks to see if that is defined. since static_assert() is part of a standard, i'm not sure it is a bug in glibc that it provides this define.
Failed here with gcc 4.6.3 and glibc 2.16.0. emerge -pqv `=sys-fs/udev-197-r2`: [ebuild U ] sys-fs/udev-197-r2 [171-r9] USE="acl%* gudev* hwdb* introspection* keymap* kmod%* openrc%* -doc% (-selinux) -static-libs% (-action_modeswitch%) (-build%) (-debug%) (-edd%) (-extras%) (-floppy%) (-rule_generator%*) (-test%)" emerge --info: Portage 2.1.11.40 (default/linux/amd64/10.0/desktop/gnome, gcc-4.5.4, glibc-2.16.0, 3.7.1-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.7.1-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q8300_@_2.50GHz-with-gentoo-2.2 Timestamp of tree: Sat, 12 Jan 2013 07:45:01 +0000 ld GNU ld (GNU Binutils) 2.23.1 app-shells/bash: 4.2_p42 dev-lang/python: 2.7.3-r3, 3.2.3-r2 dev-util/cmake: 2.8.10.2-r1 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.12.6 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.5.4, 4.6.3 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.7 (virtual/os-headers) sys-libs/glibc: 2.16.0 Repositories: gentoo ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://de-mirror.org/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.halifax.rwth-aachen.de/gentoo/" LANG="de_DE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv ipv6 jpeg lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pppd pulseaudio qt3support qt4 readline sdl session socialweb spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xml xv xvid zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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" CAMERAS="ptp2" 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 ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" 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: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Created attachment 335296 [details] build log of failed udev compilation
Created attachment 335298 [details] environment
you can prob make this work in the udev ebuild by doing: has_version '<sys-devel/gcc-4.6' && \ sed -i 's:static_assert:alsdjflkasjdfa:' src/shared/macro.h
@vapier: I think your test above is true if < gcc 4.6 is _installed_, but doesn't take into account which version is actually being used. Is that what we want?
(In reply to comment #12) true, you should probably use toolchain-funcs instead. the basic idea is the same though.
@vapier: How about this test? has_version '=sys-devel/gcc-*' && \ [ $(gcc-major-version) -lt 4 -o $(gcc-minor-version) -lt 6 ] && sed -i 's:static_assert:alsdjflkasjdfa:' src/shared/macro.h
Actually the has_version call could become: has_version sys-devel/gcc
(In reply to comment #14) that'd fail in the future with gcc-5.0 :) you could inherit versionator.eclass and run: version_is_at_least 4.6 $(gcc-version)
I can confirm the build failure with gcc:4.5 (4.5.3-r2) on amd64. I agree with Spanky that udev needs a build dep to check for proper support, but I wonder if we should extend toolchain-funcs to include a check for a supported gcc spec instead of just checking for a minimum gcc version. Something along the lines of "supported_toolchain_standard c++11" Alternatively, can we inject a c++11 check into autoconf files so it's obvious that udev fails due to missing c++11 support?
I can confirm a build failure as well. Full ~amd64 keyworded system (linux-headers=3.7 glibc=2.16.0 gcc=4.6.3). The failure seems to be introduced by sys-libs/glibc-2.16.0. Or more specifically a certain block of code in a header file (/usr/include/assert.h) Which according to equery belongs to glibc. The block of code is #if defined __USE_ISOC11 && !defined __cplusplus /* Static assertion. Requires support in the compiler. */ # undef static_assert # define static_assert _Static_assert #endif I backed up that header file and then removed that block of code as test. And to my surprise udev actually built. Im not sure what the best way is to go about this. Certainly shouldnt actually change that header file. Im no dev im just a regular user trying different solutions that have come to mind and thought i would share my findings. Ive include a diff of the header file as well as successful build log just incase it is of some use to get this bug solved.
Created attachment 335648 [details] Diff of edited /usr/include/assert.h header file
Created attachment 335650 [details] Successful udev build log after editing header file
(In reply to comment #17) > I can confirm the build failure with gcc:4.5 (4.5.3-r2) on amd64. > > I agree with Spanky that udev needs a build dep to check for proper support, > but I wonder if we should extend toolchain-funcs to include a check for a > supported gcc spec instead of just checking for a minimum gcc version. > Something along the lines of "supported_toolchain_standard c++11" > > Alternatively, can we inject a c++11 check into autoconf files so it's > obvious that udev fails due to missing c++11 support? And I can confirm a build success with gcc-4.7.2. Based on #c18, I think it's safe to say gcc:4.6 does not properly support c++11, so if we're going to use a simple bdep on gcc, then it should be >=gcc:4.7
I dont know much about the various build systems but is it possible to override a system header? What i mean by this is instead of using /usr/include/assert.h which is the system location use as example /usr/local/include/assert.h just for that single header file. and use this header file if we are using a glibc version higher than 2.16.0 and gcc version 4.6 slot or lower. Otherwise use the system version. It would basically break down like this Case #1: if glibc is lower that 2.16.0 use system header (gcc version would be irrelevent in this case as Static_assert wasnt defined until this version of glibc) Case #2 if glibc version is 2.16.0 or higher AND gcc is also slot 4.7 or higher use system header. Case #3 If glibc version is 2.16.0 or higher AND gcc version is slot 4.6 or lower then use the local header instead (/usr/local/include/assert.h) I have no idea if this would even work but its just an idea i thought of. Im also lost as far as how to impliment it. We would have to get the edited header file into the specified directory first i assume. Local header directory location is just an example also.
(In reply to comment #17) that won't work. no gcc version supports all of c++11 -- every new release fleshes out more support. just add the one liner from comment #14 / comment #17 and be done. updating DEPEND/RDEPEND makes no sense.
I don't know if this is any information we haven't already mentioned in the bug, but from upstream, Lennart says the versions of glibc and gcc are not compatible. i.e. glibc supports static asserts but gcc does not. Systemd checks for static asserts with #ifdef.
Created attachment 335662 [details, diff] udev.patch @vapier: How about adding a check like this in pkg_pretend? Does this take care of the issue? Thanks, William
(In reply to comment #24) yes, that's what i mentioned earlier. as for "incompatible", glibc itself doesn't care or use static asserts. it merely provides a public definition for the internal gcc definition. (In reply to comment #25) that check is bad imo. just add the aforementioned sed.
Created attachment 335666 [details] udev.patch @vapier: Is this the correct test? Thanks, William
(In reply to comment #27) LGTM
You might want to do this for systemd as well. Add the patch in comment #27 and add toolchain-funcs to your inherit call. Thanks, William
Udev/systemd can't be the only thing that's going to come across this. Since it's a compatibility issue between gcc and glibc , and since glibc is just defining something based on other static defines, would it be possible to patch one or both of them so that this WON'T be defined when a too-old GCC is used? Perhaps somehow getting toolchains <= gcc-4.7 to unset __USE_ISOC11 ? Or having a __TOOLCHAIN_PROVIDES_ISOC11 that gcc-4.7 and above will auto define? (both of the above are a bit hackish but i hope they at least illustrate what I mean) I don't see an easy way to handle this in dependencies, since there's no way to force which minimum gcc version an ebuild is going to use, right? Perhaps we need one...
(In reply to comment #30) > Udev/systemd can't be the only thing that's going to come across this. > Since it's a compatibility issue between gcc and glibc , and since glibc is > just defining something based on other static defines, would it be possible > to patch one or both of them so that this WON'T be defined when a too-old > GCC is used? > > Perhaps somehow getting toolchains <= gcc-4.7 to unset __USE_ISOC11 ? Or > having a __TOOLCHAIN_PROVIDES_ISOC11 that gcc-4.7 and above will auto define? > > (both of the above are a bit hackish but i hope they at least illustrate > what I mean) > > I don't see an easy way to handle this in dependencies, since there's no way > to force which minimum gcc version an ebuild is going to use, right? > Perhaps we need one... I just moved glibc to my local overlay and made a patch to completely remove that section from the header file (assert.h) and then rebuilt world to make sure it didn't negatively affect anything. I don't see why the patch couldn't be applied conditionally using useflags and pdepends. in gcc ebuilds below slot 4.7 run a check to get glibc version. If it returns 2.16 or higher make gcc depend on glibc build with use=no-isoc11 In glibc ebuilds 2.16 or higher add a useflag no-isoc11 which would patch the headerfile when enabled.
Created attachment 335732 [details, diff] assert.h.patch
Created attachment 335734 [details] glibc-2.16.0.ebuild.example
Ive attached a copy of the patch and glibc ebuild incase it will be useful. This glibc ebuild just contains the patch line. No useflag additions.
(In reply to comment #30) they're the only thing hitting it now. gcc-4.6 is in the process of stabilizing which will make this largely a moot point. people keep missing the point -- there is no 1 knob to control all of ISOC11. both glibc and gcc need updating, and neither version is finished implementing *the entire spec*.
I see that we require >gcc-4.6 nowadays so I guess we can close this one.
*** Bug 510524 has been marked as a duplicate of this bug. ***
glibc-2.22 will include a fallback _Static_assert when gcc doesn't provide it: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3999d26ead93990b244ada078073fb58fb8bb5be