Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

nvidia-drivers and kernel-4.0.0

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
56 posts
  • 1
  • 2
  • 3
  • Next
Author
Message
albright
Advocate
Advocate
User avatar
Posts: 2588
Joined: Sun Nov 16, 2003 6:36 pm
Location: Near Toronto

nvidia-drivers and kernel-4.0.0

  • Quote

Post by albright » Mon Apr 13, 2015 2:07 pm

nvidia-drivers-340.76 (which I need because of an old 9600GT card)
does not install on new kernel-4.0.0

here's the errors in the build log:

Code: Select all

/var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-pat.c:38:5: error: implicit declaration of function ‘read_cr4’ [-Werror=implicit-function-declaration]
     *cr4 = read_cr4();
     ^


/var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-pat.c:39:5: error: implicit declaration of function ‘write_cr4’ [-Werror=implicit-function-declaration]
     if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);


cc1: some warnings being treated as errors
/usr/src/linux-4.0.0-gentoo/scripts/Makefile.build:258: recipe for target '/var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-pat.o' failed
make[3]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-pat.o] Error 1
this is an unsupported kernel but I wonder if anyone has a patch ...
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Top
houtworm
Guru
Guru
User avatar
Posts: 397
Joined: Sat Mar 08, 2003 10:11 pm
Location: Den Haag, Netherlands
Contact:
Contact houtworm
Website

  • Quote

Post by houtworm » Tue Apr 14, 2015 5:27 am

Same problem here, nvidia-drivers-340.76 because an older card.

There is a patch at https://devtalk.nvidia.com/default/topi ... tions-fix/ but it needs a little change because the file that should be patched could not be found.
So I changed it into:

Code: Select all

--- a/kernel/nv-pat.c.orig
+++ b/kernel/nv-pat.c
@@ -35,8 +35,13 @@
     unsigned long cr0 = read_cr0();
     write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
     wbinvd();
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
     *cr4 = read_cr4();
     if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
+#else
+    *cr4 = __read_cr4();
+    if (*cr4 & 0x80) __write_cr4(*cr4 & ~0x80);
+#endif
     __flush_tlb();
 }

@@ -46,7 +51,11 @@
     wbinvd();
     __flush_tlb();
     write_cr0((cr0 & 0x9fffffff));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
     if (cr4 & 0x80) write_cr4(cr4);
+#else
+    if (cr4 & 0x80) __write_cr4(cr4);
+#endif
 }

 static int nv_determine_pat_mode(void)
put it in /etc/portage/patches/x11-drivers/nvidia-drivers

So now I am running gentoo-4.0.0 :-)
niemand is onbekwamer, dan een timmerman zonder hamer

Kees
Top
prffzc
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 105
Joined: Thu Sep 22, 2005 10:44 am

  • Quote

Post by prffzc » Tue Apr 14, 2015 7:10 am

Thank you houtworm!

This worked for me too (older card also).
Top
albright
Advocate
Advocate
User avatar
Posts: 2588
Joined: Sun Nov 16, 2003 6:36 pm
Location: Near Toronto

  • Quote

Post by albright » Tue Apr 14, 2015 12:59 pm

Thank you houtworm!

This worked for me too (older card also).
ditto here; great work
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Top
Pryka
l33t
l33t
User avatar
Posts: 658
Joined: Fri Jun 08, 2007 4:15 pm
Location: /dev/null

  • Quote

Post by Pryka » Thu Apr 16, 2015 5:52 pm

It's not working for me... :(

I wonder why... i have 9600GT and nvidia-drivers-340.76

After putting patch into /etc/portage/patches/x11-drivers/nvidia-drivers/kernel-4.0.0-patch, I still get this:

Code: Select all

/var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-pat.c: In function ‘nv_disable_caches’:
/var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-pat.c:38:5: error: implicit declaration of function ‘read_cr4’ [-Werror=implicit-function-declaration]
     *cr4 = read_cr4();
     ^
