Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 553194 - nvidia-drivers <= 343.36 build fails on 4.x kernel
Summary: nvidia-drivers <= 343.36 build fails on 4.x kernel
Status: RESOLVED DUPLICATE of bug 549714
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-25 01:12 UTC by Daniel Santos
Modified: 2015-06-30 22:25 UTC (History)
0 users

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


Attachments
fix (nvidia-drivers-read-write_cr4.patch,814 bytes, patch)
2015-06-25 01:12 UTC, Daniel Santos
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Santos 2015-06-25 01:12:30 UTC
Created attachment 405702 [details, diff]
fix

This appears to be addressed (haven't confirmed) in 346.72 by adding the macros NV_READ_CR4 and NV_READ_CR4 which are defined based upon NV_WRITE_CR4_PRESENT (no clue where that gets decided). Anyway, this patch doesn't bother with the macros, just does a dirtier inline #if/else where the functions are used.

See: https://devtalk.nvidia.com/default/topic/813458/linux/linux-4-0-rc1-346-35-build-error-_cr4-functions-fix/

/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();
     ^
/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);
     ^
Comment 1 Mike Gilbert gentoo-dev 2015-06-29 02:14:27 UTC

*** This bug has been marked as a duplicate of bug 549714 ***
Comment 2 Daniel Santos 2015-06-30 22:25:55 UTC
hmm, I would suggest patching this or potentially removing versions of nvidia-drivers from the tree, much preferably the former. I have a slightly older card and I cannot mask the versions "known to fail", >= 341. However, this requires me to manually patch the driver in order to merge it. While I understand that the kernel interface *IS* going to change -- that's just a fact of life, these little backports become vital to those who don't upgrade their hardware every time nvidia decides to stop supporting it.

I have a patch posted that works and won't force those who don't know how to find such patches and use them to go buy a new card (of course, an AMD with real open source drivers). The only thing I didnt put is the line in the ebuild to run it.