Bug 969 - DRM Kernel Modules Fail to compile
Summary: DRM Kernel Modules Fail to compile
Status: RESOLVED NOTOURBUG
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/other (show other bugs)
Version: XOrg 6.7.0
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-02 09:22 UTC by Greg Malleus
Modified: 2005-01-01 17:19 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Greg Malleus 2004-08-02 09:22:20 UTC
getting an error on compilation of DRM Modules:

ERROR:Kernel modules did not compile

The DRI drivers cannot be installed without the latest kernel modules. 
Installation will be aborted.  See dri.log file for more info

dri.log contains:

/bin/sh: line 1: [: too many arguments
Makefile:284: *** CONFIG_X86_CMPXCHG needs to be enabled in the kernel.  Stop.

I checked and CONFIG_X86_CMPXCHG is correctly set to y in the
/usr/src/linux/.config file

Using Gentoo 2004.1, have XOrg.6.7.0-r1 installed.  Downloaded the
common-20040727-linux.i386.tar.bz2 and radeon-20040727-linux.i386.tar.bz2
snapshots from http://www.freedesktop.org/~dri/snapshots/  using the included
install scripts.
Comment 1 Martin Mokrejs 2004-08-26 02:52:53 UTC
Have the same problem. Have followed the install documentation at
http://dri.sourceforge.net/cgi-bin/moin.cgi/Building:

linux # make
/bin/sh: line 1: [: too many arguments
Makefile:287: *** CONFIG_X86_CMPXCHG needs to be enabled in the kernel.  Stop.
linux # make LINUXDIR=/usr/src/linux-2.6.7-bk20 
/bin/sh: line 1: [: too many arguments
Makefile:287: *** CONFIG_X86_CMPXCHG needs to be enabled in the kernel.  Stop.
linux # make LINUXDIR=/usr/src/linux-2.6.7-bk20
/bin/sh: line 1: [: too many arguments
Makefile:287: *** CONFIG_X86_CMPXCHG needs to be enabled in the kernel.  Stop.
linux # make LINUXDIR=/usr/src/linux-2.4.27-rc2 
/bin/sh: line 1: [: too many arguments
Makefile:287: *** CONFIG_X86_CMPXCHG needs to be enabled in the kernel.  Stop.
linux #

I use bash as my interactive shell, but also tried ksh. I also use Gentoo, as
the original reporter.
Comment 2 Dave Airlie 2004-08-26 03:40:30 UTC
What version of bash are you using (or what is /bin/sh pointing at?) maybe your
/bin/sh is ash or something not bash... maybe we need to make the makefile use
bash....
Comment 3 Martin Mokrejs 2004-08-26 04:01:17 UTC
root # ls -la /bin/bash
-rwxr-xr-x  1 root root 704668 Jun 28 22:56 /bin/bash
root # /bin/bash --version
GNU bash, version 2.05b.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.
root # 

I rememrber that Gentoo is using POSIX options when compiling apps, so bash and
texttools etc. to be posixised ("head -n1" instead of "head -1" etc.). Maybe
that's the problem? This is just a guess.
Comment 4 Dave Airlie 2004-08-26 05:12:23 UTC
can you change the SHELL=/bin/sh line in the linux/Makefile to SHELL=/bin/bash
and see if it works...

let me know...
Comment 5 Martin Mokrejs 2004-08-26 05:55:41 UTC
I set it to /bin/bash -v  to get more info.

# make
uname -r
if [ -e /lib/modules/2.4.28-pre2/source ]; then echo
/lib/modules/2.4.28-pre2/source; else echo /lib/modules/2.4.28-pre2/build; fi
uname -m
if [ JavaCC @PV@ -lt 2 -o  -lt 4 ]; then echo y; fi
/bin/bash: line 1: [: too many arguments
Makefile:287: *** CONFIG_X86_CMPXCHG needs to be enabled in the kernel.  Stop.
#

# set | grep Java
VERSION='JavaCC @PV@'
#

Uhhhm, what's that?

# unset VERSION
make

and all works fine. Shouldn't the script look for BASH_VERSION if at all?


linux # cp *.o /lib/modules/2.4.28-pre2/kernel/drivers/char/drm          
linux # depmod -a
depmod: *** Unresolved symbols in
/lib/modules/2.4.28-pre2/kernel/drivers/char/drm/via_drv.o
linux #
Comment 6 Dave Airlie 2004-12-30 00:11:57 UTC
Just getting back through my bugs, the VERSION string should be coming from the
Linux kernel build system not your own environment, so whatever is setting
VERSION is breaking the drm build...

we can't fix this in the makefile I don't think.... maybe make the kernel people
use KERNEL_VERSION instead of VERSION but it still wouldn't matter as the
Makefile deals with all older kernels.. so I'm marking it notourbug unless
anyone has an objection...
Comment 7 Donnie Berkholz 2005-01-02 12:19:45 UTC
http://bugs.gentoo.org/show_bug.cgi?id=61975 is the bug, caused by Gentoo's Java
maintainers.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.