[Karmic] nvidia DKMS building and installation for kernel 2.6.31-1-generic fails with exit status 10

Bug #394262 reported by Claudio Moretti
176
This bug affects 25 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-180 (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Karmic by Darryl Browning

Bug Description

Binary package hint: nvidia-180-kernel-source

When executing postinst, Nvidia module build for kernel 2.6.31-1-generic fails.

I tried to rebuild it, with no result:
root@Mycroft:/usr/bin# /etc/kernel/header_postinst.d/dkms 2.6.31-1-generic
 * Running DKMS auto installation service for kernel 2.6.31-1-generic
 * nvidia (185.18.14)... nvidia (185.18.14): Installing module.
.........(bad exit status: 10)
  Build failed. Installation skipped.

Revision history for this message
Claudio Moretti (flyingstar16) wrote :
Download full text (4.2 KiB)

root@Mycroft:/usr/src/nvidia-185.18.14$ make SYSSRC=/usr/src/linux-headers-2.6.31-1-generic/ module
NVIDIA: calling KBUILD...
make CC=cc KBUILD_VERBOSE=1 -C /usr/src/linux-headers-2.6.31-1-generic/ SUBDIRS= modules
make -f /usr/src/linux-headers-2.6.31-1-generic/Makefile silentoldconfig
make -f scripts/Makefile.build obj=scripts/basic
  gcc -Wp,-MD,scripts/basic/.fixdep.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/basic/fixdep scripts/basic/fixdep.c
  gcc -Wp,-MD,scripts/basic/.docproc.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/basic/docproc scripts/basic/docproc.c
  gcc -Wp,-MD,scripts/basic/.hash.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/basic/hash scripts/basic/hash.c
mkdir -p include/linux include/config
make -f scripts/Makefile.build obj=scripts/kconfig silentoldconfig
  gcc -Wp,-MD,scripts/kconfig/.conf.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DCURSES_LOC="<ncurses.h>" -DLOCALE -c -o scripts/kconfig/conf.o scripts/kconfig/conf.c
scripts/kconfig/conf.c: In function ‘conf_askvalue’:
scripts/kconfig/conf.c:105: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:307: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
  gcc -Wp,-MD,scripts/kconfig/.kxgettext.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DCURSES_LOC="<ncurses.h>" -DLOCALE -c -o scripts/kconfig/kxgettext.o scripts/kconfig/kxgettext.c
  gcc -Wp,-MD,scripts/kconfig/.zconf.tab.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DCURSES_LOC="<ncurses.h>" -DLOCALE -Iscripts/kconfig -c -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.c
  gcc -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/zconf.tab.o -lncurses
scripts/kconfig/conf -s arch/x86/Kconfig
rm -f include/config/kernel.release
echo 2.6.31-rc1 > include/config/kernel.release
set -e; : ' CHK include/linux/version.h'; mkdir -p include/linux/; (echo \#define LINUX_VERSION_CODE 132639; echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) < /usr/src/linux-headers-2.6.31-1-generic/Makefile > include/linux/version.h.tmp; if [ -r include/linux/version.h ] && cmp -s include/linux/version.h include/linux/version.h.tmp; then rm -f include/linux/version.h.tmp; else : ' UPD include/linux/version.h'; mv -f include/linux/version.h.tmp include/linux/version.h; fi
set -e; : ' CHK include/linux/utsrelease.h'; mkdir -p include/linux/; if [ `echo -n "2.6.31-rc1" | wc -c ` -gt 64 ]; then echo '"2.6.31-rc1" exceeds 64 characters' >&2; exit 1; fi; (echo \#define UTS_RELEASE \"2.6.31-rc1\";) < include/config/kernel.release > include/linux/utsrelease.h.tmp; if [ -r include/linux/utsrelease.h ] && cmp -s include/linux/utsrelease.h include/linux/utsrelease.h.tmp; then rm -f include/linux/utsrelease.h.tmp; else : ' UPD include/linux/utsrelease.h'; mv -f include/linux/utsrelease.h.tmp include/linux/utsrelease.h; fi
set -e; if [ -L include/asm ]; then asmlink=`readlink include/asm | cut -d '-' -f 2`; if [ "$asmlink" != "x86" ]; t...

Read more...

Revision history for this message
3vi1 (launchpad-net-eternaldusk) wrote :

I can confirm seeing the same behavior, as have others in duplicate reports.

Changed in nvidia-graphics-drivers-180 (Ubuntu):
status: New → Confirmed
Revision history for this message
anagor (anagor) wrote :

Very similar behaviour on my system, however the exit code error is different.
I've attached the DKMS make log.

Revision history for this message
Thomas E Jenkins (thomas-jenkins) wrote :

I was able to build it after manually making the changes shown in the below forum post.

http://www.nvnews.net/vbulletin/showpost.php?s=09accab934da34868e512d84facb6c92&p=2033988&postcount=3

Revision history for this message
XmIsTeR (xmisterhu) wrote :

With applying this ( http://leigh123linux.fedorapeople.org/pub/patches/nvidia-185.18.14.patch ) patch in /usr/src/nvidia-185.18.14, dkms succesfully built the module.

I also attach the patch here.

Revision history for this message
Claudio Moretti (flyingstar16) wrote :

I can confirm that this patch work.
Instead of making the module, I launched

root@Mycroft:/usr/src/nvidia-185.18.14# /etc/kernel/header_postinst.d/dkms 2.6.31-1-generic
which (i hope) installed the module for the kernel.
I don't have time now, but I'll try to dpkg-reconfigure the kernel to see if the installation goes right, now.

Revision history for this message
Nikola Yanev (gericom) wrote :

the same here :(
the module dailed to build at the kernel 2.6.31-1-generic with exit status 2
the versions i've tried are 180.x 185.x and 190.x

Revision history for this message
Niall Creech (sevenmachines-deactivatedaccount) wrote :

a simple patch setup below for dkms if anyones still having problems with ‘struct agp_memory’ has no member named ‘memory’ and so on as per the nvnews patch
http://ubuntuforums.org/showpost.php?p=7546000&postcount=50

Revision history for this message
Nikola Yanev (gericom) wrote :

also affects nvidia-graphics-drivers-185 & nvidia-graphics-drivers-190

Daniel T Chen (crimsun)
Changed in nvidia-graphics-drivers-180 (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
David Stansby (dstansby-deactivatedaccount) wrote :

I get exit status 2 here. Attached is my make.log

Revision history for this message
Murat (msapoglu) wrote :

My Make.log

Revision history for this message
Lorenzo Zoffoli (lorenzo-zoffoli) wrote :

Patch to make driver compilable is here:
http://launchpadlibrarian.net/28552081/drm_agp_memory-2.6.31.patch

I successfully compiled nvidia 185.18.14 driver on kernel 2.6.31-1 with these commands:
cd /usr/src/nvidia-185.18.14/patches/
sudo wget http://launchpadlibrarian.net/28552081/drm_agp_memory-2.6.31.patch
sudo nano /usr/src/nvidia-185.18.14/dkms.conf

Add this line, save and exit:
PATCH[1]="drm_agp_memory-2.6.31.patch"

sudo dkms build -m nvidia -v 185.18.14 -k 2.6.31-1-generic
sudo dkms install -m nvidia -v 185.18.14 -k 2.6.31-1-generic

Revision history for this message
Lorenzo Zoffoli (lorenzo-zoffoli) wrote :

Of course 3rd command that need to manually write the string can be replaced by:

sudo echo 'PATCH[1]="drm_agp_memory-2.6.31.patch"' >> /usr/src/nvidia-185.18.14/dkms.conf

Revision history for this message
Michal Matyska (michal-matyska) wrote : Re: [Bug 394262] Re: [Karmic] nvidia DKMS building and installation for kernel 2.6.31-1-generic fails with exit status 10

zoff píše v Čt 02. 07. 2009 v 14:21 +0000:
> Patch to make driver compilable is here:
> http://launchpadlibrarian.net/28552081/drm_agp_memory-2.6.31.patch
>
> I successfully compiled nvidia 185.18.14 driver on kernel 2.6.31-1 with these commands:
> cd /usr/src/nvidia-185.18.14/patches/
> sudo wget http://launchpadlibrarian.net/28552081/drm_agp_memory-2.6.31.patch
> sudo nano /usr/src/nvidia-185.18.14/dkms.conf
>
> Add this line, save and exit:
> PATCH[1]="drm_agp_memory-2.6.31.patch"

IMHO it is better also to add following line:

PATCH_MATCH[1]="^2.6.3[1]"

so the patch is applied only if you build module for kernel ver 2.6.31,
otherwise it fails when you try to build the module for older kernels.

>
> sudo dkms build -m nvidia -v 185.18.14 -k 2.6.31-1-generic
> sudo dkms install -m nvidia -v 185.18.14 -k 2.6.31-1-generic
>

Revision history for this message
Anders Kaseorg (andersk) wrote :

> PATCH_MATCH[1]="^2.6.3[1]"

Why are there brackets in "^2.6.3[1]"? I’ve seen that pattern in many dkms.confs, but it doesn’t do anything; "^2.6.3[1]" is the same regex as "^2.6.31".

Perhaps this idea came from a corruption of "^2.6.3[1-9]", which at least matches kernels 2.6.31 through 2.6.39?

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

I can confirm the workaround provided by zoff fixes the build failure on 2.6.31. The driver works again!

Changed in nvidia-graphics-drivers-180 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-180 - 185.18.14-0ubuntu2

---------------
nvidia-graphics-drivers-180 (185.18.14-0ubuntu2) karmic; urgency=low

  * Add in drm_agp_memory-2.6.31.patch to enable 2.6.31 support
    until NVIDIA has it in their next driver release. (LP: #394262)
    - Thanks everyone in that bug for finding and testing this patch.
    - Note: this patch appears to be a bit of a hack (removing i2c support)
      so take it with a grain of salt if there are still problems.

 -- Mario Limonciello <email address hidden> Thu, 02 Jul 2009 12:30:34 -0500

Changed in nvidia-graphics-drivers-180 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Matt Domsch (matt-domsch) wrote :

a similar patch is needed for the older NVIDIA-Linux-x86_64-173.14.18-pkg2.run driver, used on older cards such as my NV30, if not using a DKMS version of that driver.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.