Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36924 - DirectFB doesn't compile... ac97_codec.h included from wm97xx.h
Summary: DirectFB doesn't compile... ac97_codec.h included from wm97xx.h
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-31 16:46 UTC by ferret
Modified: 2004-01-01 22:33 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ferret 2003-12-31 16:46:24 UTC
I have the latest version of DirectFB on my system, compiled it a long time ago. Have since upgraded to 2.6.0 kernel, upgraded to 2.4.23 linux-headers and recompiled glibc with nptl support.

I now can't recompile DirectFB. It dies when trying to compile wm97xx_ts.c with the file included from /usr/include/linux/wm97xx.h which includes /usr/include/linux/ac97_codec.h which fails with an error, here is which the first two lines:

/usr/include/linux/ac97_codec.h:218: error: field `list' has incomplete type
/usr/include/linux/ac97_codec.h:227: error: syntax error before "u32"

There are a couple more lines.. but the important one seems to be the first one. The error also comes up in the configure, where wm97xx.h is "found" but not "usable". The field "list" has type "list_head" which it just can't seem to find. You can simulate this behaivour with a file test.c containing:
##############

#include "linux/ac97_codec.h"
int main() { return 0; }

##############
Then compile it with "gcc -o test test.c" to get the error.

I did "gcc -E test.c > out" and found that type list_head didn't seem to be declared or defined anywhere.

Some vital stats:

linux-headers-2.4.23
love-sources-2.6.0-love2 (with alsa-0.9.8 instead of the `broken' 1.0.0_rc2)
DirectFB-0.9.20

Have verified the results of the "test.c" test with someone using 2.4.23 kernel and 2.4.22 headers, and another person using 2.6.0-gentoo kernel and 2.6.0 headers (crazy guy...)

But the guy running with 2.4.22 headers managed to compile DirectFB ok, whereas me and the other guy had the same error.
Comment 1 ferret 2003-12-31 16:46:57 UTC
oops, sorry. Always forget the carriage returns. :|
Comment 2 ferret 2003-12-31 16:58:42 UTC
Oops again. Sorry for the bugzilla spam. I forgot to mention that DirectFB-0.9.19-r1 (the second oldest in portage) works just fine. Seems the new one will try to use the header file even though the configure found it to be broken. Perhaps 0.9.20 needs masking: but that doesn't solve the problem as to *why* ac97_codec.h doesn't compile.
Comment 3 SpanKY gentoo-dev 2004-01-01 22:32:56 UTC
to be honest, if you're going to use linux-2.6, you should use linux-headers-2.6 ... otherwise you're gonna get weird things like this and devs wont like you ;)
linux/wm97xx.h is a 2.4.x thing, there is no such header in 2.6

that said, i dont even know why wm97xx_ts.c includes linux/wm97xx.h ... it doesnt use anything from it heh

the answer !?
you shouldnt include linux/ac97_codec.h in your source code unless you need it ...
i'll disable the WM97xx Touchscreen support for now ... the DirectFB peeps should get on top of this in the end ...
Comment 4 SpanKY gentoo-dev 2004-01-01 22:33:38 UTC
oh, and the reason 0.9.19 works is because the WM97xx driver is new to 0.9.20