/var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-pat.c:39:5: error: implicit declaration of function ‘write_cr4’ [-Werror=implicit-function-declaration]
     if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
     ^
In file included from /usr/src/linux-4.0.0/include/uapi/linux/stddef.h:1:0,
                 from /usr/src/linux-4.0.0/include/linux/stddef.h:4,
                 from /usr/src/linux-4.0.0/include/uapi/linux/posix_types.h:4,
                 from /usr/src/linux-4.0.0/include/uapi/linux/types.h:13,
                 from /usr/src/linux-4.0.0/include/linux/types.h:5,
                 from /usr/src/linux-4.0.0/include/uapi/linux/capability.h:16,
                 from /usr/src/linux-4.0.0/include/linux/capability.h:15,
                 from /usr/src/linux-4.0.0/include/linux/sched.h:15,
                 from /usr/src/linux-4.0.0/include/linux/utsname.h:5,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-linux.h:44,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-procfs.c:15:
/usr/src/linux-4.0.0/arch/x86/include/asm/uaccess.h: In function ‘copy_from_user’:
/usr/src/linux-4.0.0/arch/x86/include/asm/uaccess.h:712:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(sz < 0 || sz >= n))
                          ^
/usr/src/linux-4.0.0/include/linux/compiler.h:163:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
/usr/src/linux-4.0.0/arch/x86/include/asm/uaccess.h: In function ‘copy_to_user’:
/usr/src/linux-4.0.0/arch/x86/include/asm/uaccess.h:730:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(sz < 0 || sz >= n))
                          ^
/usr/src/linux-4.0.0/include/linux/compiler.h:163:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
In file included from /usr/src/linux-4.0.0/include/uapi/linux/stddef.h:1:0,
                 from /usr/src/linux-4.0.0/include/linux/stddef.h:4,
                 from /usr/src/linux-4.0.0/include/uapi/linux/posix_types.h:4,
                 from /usr/src/linux-4.0.0/include/uapi/linux/types.h:13,
                 from /usr/src/linux-4.0.0/include/linux/types.h:5,
                 from /usr/src/linux-4.0.0/include/uapi/linux/capability.h:16,
                 from /usr/src/linux-4.0.0/include/linux/capability.h:15,
                 from /usr/src/linux-4.0.0/include/linux/sched.h:15,
                 from /usr/src/linux-4.0.0/include/linux/utsname.h:5,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-linux.h:44,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-usermap.c:15:
/usr/src/linux-4.0.0/arch/x86/include/asm/uaccess.h: In function ‘copy_from_user’:
/usr/src/linux-4.0.0/arch/x86/include/asm/uaccess.h:712:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(sz < 0 || sz >= n))
                          ^
/usr/src/linux-4.0.0/include/linux/compiler.h:163:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
/usr/src/linux-4.0.0/arch/x86/include/asm/uaccess.h: In function ‘copy_to_user’:
/usr/src/linux-4.0.0/arch/x86/include/asm/uaccess.h:730:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(sz < 0 || sz >= n))
                          ^
/usr/src/linux-4.0.0/include/linux/compiler.h:163:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
cc1: some warnings being treated as errors
/usr/src/linux-4.0.0/scripts/Makefile.build:258: recipe for target '/var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-pat.o' failed
make[3]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-pat.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/usr/src/linux-4.0.0/Makefile:1390: recipe for target '_module_/var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel' failed
make[2]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel] Error 2
make[2]: Leaving directory '/usr/src/linux-4.0.0'
Makefile:145: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-4.0.0'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
Makefile:181: recipe for target 'nvidia.ko' failed
make: *** [nvidia.ko] Error 1
Top
albright
Advocate
Advocate
User avatar
Posts: 2588
Joined: Sun Nov 16, 2003 6:36 pm
Location: Near Toronto

  • Quote

Post by albright » Thu Apr 16, 2015 6:05 pm

are you sure the patch is being applied?

shots in the dark:

patch file needs to be of form xxxxx.patch ?

