Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 412369

Summary: x11-misc/lightdm-1.2.2 with gcc-4.7 and -D_FORTIFY_SOURCE > 0 - /usr/include/bits/unistd.h:266:1: error: inlining failed in call to always_inline 'getgroups': function not inlinable
Product: Gentoo Linux Reporter: iGentoo <AlphatPC>
Component: [OLD] UnspecifiedAssignee: Markos Chandras (RETIRED) <hwoarang>
Severity: normal CC: dlan, gmiramir, jrmalaq, SuloevDmitry
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 390247    
Attachments: build.log

Description iGentoo 2012-04-17 16:31:05 UTC
Created attachment 309285 [details]

In file included from /usr/include/unistd.h:1171:0,
                 from libsystem.c:8:
libsystem.c: In function 'pam_setcred':
/usr/include/bits/unistd.h:266:1: error: inlining failed in call to always_inline 'getgroups': function not inlinable
libsystem.c:879:27: error: called from here
In file included from /usr/include/unistd.h:1171:0,
                 from libsystem.c:8:
/usr/include/bits/unistd.h:266:1: error: inlining failed in call to always_inline 'getgroups': function not inlinable
libsystem.c:881:27: error: called from here

Portage 2.2.0_alpha100 (hardened/linux/amd64/selinux, gcc-4.7.0, glibc-2.15, 3.4.0-rc3-custom x86_64)
                        System Settings
System uname: Linux-3.4.0-rc3-custom-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9300_@_2.50GHz-with-gentoo-2.1
Timestamp of tree: Tue, 17 Apr 2012 15:15:01 +0000
ccache version 3.1.7 [disabled]
app-shells/bash:          4.2_p24
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3, 3.2.2-r1
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.5
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3::hardened-dev, 4.7.0::hardened-dev
sys-devel/gcc-config:     1.7
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.15::custom
Repositories: gentoo systemd hardened-dev custom
Installed sets: @custom-initramfs-rebuild, @custom-protected, @custom-selibs-rebuild
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-Wall -Wextra -march=native -pipe -O3 -fno-tree-vectorize"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-Wall -Wextra -march=native -pipe -O3 -fno-tree-vectorize"
FEATURES="assume-digests binpkg-logs collision-protect distlocks ebuild-locks fixlafiles multilib-strict news parallel-fetch preserve-libs protect-owned sandbox selinux sesandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--sort-section=alignment"
LINGUAS="en en_US zh zh_CN"
MAKEOPTS="V=1 -j10"
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"
PORTDIR_OVERLAY="/var/lib/layman/systemd /var/lib/layman/hardened-development /usr/local/portage"
USE="X acl alsa amd64 audit bash-completion berkdb bzip2 c++0x cairo caps cli cracklib crypt cxx dbus dri gdbm gmp gnome gpm gtk gtk3 hardened iconv ipv6 jit jpeg jpeg2k justify mmx modules mudflap multilib ncurses nls nptl nptlonly open_perms opengl openmp pam pcre png pppd pulseaudio qt4 readline selinux session sse sse2 ssl svg sysfs systemd tcpd threads tiff unicode urandom vim-syntax xattr xinetd xorg zlib" ALSA_CARDS="hda-intel" 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="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" DRACUT_MODULES="btrfs caps dmsquash-live gensplash livenet lvm nbd nfs plymouth ssh-client 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US zh zh_CN" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau 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"

                        Package Settings

x11-misc/lightdm-1.2.0 was built with the following:
USE="introspection (multilib) (selinux)"
CFLAGS="-Wall -Wextra -march=native -pipe -O3 -fno-tree-vectorize -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"
CXXFLAGS="-Wall -Wextra -march=native -pipe -O3 -fno-tree-vectorize -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"

