emerge fails with ia64-unknown-linux-gnu-gcc -O2 -pipe -Wall -D_GNU_SOURCE -c -o ifdown.o ifdown.c init.c:29: error: parse error before "capget" init.c:30: error: parse error before "capset" In file included from init.c:33: /usr/include/sys/stat.h: In function `_syscall2': /usr/include/sys/stat.h:208: error: storage class specified for parameter `stat' /usr/include/sys/stat.h:212: error: storage class specified for parameter `fstat' /usr/include/sys/stat.h:227: error: storage class specified for parameter `stat64' /usr/include/sys/stat.h:228: error: storage class specified for parameter `fstat64' /usr/include/sys/stat.h:236: error: storage class specified for parameter `lstat' /usr/include/sys/stat.h:250: error: storage class specified for parameter `lstat64' /usr/include/sys/stat.h:257: error: storage class specified for parameter `chmod' /usr/include/sys/stat.h:264: error: storage class specified for parameter `lchmod' /usr/include/sys/stat.h:269: error: storage class specified for parameter `fchmod' /usr/include/sys/stat.h:275: error: storage class specified for parameter `umask' /usr/include/sys/stat.h:280: error: storage class specified for parameter `getumask' /usr/include/sys/stat.h:285: error: storage class specified for parameter `mkdir' /usr/include/sys/stat.h:292: error: storage class specified for parameter `mknod' /usr/include/sys/stat.h:298: error: storage class specified for parameter `mkfifo' /usr/include/sys/stat.h:325: error: storage class specified for parameter `__fxstat' /usr/include/sys/stat.h:327: error: storage class specified for parameter `__xstat' /usr/include/sys/stat.h:329: error: storage class specified for parameter `__lxstat' /usr/include/sys/stat.h:351: error: storage class specified for parameter `__fxstat64' /usr/include/sys/stat.h:353: error: storage class specified for parameter `__xstat64' /usr/include/sys/stat.h:355: error: storage class specified for parameter `__lxstat64' /usr/include/sys/stat.h:358: error: storage class specified for parameter `__xmknod' /usr/include/sys/stat.h:365: error: storage class specified for parameter `stat' /usr/include/sys/stat.h:365: error: redefinition of parameter 'stat' /usr/include/sys/stat.h:208: error: previous definition of 'stat' was here /usr/include/sys/stat.h:365: error: parse error before '{' token /usr/include/sys/stat.h:208: error: declaration for parameter "stat" but no such parameter /usr/include/sys/stat.h:212: error: declaration for parameter "fstat" but no such parameter /usr/include/sys/stat.h:227: error: declaration for parameter "stat64" but no such parameter /usr/include/sys/stat.h:228: error: declaration for parameter "fstat64" but no such parameter /usr/include/sys/stat.h:236: error: declaration for parameter "lstat" but no such parameter /usr/include/sys/stat.h:250: error: declaration for parameter "lstat64" but no such parameter /usr/include/sys/stat.h:257: error: declaration for parameter "chmod" but no such parameter /usr/include/sys/stat.h:264: error: declaration for parameter "lchmod" but no such parameter /usr/include/sys/stat.h:269: error: declaration for parameter "fchmod" but no such parameter /usr/include/sys/stat.h:275: error: declaration for parameter "umask" but no such parameter /usr/include/sys/stat.h:280: error: declaration for parameter "getumask" but no such parameter /usr/include/sys/stat.h:285: error: declaration for parameter "mkdir" but no such parameter /usr/include/sys/stat.h:292: error: declaration for parameter "mknod" but no such parameter /usr/include/sys/stat.h:298: error: declaration for parameter "mkfifo" but no such parameter /usr/include/sys/stat.h:325: error: declaration for parameter "__fxstat" but no such parameter /usr/include/sys/stat.h:327: error: declaration for parameter "__xstat" but no such parameter /usr/include/sys/stat.h:329: error: declaration for parameter "__lxstat" but no such parameter /usr/include/sys/stat.h:351: error: declaration for parameter "__fxstat64" but no such parameter /usr/include/sys/stat.h:353: error: declaration for parameter "__xstat64" but no such parameter /usr/include/sys/stat.h:355: error: declaration for parameter "__lxstat64" but no such parameter /usr/include/sys/stat.h:358: error: declaration for parameter "__xmknod" but no such parameter /usr/include/sys/stat.h:365: error: declaration for parameter "stat" but no such parameter /usr/include/sys/stat.h:366: error: `__path' undeclared (first use in this function) /usr/include/sys/stat.h:366: error: (Each undeclared identifier is reported only once /usr/include/sys/stat.h:366: error: for each function it appears in.) /usr/include/sys/stat.h:366: error: `__statbuf' undeclared (first use in this function) init.c: In function `check_init_fifo': init.c:2014: error: storage size of 'st' isn't known init.c:2014: error: storage size of 'st2' isn't known init.c:2022: warning: implicit declaration of function `stat' init.c:2023: warning: implicit declaration of function `mkfifo' init.c:2014: warning: unused variable `st' init.c:2014: warning: unused variable `st2' init.c: In function `init_main': init.c:2469: warning: implicit declaration of function `capget' init.c:2472: warning: implicit declaration of function `capset' init.c: In function `main': init.c:2647: warning: implicit declaration of function `umask' ia64-unknown-linux-gnu-gcc -O2 -pipe -Wall -D_GNU_SOURCE -c -o hddown.o hddown.c make: *** [init.o] Error 1 make: *** Waiting for unfinished jobs.... make: Leaving directory `/var/tmp/portage/sysvinit-2.86-r3/work/sysvinit-2.86/src' !!! ERROR: sys-apps/sysvinit-2.86-r3 failed. !!! Function src_compile, Line 61, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. Reproducible: Always Steps to Reproduce: 1. emerge sys-apps/sysvinit 2. Watch it fail as above. Actual Results: The emerge failed. Expected Results: A successful emerge. emerge info Portage 2.0.53_rc7 (default-linux/ia64/2004.3, gcc-3.4.4, glibc-2.3.5-r2, 2.6.8-gentoo-r3 ia64) ================================================================= System uname: 2.6.8-gentoo-r3 ia64 Gentoo Base System version 1.12.0_pre10 ccache version 2.3 [disabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.13 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r1, 2.15.92.0.2-r10 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.8.1-r1, 2.6.11-r3 ACCEPT_KEYWORDS="ia64" AUTOCLEAN="yes" CBUILD="ia64-unknown-linux-gnu" CFLAGS="-O2 -pipe" CHOST="ia64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://mirror.pudas.net/gentoo rsync://trumpetti.atm.tut.fi/gentoo/ http://gentoo.linux.no/ ftp://gentoo.linux.no/pub/gentoo/" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage_overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="ia64 X acpi audiofile berkdb bitmap-fonts bzip2 bzlib canna cjk crypt cups eds emacs encode expat ffmpeg foomaticdb fortran freetds gdbm gif glut gmp gnutls gpm gstreamer gtk gtk2 imlib ipv6 jpeg lcms ldap libg++ libwww maildir mbox mhash mikmod mime mng motif mozilla mule mysql mysqli ncurses nis nls nptl odbc offensive ogg oggvorbis opengl oss pam pcre pdflib perl pic pie png posix python qt quicktime readline recode samba sdl spell sqlite ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts udev unicode vorbis xml2 xmms xpm xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
virtual/os-headers: 2.6.8.1-r1, 2.6.11-r3 which one is it ? can you please do `emerge -C linux-headers && emerge linux-headers` and see if `emerge sysvinit` works ?
Done: $ emerge info Portage 2.0.53_rc7 (default-linux/ia64/2004.3, gcc-3.4.4, glibc-2.3.5-r2, 2.6.8-gentoo-r3 ia64) ================================================================= System uname: 2.6.8-gentoo-r3 ia64 Gentoo Base System version 1.12.0_pre10 ccache version 2.3 [disabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.13 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r1, 2.15.92.0.2-r10 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="ia64" AUTOCLEAN="yes" CBUILD="ia64-unknown-linux-gnu" CFLAGS="-O2 -pipe" CHOST="ia64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://mirror.pudas.net/gentoo rsync://trumpetti.atm.tut.fi/gentoo/ http://gentoo.linux.no/ ftp://gentoo.linux.no/pub/gentoo/" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage_overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="ia64 X acpi audiofile berkdb bitmap-fonts bzip2 bzlib canna cjk crypt cups eds emacs encode expat ffmpeg foomaticdb fortran freetds gdbm gif glut gmp gnutls gpm gstreamer gtk gtk2 imlib ipv6 jpeg lcms ldap libg++ libwww maildir mbox mhash mikmod mime mng motif mozilla mule mysql mysqli ncurses nis nls nptl odbc offensive ogg oggvorbis opengl oss pam pcre pdflib perl pic pie png posix python qt quicktime readline recode samba sdl spell sqlite ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts udev unicode vorbis xml2 xmms xpm xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS emerge sysvinit still fails with the same errors.
hmm, i forgot about this ... ia64 headers dont provide _syscall macros
changed the code to use syscall() rather than _syscall#() ... stupid ia64