blank space at end of each line of patch (this has bit me) ?
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Top
Pryka
l33t
l33t
User avatar
Posts: 658
Joined: Fri Jun 08, 2007 4:15 pm
Location: /dev/null

  • Quote

Post by Pryka » Thu Apr 16, 2015 6:22 pm

Wrong patch name, and after that blank space xD

Thx. :D
Top
gentoosapien
n00b
n00b
Posts: 2
Joined: Fri May 15, 2015 9:57 pm

  • Quote

Post by gentoosapien » Fri May 15, 2015 10:05 pm

:( what's wrong with me?!

Code: Select all

Failed Patch: linux-4.0.patch !
 *  ( /etc/portage/patches//x11-drivers/nvidia-drivers-340.76/linux-4.0.patch )

Code: Select all

 * Call stack:
 *     ebuild.sh, line   93:  Called pre_src_prepare
 *        bashrc, line    7:  Called epatch_user
 *   environment, line 1732:  Called epatch
 *   environment, line 1705:  Called die
 * The specific snippet of code:
 *               die "Failed Patch: ${patchname}!";
albrigth:
blank space at end of each line of patch (this has bit me) ?
double check!

Can somebody help me?! btw, did someone tried with kernel-4.0.3?
Top
albright
Advocate
Advocate
User avatar
Posts: 2588
Joined: Sun Nov 16, 2003 6:36 pm
Location: Near Toronto

  • Quote

Post by albright » Fri May 15, 2015 11:46 pm

an somebody help me?! btw, did someone tried with kernel-4.0.3?
yes, it worked for me ...

But - strangely - it failed the first time, installed correctly the second time :?
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Top
gentoosapien
n00b
n00b
Posts: 2
Joined: Fri May 15, 2015 9:57 pm

  • Quote

Post by gentoosapien » Sat May 16, 2015 2:11 pm

I'v patched the file by hand - the patch from /etc/portage/patch... doesn't applied by user epatch
"Failed Patch: ${patchname}!
The Patch works also with kernel 4.0.3 - Thanks a lot for this!
Top
gienah
Developer
Developer
Posts: 213
Joined: Wed Nov 24, 2010 3:19 am
Location: AU

  • Quote

Post by gienah » Wed May 20, 2015 1:23 pm

In case there are problems with copy/pasting the patch, I have tar'd up the patches that I use on my system running
kernel 4.0.4-hardened-r1 with x11-drivers/nvidia-drivers-340.76 here:

http://dev.gentoo.org/~gienah/unsupport ... .14.tar.gz

to extract, as root:

Code: Select all

cd /
tar xvf etc-portage-patches-x11-drivers-nvidia-drivers-340.76-for-kernel-gt-3.14.tar.gz
If you are not running a hardened kernel then the pax patch can be removed:

Code: Select all

rm /etc/portage/patches/x11-drivers/nvidia-drivers-340.76/nvidia-drivers-331.49-pax-uvm.patch
Top
zhushazang
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 81
Joined: Thu Dec 01, 2005 5:37 pm

  • Quote

Post by zhushazang » Tue May 26, 2015 11:42 pm

Also worked here:

sys-kernel/vanilla-sources-4.0.4
x11-drivers/nvidia-drivers-340.76

Just reporting
Top
Cueball
n00b
n00b
Posts: 27
Joined: Sat Sep 19, 2009 7:02 pm
Location: Barrow-in-Furness
Contact:
Contact Cueball
Website

  • Quote

Post by Cueball » Mon Jun 15, 2015 2:03 pm

Not working for me:
sys-kernel/vanilla-sources-4.0.4
x11-drivers/nvidia-drivers-304.125

Code: Select all

In file included from /usr/src/linux-4.0.5-gentoo/include/uapi/linux/stddef.h:1:0,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/stddef.h:4,
                 from /usr/src/linux-4.0.5-gentoo/include/uapi/linux/posix_types.h:4,
                 from /usr/src/linux-4.0.5-gentoo/include/uapi/linux/types.h:13,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/types.h:5,
                 from /usr/src/linux-4.0.5-gentoo/include/uapi/linux/capability.h:16,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/capability.h:15,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/sched.h:15,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/utsname.h:5,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv-linux.h:40,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c:13:
/usr/src/linux-4.0.5-gentoo/arch/x86/include/asm/uaccess.h: In function ‘copy_from_user’:
/usr/src/linux-4.0.5-gentoo/arch/x86/include/asm/uaccess.h:712:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(sz < 0 || sz >= n))
                          ^
/usr/src/linux-4.0.5-gentoo/include/linux/compiler.h:163:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
/usr/src/linux-4.0.5-gentoo/arch/x86/include/asm/uaccess.h: In function ‘copy_to_user’:
/usr/src/linux-4.0.5-gentoo/arch/x86/include/asm/uaccess.h:730:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(sz < 0 || sz >= n))
                          ^
