OK looks like another 2.6.0 teething problem .. Here it looks like the actual kernel src headers are called instead of the patched up 2.6.0 linux-header files. could be done as a simple makefile fix?? but how to ensure that apmd does not get out of sync with kernel power management changes or is that more the upstream maintainer's problem. Calculating dependencies ...done! >>> emerge (1 of 1) sys-apps/apmd-3.2.0 to / >>> md5 src_uri ;-) apmd_3.2.0.orig.tar.gz eutils >>> Unpacking source... >>> Unpacking apmd_3.2.0.orig.tar.gz to /mnt/bigdisk1/tmp/portage/apmd-3.2.0/work * Applying apmsleep.c.diff.3.2.0... [ ok ] >>> Source unpacked. eutils libtool --quiet gcc -c -O -g -Wall -pipe -I. -I/usr/src/linux/include -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include - DVERSION=\"3.2.0\" -DDEFAULT_PROXY_NAME=\"/etc/apmd_proxy\" apmlib.c gcc -c -O -g -Wall -pipe -I. -I/usr/src/linux/include -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.2.0 \" -DDEFAULT_PROXY_NAME=\"/etc/apmd_proxy\" apm.c gcc -c -O -g -Wall -pipe -I. -I/usr/src/linux/include -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.2.0 \" -DDEFAULT_PROXY_NAME=\"/etc/apmd_proxy\" apmd.c apm.c: In function `change_state': apm.c:46: warning: implicit declaration of function `exit' gcc -c -O -g -Wall -pipe -I. -I/usr/src/linux/include -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.2.0 \" -DDEFAULT_PROXY_NAME=\"/etc/apmd_proxy\" -DNARROWPROTO xapm.c apmd.c: In function `call_proxy': apmd.c:204: warning: concatenation of string literals with __FUNCTION__ is deprecated apmd.c:217: warning: concatenation of string literals with __FUNCTION__ is deprecated apmd.c:292: warning: concatenation of string literals with __FUNCTION__ is deprecated apmd.c:297: warning: concatenation of string literals with __FUNCTION__ is deprecated apmd.c:335: warning: concatenation of string literals with __FUNCTION__ is deprecated apmd.c:355: warning: concatenation of string literals with __FUNCTION__ is deprecated apmd.c:375: warning: concatenation of string literals with __FUNCTION__ is deprecated xapm.c: In function `quit': xapm.c:300: warning: implicit declaration of function `exit' gcc -c -O -g -Wall -pipe -I. -I/usr/src/linux/include -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.2.0 \" -DDEFAULT_PROXY_NAME=\"/etc/apmd_proxy\" apmsleep.c In file included from /usr/src/linux/include/linux/compiler.h:16, from /usr/src/linux/include/linux/spinlock.h:11, from apmsleep.c:49: /usr/src/linux/include/linux/compiler-gcc3.h:17:1: warning: "__attribute_used__" redefined In file included from /usr/include/features.h:295, from /usr/include/stdio.h:28, from apmsleep.c:45: /usr/include/sys/cdefs.h:192:1: warning: this is the location of the previous definition In file included from /usr/src/linux/include/linux/compiler.h:16, from /usr/src/linux/include/linux/spinlock.h:11, from apmsleep.c:49: /usr/src/linux/include/linux/compiler-gcc3.h:22:1: warning: "__attribute_pure__" redefined In file included from /usr/include/features.h:295, from /usr/include/stdio.h:28, from apmsleep.c:45: /usr/include/sys/cdefs.h:183:1: warning: this is the location of the previous definition apmd.c: In function `handle_event': apmd.c:514: warning: concatenation of string literals with __FUNCTION__ is deprecated apmd.c: In function `main': apmd.c:1149: warning: concatenation of string literals with __FUNCTION__ is deprecated apmd.c:1169: warning: concatenation of string literals with __FUNCTION__ is deprecated apmd.c:1181: warning: concatenation of string literals with __FUNCTION__ is deprecated apmd.c:1188: warning: concatenation of string literals with __FUNCTION__ is deprecated In file included from apmsleep.c:49: /usr/src/linux/include/linux/spinlock.h: In function `bit_spin_lock': /usr/src/linux/include/linux/spinlock.h:571: warning: implicit declaration of function `current_thread_info' /usr/src/linux/include/linux/spinlock.h:571: error: invalid type argument of `->' /usr/src/linux/include/linux/spinlock.h: In function `bit_spin_trylock': /usr/src/linux/include/linux/spinlock.h:594: error: invalid type argument of `->' /usr/src/linux/include/linux/spinlock.h: In function `bit_spin_unlock': /usr/src/linux/include/linux/spinlock.h:609: error: invalid type argument of `->' /usr/src/linux/include/linux/spinlock.h:609: warning: implicit declaration of function `test_thread_flag' /usr/src/linux/include/linux/spinlock.h:609: error: `TIF_NEED_RESCHED' undeclared (first use in this function) /usr/src/linux/include/linux/spinlock.h:609: error: (Each undeclared identifier is reported only once /usr/src/linux/include/linux/spinlock.h:609: error: for each function it appears in.) /usr/src/linux/include/linux/spinlock.h: In function `bit_spin_is_locked': /usr/src/linux/include/linux/spinlock.h:620: error: invalid type argument of `->' apmsleep.c: In function `main': apmsleep.c:118: warning: implicit declaration of function `exit' apmsleep.c: At top level: apmsleep.c:64: warning: `rcsid' defined but not used make: *** [apmsleep.o] Error 1 make: *** Waiting for unfinished jobs.... rm apm.o !!! ERROR: sys-apps/apmd-3.2.0 failed. !!! Function src_compile, Line 51, Exitcode 2 !!! (no error message Reproducible: Always Steps to Reproduce: 1. 2. 3. emerge info Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.6.0-mm1) ================================================================= System uname: 2.6.0-mm1 i686 AMD Athlon(tm) XP 2500+ Gentoo Base System version 1.4.3.12 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-mcpu=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-mcpu=athlon-xp -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache cvs sandbox userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/mnt/bigdisk1/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib acpi acpi4linux alsa apm arts avi berkdb bonobo cdr crypt cups dvd dvdr encode esd foomaticdb gb gdbm gif gnome gphoto2 gpm gtk gtk2 gtkhtml guile imagemagick imlib jack java javascript jpeg kde libg++ libgda libwww mad mikmod motif mozilla mpeg ncurses nls ofx oggvorbis opengl oss pam pdflib perl png ppds python qt quicktime readline scanner sdl slang spell ssl svga tcpd transcode truetype usb v4l x86 xinerama xml xml2 xmms xv zlib"
Created attachment 22915 [details, diff] apmsleep-diff-2.6.0-fix.patch created a fix for it so it will compile using make inside source tree
this has already been fixed (see Bug 31285)