sys-libs/glibc-2.15 was built with the following:
USE="gd glibc-omitfp hardened (multilib) (selinux) -debug -profile -vanilla"
CFLAGS="-Wall -march=native -pipe -O2 -fno-strict-aliasing -fno-stack-protector"
CXXFLAGS="-Wall -march=native -pipe -O2 -fno-strict-aliasing"
Comment 1 Ivan Bagaev 2012-05-02 16:49:38 UTC
Not compile lightdm-1.2.2 with gcc-4.5.3-r2 witch CFLAGS='-O3'
Compile fine lightdm-1.2.2 with gcc-4.5.3-r2 witch CFLAGS='-O2'
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2012-05-02 17:37:20 UTC
(In reply to comment #1)
> Not compile lightdm-1.2.2 with gcc-4.5.3-r2 witch CFLAGS='-O3'
> Compile fine lightdm-1.2.2 with gcc-4.5.3-r2 witch CFLAGS='-O2'

This has nothing to do with this bug
Comment 3 Ivan Bagaev 2012-05-02 17:57:53 UTC
Error is the same:
/usr/include/bits/unistd.h:266:1: error: inlining failed in call to always_inline 'getgroups': function not inlinable
Comment 4 Dmitry Suloev 2012-05-24 08:23:37 UTC
Same problem for me.
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2012-05-24 12:14:03 UTC
What about version 1.2.2?
Comment 6 Dmitry Suloev 2012-05-24 12:16:43 UTC
(In reply to comment #5)
> What about version 1.2.2?

Same problem.
Comment 7 teidakankan 2012-05-31 11:28:39 UTC
Compiles on gcc-4.7 with --disable-tests.

The current Debian temporary solution as shown here:
Comment 8 Yixun Lan archtester gentoo-dev 2012-06-14 10:07:04 UTC
debian guys disable tests

@@ -13,7 +13,7 @@
 KEYWORDS="~amd64 ~x86"
-IUSE="+introspection qt4"
+IUSE="+introspection qt4 test"
@@ -65,6 +65,7 @@
        econf --localstatedir=/var \
                --disable-static \
                $(use_enable introspection) \
+               $(use_enable test tests) \
                $(use_enable qt4 liblightdm-qt) \
                --with-user-session=${_session} \
                --with-greeter-session=${_greeter} \
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2012-06-14 11:55:58 UTC
The upstream bug was closed as invalid and I am not particularily happy about this. Also, disabling the tests is not a solution but a workaround. This will remain open until the next gcc-4.7 and lightdm version for further testing
Comment 10 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-06-14 17:35:22 UTC
sed -i -e "s/getgroups/lightdm_&" test/src/libsystem.c
Comment 11 Yixun Lan archtester gentoo-dev 2012-06-15 01:25:31 UTC
(In reply to comment #10)
> sed -i -e "s/getgroups/lightdm_&" test/src/libsystem.c

tested, it works! minor typo fix
sed -i -e "s/getgroups/lightdm_/" tests/src/libsystem.c
Comment 12 Markos Chandras (RETIRED) gentoo-dev 2012-06-15 18:13:12 UTC
Can you still reproduce it with gcc-4.7.1?
Comment 13 Markos Chandras (RETIRED) gentoo-dev 2012-06-15 23:21:29 UTC
Just tried. I still fails with gcc-4.7.1
Comment 14 Yixun Lan archtester gentoo-dev 2012-06-16 08:06:21 UTC
(In reply to comment #13)
> Just tried. I still fails with gcc-4.7.1

what's the problem??

here either fix from comment 8 or 11 works for me.

(with comment 8, USE disable -test)
Comment 15 Markos Chandras (RETIRED) gentoo-dev 2012-06-16 09:24:54 UTC
Disabling tests is a workaround not an fix. Renaming the function in the code to avoid namespace pollution seems correct but we need to be in sync with upstream
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2012-06-20 03:44:25 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > sed -i -e "s/getgroups/lightdm_&" test/src/libsystem.c
> tested, it works! minor typo fix
> sed -i -e "s/getgroups/lightdm_/" tests/src/libsystem.c

You forgot the & or otherwise that will result in getgroups getting renamed as lightdm_ instead of lightdm_getgroups.
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2012-06-20 05:04:33 UTC
This has been reported upstream,

So I've applied the sed in Portage while fixing pam.d files to respect system-local-login in -r2.