Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29636 - apmd-3.0.2-r3 won't compile in kernel 2.6
Summary: apmd-3.0.2-r3 won't compile in kernel 2.6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
: 29637 30450 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-25 22:57 UTC by Chris Bruner
Modified: 2003-10-13 12:32 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
APMD patch (apmdpatch,633 bytes, patch)
2003-10-13 09:40 UTC, Tim Yamin (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Bruner 2003-09-25 22:57:29 UTC
It looks to me like the source is looking for the definition of a spinlock 
contained in kernel include files. (Which is not present in the newer kernels) 

Reproducible: Always
Steps to Reproduce:
1.emerge -u apmd 
2. 
3.
Comment 1 SpanKY gentoo-dev 2003-09-26 03:39:47 UTC
*** Bug 29637 has been marked as a duplicate of this bug. ***
Comment 2 [name redacted] 2003-10-08 09:38:20 UTC
 emerge gnome
Calculating dependencies ...done!
>>> emerge (1 of 3) sys-apps/apmd-3.0.2-r3 to /
>>> md5 src_uri ;-) apmd-3.0.2.tar.gz
>>> Unpacking source...
>>> Unpacking apmd-3.0.2.tar.gz to /var/tmp/portage/apmd-3.0.2-r3/work
 * Applying apmsleep.c.diff...                                          
 [ ok ]>>> Source unpacked.
gcc -c  -O3 -march=pentium3 -funroll-loops -pipe -Wall -pipe -I. -I/usr/src/linux/include
-I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.0.2\"
-DAPMD_PROXY_NAME=\"/etc/apm/apmd_proxy\" apmlib.c
ar rv libapm.a apmlib.o
a - apmlib.o
ranlib libapm.a
gcc -c  -O3 -march=pentium3 -funroll-loops -pipe -Wall -pipe -I. -I/usr/src/linux/include
-I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.0.2\"
-DAPMD_PROXY_NAME=\"/etc/apm/apmd_proxy\" apm.c
apm.c: In function `change_state':
apm.c:40: warning: implicit declaration of function `exit'
gcc -o apm apm.o  -L. -lapm
gcc -c  -O3 -march=pentium3 -funroll-loops -pipe -Wall -pipe -I. -I/usr/src/linux/include
-I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.0.2\"
-DAPMD_PROXY_NAME=\"/etc/apm/apmd_proxy\" apmd.c
apmd.c: In function `apmd_call_proxy':
apmd.c:245: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c:328: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c:332: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c:357: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c:374: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c:382: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c:394: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c:403: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c:408: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c: In function `apmd_power_reset':
apmd.c:426: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c: In function `apmd_suspend':
apmd.c:463: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c: In function `apmd_standby':
apmd.c:497: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c: In function `apmd_resume':
apmd.c:532: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c: In function `apmd_low_battery':
apmd.c:593: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c: In function `apmd_check_power':
apmd.c:612: warning: concatenation of string literals with __FUNCTION__ is
deprecated
apmd.c: In function `main':
apmd.c:959: warning: concatenation of string literals with __FUNCTION__ is
deprecated
gcc -o apmd apmd.o  -L. -lapm
gcc -c  -O3 -march=pentium3 -funroll-loops -pipe -Wall -pipe -I. -I/usr/src/linux/include
-I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.0.2\"
-DAPMD_PROXY_NAME=\"/etc/apm/apmd_proxy\" -DNARROWPROTO xapm.c
xapm.c: In function `main':
xapm.c:286: warning: implicit declaration of function `exit'
gcc -o xapm xapm.o  -L. -lapm -L/usr/X11R6/lib -lXaw -lXmu -lXt -lXext -lSM
-lICE -lX11
gcc -c  -O3 -march=pentium3 -funroll-loops -pipe -Wall -pipe -I. -I/usr/src/linux/include
-I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.0.2\"
-DAPMD_PROXY_NAME=\"/etc/apm/apmd_proxy\" apmsleep.c
In file included from /usr/src/linux/include/linux/compiler.h:15,
                 from /usr/src/linux/include/linux/spinlock.h:11,
                 from apmsleep.c:49:
/usr/src/linux/include/linux/compiler-gcc3.h:19:1: warning: "__attribute_used__"
redefined
In file included from /usr/include/features.h:291,
                 from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:37,
                 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:15,
                 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:291,
                 from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:37,
                 from apmsleep.c:45:
/usr/include/sys/cdefs.h:183:1: warning: this is the location of the previous
definition
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: invalid type argument of `->'
/usr/src/linux/include/linux/spinlock.h: In function `bit_spin_trylock':
/usr/src/linux/include/linux/spinlock.h:594: invalid type argument of `->'
/usr/src/linux/include/linux/spinlock.h: In function `bit_spin_unlock':
/usr/src/linux/include/linux/spinlock.h:609: 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: `TIF_NEED_RESCHED' undeclared
(first use in this function)
/usr/src/linux/include/linux/spinlock.h:609: (Each undeclared identifier
is reported only once
/usr/src/linux/include/linux/spinlock.h:609: 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: invalid type argument of `->'
apmsleep.c: In function `main':
apmsleep.c:120: warning: implicit declaration of function `exit'
apmsleep.c: At top level:
apmsleep.c:66: warning: `rcsid' defined but not used
make: *** [apmsleep.o] Error 1
rm apm.o apmd.o
 
!!! ERROR: sys-apps/apmd-3.0.2-r3 failed.
!!! Function src_compile, Line 46, Exitcode 2
!!! compile problem
Comment 3 [name redacted] 2003-10-08 09:40:34 UTC
same kernel by the way -mm sources.
Comment 4 Martin Holzer (RETIRED) gentoo-dev 2003-10-09 08:49:09 UTC
*** Bug 30450 has been marked as a duplicate of this bug. ***
Comment 5 [name redacted] 2003-10-09 11:19:29 UTC
The apmd-3.1.0 ebuild in bugzilla has the same problems.  

Comment 6 Tim Yamin (RETIRED) gentoo-dev 2003-10-13 09:40:29 UTC
Created attachment 19184 [details, diff]
APMD patch
Comment 7 Tim Yamin (RETIRED) gentoo-dev 2003-10-13 09:41:32 UTC
Try the patch I just wrote [do a manual compile]. If it works, I'll commit
this in and fix the ebuild accordingly.
Comment 8 Vlad Berditchevskiy 2003-10-13 09:57:13 UTC
This patch cannot be applied to the version in the portage. However, if I
do the changes manually, it compiles without errors.
Comment 9 Tim Yamin (RETIRED) gentoo-dev 2003-10-13 10:24:17 UTC
I know it compiles fine and I know it won't apply against portage, but does
apmd work properly as well? I just need to confirm that before adding the
patch to CVS.
Comment 10 Vlad Berditchevskiy 2003-10-13 10:29:16 UTC
Sorry, I can't tell you, because I have no APM support in my kernel right
now. I just encountered this bug while upgrading gnome - that was the reason
why I submitted it. Maybe someone else can tell more...
Comment 11 Tim Yamin (RETIRED) gentoo-dev 2003-10-13 12:32:38 UTC
In CVS. I suppose if it compiles and works on 2.5 it should work fine on
2.6...