/usr/src/linux-4.0.5-gentoo/include/linux/compiler.h:163:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c: In function ‘nv_kern_unlocked_ioctl’:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c:2029:30: error: ‘struct file’ has no member named ‘f_dentry’
     return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
                              ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c: In function ‘nv_kern_compat_ioctl’:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c:2038:30: error: ‘struct file’ has no member named ‘f_dentry’
     return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
                              ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c: In function ‘nv_kern_unlocked_ioctl’:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c:2030:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c: In function ‘nv_kern_compat_ioctl’:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c:2039:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/usr/src/linux-4.0.5-gentoo/scripts/Makefile.build:258: recipe for target '/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.o' failed
make[4]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.o] Error 1
/usr/src/linux-4.0.5-gentoo/Makefile:1390: recipe for target '_module_/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel' failed
make[3]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel] Error 2
Makefile:145: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
Makefile:250: recipe for target 'module' failed
make[1]: *** [module] Error 1
makefile:59: recipe for target 'module' failed
make: *** [module] Error 2
I also have the above patch.

EDIT: Put in version wrong for my nvidia driver.
"It said on the side of the box "Requires Windows 95 or better", So I installed Linux"
unzip; strip; touch; finger; grep; mount; fsck; more; yes; fsck; umount; sleep
Top
Cueball
n00b
n00b
Posts: 27
Joined: Sat Sep 19, 2009 7:02 pm
Location: Barrow-in-Furness
Contact:
Contact Cueball
Website

  • Quote

Post by Cueball » Tue Jun 16, 2015 9:59 pm

I have also tried this on Kernel 4.0.5 now.
"It said on the side of the box "Requires Windows 95 or better", So I installed Linux"
unzip; strip; touch; finger; grep; mount; fsck; more; yes; fsck; umount; sleep
Top
papas
Tux's lil' helper
Tux's lil' helper
Posts: 141
Joined: Mon Dec 01, 2014 8:55 pm
Location: Athens

  • Quote

Post by papas » Wed Jun 17, 2015 8:48 pm

its not working for me too (kernel 4.0.5 , nvidia-304-125)
Top
gienah
Developer
Developer
Posts: 213
Joined: Wed Nov 24, 2010 3:19 am
Location: AU

  • Quote

Post by gienah » Thu Jun 18, 2015 7:08 am

Well of course x11-drivers/nvidia-drivers-304.125 is a different major version (304) to x11-drivers/nvidia-drivers-340.76 (340), so
you would not really expect it to work.

Please try saving this patch:

https://projects.archlinux.org/svntogit ... a93c932d82

Which I found by looking on the Nvidia Linux forum, finding the answer:

https://devtalk.nvidia.com/default/topi ... kernel-4-/

To the file (creating the directory if it does not already exist)

Code: Select all

/etc/portage/patches/x11-drivers/nvidia-drivers-304.125/nvidia-drivers-304.125-kernel-4.0.patch
And let us know if it works or not. My hardware is not supported by the 304 driver.
Top
mani001
Guru
Guru
Posts: 491
Joined: Sat Dec 04, 2004 12:41 pm
Location: Oleiros

  • Quote

