x86_64-pc-linux-gnu-gcc -O2 -pipe -march=k8 -mtune=k8 -fno-strict-aliasing -ansi -pedantic -Wno-return-type -w -I../.. -I../../exports/include -Dlinux -D_ _amd64__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE - D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_G NU_SOURCE -DFUNCPROTO=15 -DNARROWPROTO -c -o M ailbox.o Mailbox.c Mailbox.c: In function `GetMailFile': Mailbox.c:563: error: `stderr' undeclared (first use in this function) Mailbox.c:563: error: (Each undeclared identifier is reported only once Mailbox.c:563: error: for each function it appears in.) make[3]: *** [Mailbox.o] Error 1 make[3]: Leaving directory `/var/tmp/portage/xorg-x11-6.8.2-r4/work/xc/programs/ xbiff' Edit Mailbox.c to add the include line: #include <stdio.h> Re-compile and it works. (failed on xdm but that's another story) Reproducible: Always Steps to Reproduce: 1. Run an emerge of x11 that fails (did on my server) 2. Change to /var/tmp/... to run the make yourself 3. Watch it run through then fail on stderr undefined in mailbox.c for xbiff Actual Results: Mailbox.c: In function `GetMailFile': Mailbox.c:563: error: `stderr' undeclared (first use in this function) Mailbox.c:563: error: (Each undeclared identifier is reported only once Mailbox.c:563: error: for each function it appears in.) make[3]: *** [Mailbox.o] Error 1 Expected Results: The compile should have worked and not errored out. Portage 2.0.51.22-r2 (default-linux/amd64/2005.1, gcc-3.4.3, glibc-2.3.5-r1, 2. 6.11-hardened-r15 x86_64) ================================================================= System uname: 2.6.11-hardened-r15 x86_64 AMD Athlon(tm) 64 Processor 3400+ Gentoo Base System version 1.6.13 ccache version 2.3 [disabled] dev-lang/python: 2.3.5-r2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=k8 -mtune=k8" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/ share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb / usr/lib64/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -pipe -march=k8 -mtune=k8" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/ distributions/gentoo" LINGUAS="en gb" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage" USE="amd64 X avi berkdb bitmap-fonts cdr crypt cups curl eds emboss encode esd fam foomaticdb fortran ftp gif gnome gpm gstreamer gtk gtk2 hardened imlib ipv6 jpeg kde lzw lzw-tiff md5 mozilla mp3 mpeg ncurses nls opengl pam pdflib perl png python qt quicktime readline samba sdl spell ssl tcpd tiff truetype-fonts type1-fonts usb userlocales xml2 xpm xv zlib linguas_en linguas_gb userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Created attachment 68882 [details, diff] Patch for Mailbox.c in xbiff program for xorg-x11-6.8.2-r4
*** Bug 106721 has been marked as a duplicate of this bug. ***
*** Bug 106720 has been marked as a duplicate of this bug. ***
Created attachment 68887 [details, diff] Patch for greet.c in xdm for xorg-x11-6.8.2-r4
Created attachment 68888 [details, diff] Patch for Login.c in xdm in xorg-x11-6.8.2-r4
Why are you using a default profile with a hardened USE-flag/kernel? Take a look at http://www.gentoo.org/proj/en/hardened/selinux/selinux-amd64-handbook.xml?part=0&chap=0 Also, http://www.gentoo.org/proj/en/hardened/hardenedxorg.xml I don't see these problems on my non-hardened/x86.
I'm using a default like that because I haven't tuned it yet. I just got this to compile by applying the 3 changes to Xorg while the emerge was running. So whether it happened on your system or not, the problems exist in the c files.
I'm not saying the compile didn't fail (it didn't), but in the case of one or two of those files the suggested problems don't exist. The stdio include is actually in the .c file that you say it's missing from. As far as I know you can't mixed hardened stuff with a non-hardened profile, and this could potentially cause wacky stuff to happen.