Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38274 - gentoo-sources-2.4.22-r5 DRM module via_drv does not compile
Summary: gentoo-sources-2.4.22-r5 DRM module via_drv does not compile
Status: VERIFIED 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:
: 38537 38870 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-15 04:06 UTC by Paul Grimes
Modified: 2004-04-08 22:10 UTC (History)
2 users (show)

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


Attachments
.config, drmP.h and x86-patched via_drv.h (attach.tbz2,20.18 KB, application/octet-stream)
2004-01-16 06:39 UTC, Sebastian Redl
Details
My emerge info (eminfo.txt,1.29 KB, text/plain)
2004-01-16 07:16 UTC, Sebastian Redl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Grimes 2004-01-15 04:06:36 UTC
genkernel 3.0.1_beta4-3 compiles all DRM modules by default.  The module compilation stage fails due to errors when compiling via_drv.o, halting genkernel

Reproducible: Always
Steps to Reproduce:
1.emerge gentoo-sources-2.4.22-r5 and genkernel_3.0.1_beta4-3
2.run genkernel all
3.
Actual Results:  
Compilation fails at the module compile stage 

Expected Results:  
Completed compilation and installed new kernel 

Can be worked around by not compiling this module.  It may be wise to not 
compile DRM modules (which are not required with the latest XFree86) by 
default.
Comment 1 Sebastian Redl 2004-01-15 07:09:24 UTC
Same results for 2.4.22-r4 sources.

Problem lies with a conflict between via_drv.h and drmP.h, both try to define a function. I can't remember its name, it's all the way down in via_drg.h. Removing the one in via_drv.h seems to work for me, at least the module compiles.
Comment 2 Brian Jackson (RETIRED) gentoo-dev 2004-01-15 09:29:18 UTC
Can one of you attach the .config that genkernel makes? I'm unable to reproduce this here.
Comment 3 Sebastian Redl 2004-01-16 06:39:38 UTC
Created attachment 23918 [details]
.config, drmP.h and x86-patched via_drv.h
Comment 4 Sebastian Redl 2004-01-16 06:44:01 UTC
That's a bzipped tarball btw.
Comment 5 Sebastian Redl 2004-01-16 07:16:08 UTC
Created attachment 23919 [details]
My emerge info

Sorry for not just copying it, kinda hard in links.
Btw, can any of these make my kernel unbootable? Other apps work fine...
Comment 6 Sebastian Redl 2004-01-16 08:41:10 UTC
The function in question, __cmpxchg, is guarded by the macro __HAVE_ARCH_CMPXCHG,
but both definitions fail to #define this macro.
Comment 7 Robert Barnett 2004-01-19 19:13:22 UTC
I couldn't find how to turn off compiling the DRM modules from menuconfig. I ended up just doing nano .config and put an 'n' after all modules prefixed with DRM. I'm just thinking on behalf of those who use genkernel --menuconfig all, perhaps a brief description of how to use menuconfig to avoid this problem would be great.


Comment 8 Tim Yamin (RETIRED) gentoo-dev 2004-01-20 08:38:57 UTC
Can you try this out with _beta6?
Comment 9 Bryan Higgins 2004-01-20 13:27:15 UTC
Looks like with architecture = 386, __HAVE_ARCH_CMPXCHG is not defined and one gets the dual definition of cmpxchg in via_drv.h and drmP.h. When I specified pentium-4, the probably went away.

I suggest surrounding each definition with

#ifndef cmpxchg
...
#endif
Comment 10 Brian Jackson (RETIRED) gentoo-dev 2004-01-20 21:17:44 UTC
*** Bug 38537 has been marked as a duplicate of this bug. ***
Comment 11 Brian Jackson (RETIRED) gentoo-dev 2004-01-20 21:21:15 UTC
*** Bug 38870 has been marked as a duplicate of this bug. ***
Comment 12 Brian Jackson (RETIRED) gentoo-dev 2004-01-20 21:23:51 UTC
I'm attributing this (and it's dups) to a bad config that made it into genkernel. I'll have a -r6 that fixes this and other bugs in the next few days. I'm also revamping the config that genkernel uses.
Comment 13 Jason Cox (RETIRED) gentoo-dev 2004-04-08 22:10:23 UTC
Bug closed, fixed. Blame genkernel.
Comment 14 Jason Cox (RETIRED) gentoo-dev 2004-04-08 22:10:44 UTC
Fixed. New default config for genkernel.