Post by mani001 » Thu Jun 18, 2015 2:13 pm

I'm also on x11-drivers/nvidia-drivers-304.125 and bumped into the same problem. Unfortunately, the patch didn't work for me (I put it in the right directory in /etc/portage/patches and made sure it was applied checking the output from emerge...). I just hope nvidia doesn't leave us like this :?
Top
tomtom69
Apprentice
Apprentice
Posts: 263
Joined: Tue Nov 09, 2010 9:29 am
Location: Bavaria

  • Quote

Post by tomtom69 » Thu Jun 18, 2015 5:03 pm

I had the same problem.
Besides the patch mentioned, I generated an additional patch to address the "f_dentry" error, which I put into the file
/etc/portage/patches/x11-drivers/nvidia-drivers-304.125/nvidia-drivers-304.125-kernel-4.0.5.patch
(see patch below)
With this patch in addition to the patch mentioned by gienah I can successfully compile and run a 4.0.5 kernel with nvidia-drivers-304.125
(Sorry if the patch is not directly downloadable or displayed inconveniently - this is the first time I do this in a forum so maybe it is not as convenient as can be) :-)

tom



Patch:

--- kernel/nv.c 2014-12-02 04:58:34.000000000 +0100
+++ kernel/nv.c 2015-06-18 18:51:15.300179450 +0200
@@ -2026,7 +2026,7 @@ long nv_kern_unlocked_ioctl(
unsigned long i_arg
)
{
- return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+ return nv_kern_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
}

long nv_kern_compat_ioctl(
@@ -2035,7 +2035,7 @@ long nv_kern_compat_ioctl(
unsigned long i_arg
)
{
- return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+ return nv_kern_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
}

/*
Top
papas
Tux's lil' helper
Tux's lil' helper
Posts: 141
Joined: Mon Dec 01, 2014 8:55 pm
Location: Athens

  • Quote

Post by papas » Thu Jun 18, 2015 5:58 pm

gienah wrote:Well of course x11-drivers/nvidia-drivers-304.125 is a different major version (304) to x11-drivers/nvidia-drivers-340.76 (340), so
you would not really expect it to work.

Please try saving this patch:

https://projects.archlinux.org/svntogit ... a93c932d82

Which I found by looking on the Nvidia Linux forum, finding the answer:

https://devtalk.nvidia.com/default/topi ... kernel-4-/

To the file (creating the directory if it does not already exist)

Code: Select all

/etc/portage/patches/x11-drivers/nvidia-drivers-304.125/nvidia-drivers-304.125-kernel-4.0.patch
And let us know if it works or not. My hardware is not supported by the 304 driver.
Unfortunately didn't work:

Code: Select all

 maria@andreas ~ $ sudo emerge --ask @module-rebuild                                       
Password: 

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-drivers/nvidia-drivers-304.125 

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests
>>> Running pre-merge checks for x11-drivers/nvidia-drivers-304.125
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/4.0.5-gentoo/build
 * Found sources for kernel version:
 *     4.0.5-gentoo
 * Gentoo supports kernels which are supported by NVIDIA
 * which are limited to the following kernels:
 * <sys-kernel/gentoo-sources-3.18
 * <sys-kernel/vanilla-sources-3.18
 * 
 * You are free to utilize epatch_user to provide whatever
 * support you feel is appropriate, but will not receive
 * support as a result of those changes.
 * 
 * Do not file a bug report about this.
 * Checking for suitable kernel configuration options...                                                              [ ok ]

>>> Emerging (1 of 1) x11-drivers/nvidia-drivers-304.125::gentoo
 * NVIDIA-Linux-x86_64-304.125.run SHA256 SHA512 WHIRLPOOL size ;-) ...                                               [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/4.0.5-gentoo/build
 * Found sources for kernel version:
 *     4.0.5-gentoo
>>> Unpacking source...
>>> Unpacking NVIDIA-Linux-x86_64-304.125.run to /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work
>>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work
>>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work ...
 * Applying user patches from /etc/portage/patches//x11-drivers/nvidia-drivers ...
 *   linux-4.patch ...                                                                                                [ ok ]
 * Done with patching
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work ...
 * Preparing nvidia module
make -j1 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' ARCH=x86_64 IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/4.0.5-gentoo/build CC=x86_64-pc-linux-gnu-gcc clean module 
NVIDIA: calling KBUILD...
make -C /lib/modules/4.0.5-gentoo/build KBUILD_SRC=/usr/src/linux-4.0.5-gentoo \
-f /usr/src/linux-4.0.5-gentoo/Makefile modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
echo >&2;                                                       \
echo >&2 "  ERROR: Kernel configuration is invalid.";           \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \
echo >&2 ;                                                      \
/bin/false)
mkdir -p /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/.tmp_versions ; rm -f /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/.tmp_versions/*
make -f /usr/src/linux-4.0.5-gentoo/scripts/Makefile.build obj=/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel
  x86_64-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/.nv.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include -I/usr/src/linux-4.0.5-gentoo/arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -I/usr/src/linux-4.0.5-gentoo/include -Iinclude -I/usr/src/linux-4.0.5-gentoo/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-4.0.5-gentoo/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-4.0.5-gentoo/include/linux/kconfig.h   -I/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64 -mno-80387 -mno-fp-ret-in-387 -march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO   -I/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING="304.125" -Wno-unused-function -Wuninitialized -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)"  -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.o /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c
In file included from /usr/src/linux-4.0.5-gentoo/include/uapi/linux/stddef.h:1:0,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/stddef.h:4,
                 from /usr/src/linux-4.0.5-gentoo/include/uapi/linux/posix_types.h:4,
                 from /usr/src/linux-4.0.5-gentoo/include/uapi/linux/types.h:13,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/types.h:5,
                 from /usr/src/linux-4.0.5-gentoo/include/uapi/linux/capability.h:16,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/capability.h:15,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/sched.h:15,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/utsname.h:5,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv-linux.h:40,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c:13:
/usr/src/linux-4.0.5-gentoo/include/asm-generic/qrwlock.h: In function ‘queue_write_trylock’:
/usr/src/linux-4.0.5-gentoo/include/asm-generic/qrwlock.h:93:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          cnts, cnts | _QW_LOCKED) == cnts);
                                   ^
/usr/src/linux-4.0.5-gentoo/include/linux/compiler.h:163:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
In file included from /usr/src/linux-4.0.5-gentoo/include/uapi/linux/stddef.h:1:0,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/stddef.h:4,
                 from /usr/src/linux-4.0.5-gentoo/include/uapi/linux/posix_types.h:4,
                 from /usr/src/linux-4.0.5-gentoo/include/uapi/linux/types.h:13,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/types.h:5,
                 from /usr/src/linux-4.0.5-gentoo/include/uapi/linux/capability.h:16,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/capability.h:15,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/sched.h:15,
                 from /usr/src/linux-4.0.5-gentoo/include/linux/utsname.h:5,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv-linux.h:40,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c:13:
/usr/src/linux-4.0.5-gentoo/arch/x86/include/asm/uaccess.h: In function ‘copy_from_user’:
/usr/src/linux-4.0.5-gentoo/arch/x86/include/asm/uaccess.h:712:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(sz < 0 || sz >= n))
                          ^
/usr/src/linux-4.0.5-gentoo/include/linux/compiler.h:163:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
/usr/src/linux-4.0.5-gentoo/arch/x86/include/asm/uaccess.h: In function ‘copy_to_user’:
/usr/src/linux-4.0.5-gentoo/arch/x86/include/asm/uaccess.h:730:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(sz < 0 || sz >= n))
                          ^
/usr/src/linux-4.0.5-gentoo/include/linux/compiler.h:163:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c: In function ‘nv_kern_unlocked_ioctl’:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c:2029:30: error: ‘struct file’ has no member named ‘f_dentry’
     return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
                              ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c: In function ‘nv_kern_compat_ioctl’:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c:2038:30: error: ‘struct file’ has no member named ‘f_dentry’
     return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
                              ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c: In function ‘nv_kern_unlocked_ioctl’:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c:2030:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c: In function ‘nv_kern_compat_ioctl’:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.c:2039:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/usr/src/linux-4.0.5-gentoo/scripts/Makefile.build:258: recipe for target '/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.o' failed
make[4]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel/nv.o] Error 1
/usr/src/linux-4.0.5-gentoo/Makefile:1390: recipe for target '_module_/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel' failed
make[3]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel] Error 2
Makefile:145: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
Makefile:250: recipe for target 'module' failed
make[1]: *** [module] Error 1
makefile:59: recipe for target 'module' failed
make: *** [module] Error 2
 * ERROR: x11-drivers/nvidia-drivers-304.125::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-304.125::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-304.125::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/kernel'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/'
 * !!! User patches were applied to this build!
Top
papas
Tux's lil' helper
Tux's lil' helper
Posts: 141
Joined: Mon Dec 01, 2014 8:55 pm
Location: Athens

  • Quote

Post by papas » Thu Jun 18, 2015 6:09 pm

tomtom69 wrote:I had the same problem.
Besides the patch mentioned, I generated an additional patch to address the "f_dentry" error, which I put into the file
/etc/portage/patches/x11-drivers/nvidia-drivers-304.125/nvidia-drivers-304.125-kernel-4.0.5.patch
(see patch below)
With this patch in addition to the patch mentioned by gienah I can successfully compile and run a 4.0.5 kernel with nvidia-drivers-304.125
(Sorry if the patch is not directly downloadable or displayed inconveniently - this is the first time I do this in a forum so maybe it is not as convenient as can be) :-)

tom



Patch:

--- kernel/nv.c 2014-12-02 04:58:34.000000000 +0100
+++ kernel/nv.c 2015-06-18 18:51:15.300179450 +0200
@@ -2026,7 +2026,7 @@ long nv_kern_unlocked_ioctl(
unsigned long i_arg
)
{
- return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+ return nv_kern_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
}

long nv_kern_compat_ioctl(
@@ -2035,7 +2035,7 @@ long nv_kern_compat_ioctl(
unsigned long i_arg
)
{
- return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+ return nv_kern_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
}

/*
unfortunately didn't work but i think there is syntax error in that code. Can you please check it again?

Code: Select all

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-drivers/nvidia-drivers-304.125 

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests
>>> Running pre-merge checks for x11-drivers/nvidia-drivers-304.125
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/4.0.5-gentoo/build
 * Found sources for kernel version:
 *     4.0.5-gentoo
 * Gentoo supports kernels which are supported by NVIDIA
 * which are limited to the following kernels:
 * <sys-kernel/gentoo-sources-3.18
 * <sys-kernel/vanilla-sources-3.18
 * 
 * You are free to utilize epatch_user to provide whatever
 * support you feel is appropriate, but will not receive
 * support as a result of those changes.
 * 
 * Do not file a bug report about this.
 * Checking for suitable kernel configuration options...                                                              [ ok ]

>>> Emerging (1 of 1) x11-drivers/nvidia-drivers-304.125::gentoo
 * NVIDIA-Linux-x86_64-304.125.run SHA256 SHA512 WHIRLPOOL size ;-) ...                                               [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/4.0.5-gentoo/build
 * Found sources for kernel version:
 *     4.0.5-gentoo
>>> Unpacking source...
>>> Unpacking NVIDIA-Linux-x86_64-304.125.run to /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work
>>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work
>>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work ...
 * Applying user patches from /etc/portage/patches//x11-drivers/nvidia-drivers ...
 *   linux-4.patch ...

 * Failed Patch: linux-4.patch !
 *  ( /etc/portage/patches//x11-drivers/nvidia-drivers/linux-4.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/x11-drivers/nvidia-drivers-304.125/temp/linux-4.patch.out

 * ERROR: x11-drivers/nvidia-drivers-304.125::gentoo failed (prepare phase):
 *   Failed Patch: linux-4.patch!
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_prepare
 *   environment, line 4394:  Called epatch_user
 *   environment, line 1701:  Called epatch
 *   environment, line 1674:  Called die
 * The specific snippet of code:
 *               die "Failed Patch: ${patchname}!";
 * 
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-304.125::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-304.125::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/work/'

>>> Failed to emerge x11-drivers/nvidia-drivers-304.125, Log file:

>>>  '/var/tmp/portage/x11-drivers/nvidia-drivers-304.125/temp/build.log'

 * Messages for package x11-drivers/nvidia-drivers-304.125:

 * Gentoo supports kernels which are supported by NVIDIA
 * which are limited to the following kernels:
 * <sys-kernel/gentoo-sources-3.18
 * <sys-kernel/vanilla-sources-3.18
 * 
 * You are free to utilize epatch_user to provide whatever
 * support you feel is appropriate, but will not receive
 * support as a result of those changes.
 * 
 * Do not file a bug report about this.
Thank you anyway!!!!
Top
tomtom69
Apprentice
Apprentice
Posts: 263
Joined: Tue Nov 09, 2010 9:29 am
Location: Bavaria

  • Quote

Post by tomtom69 » Thu Jun 18, 2015 6:30 pm

Strange. I pasted exactly the file from my /etc/portage/patches/x11-drivers/nvidia-drivers-304.125/nvidia-drivers-304.125-kernel-4.0.5.patch
I now copied the patch again and fresh into pastebin. Could you try this one?:
http://pastebin.com/NCJaqux7
Top
papas
Tux's lil' helper
Tux's lil' helper
Posts: 141
Joined: Mon Dec 01, 2014 8:55 pm
Location: Athens

  • Quote

Post by papas » Thu Jun 18, 2015 7:08 pm

tomtom69 wrote:Strange. I pasted exactly the file from my /etc/portage/patches/x11-drivers/nvidia-drivers-304.125/nvidia-drivers-304.125-kernel-4.0.5.patch
I now copied the patch again and fresh into pastebin. Could you try this one?:
http://pastebin.com/NCJaqux7
Now the patch its fine but still i cant build the driver, maybe there is something wrong with my system.
Can anybody else try the patch?
Thank you again tomtom69.
Top
mani001
Guru
Guru
Posts: 491
Joined: Sat Dec 04, 2004 12:41 pm
Location: Oleiros

  • Quote

Post by mani001 » Thu Jun 18, 2015 9:58 pm

tomtom69, your patch (along with the other one from the NVIDIA forums) did the trick for me :D Thank you very much!!

Actually, because I couldn't use the patch as it was, I created myself a slightly modified version. Here it goes, just in case

http://pastebin.com/d1htUQGX

Cheers!!
Top
tomtom69
Apprentice
Apprentice
Posts: 263
Joined: Tue Nov 09, 2010 9:29 am
Location: Bavaria

  • Quote

Post by tomtom69 » Fri Jun 19, 2015 6:14 am

@papas:
Be sure to use both patches, the new one from me or from manni01, and also the one mentioned by geienah:
https://projects.archlinux.org/svntogit ... a93c932d82
Top
gerard27
Advocate
Advocate
Posts: 2377
Joined: Sun Jan 04, 2004 3:30 pm
Location: Netherlands

  • Quote

Post by gerard27 » Tue Jun 23, 2015 1:58 pm

@gienah,
Thanks for your link.
Even works on 4.1.0 !
Gerard.
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Top
Post Reply

56 posts
  • 1
  • 2
  • 3
  • Next

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic