Created attachment 488596 [details] build.log The following error message appears several times before compiling fails: #error "This driver requires the ability to change memory types!"
Created attachment 488716 [details, diff] Patch for nvidia-drivers-4.12 Took the patch from: https://devtalk.nvidia.com/default/topic/1019362/linux/fully-working-patch-for-nvidia-driver-340-102-compiler-installer-file-and-linux-kernel-4-12/ and fixed the line diffs to compile with nvidia-drivers-340.120-r1.
Created attachment 488718 [details, diff] patch for the ebuild
It compiles and runs. Haven't tested if there are any other issues left. Please feel free to change the patch to match any necessary conventions.
It doesn't work for me. I've patched the ebuild, rebuilt manifest, downloaded your patch, but when emerging I get some "No file to patch. Skipping patch." and "X out of X hunks ignored" messages (build.log attached). Any help.
Created attachment 489550 [details] build.log
Created attachment 489634 [details] modified ebuild I failed to reproduce the issues with your USE-flags. It compiles fine on my machines. But I'm not a maintainer and don't have any experience of debugging ebuilds. I uploaded the full ebuild with the patch included. Maybe it helps. Btw. did you use the patch I've posted here? The issues you have posted are very similar to the issues I got, when I used the original patch from nvidia-devtalk.
(In reply to Sven Müller from comment #6) > Btw. did you use the patch I've posted here? The issues you have posted are > very similar to the issues I got, when I used the original patch from > nvidia-devtalk. I think so: I created the file /etc/portage/patches/x11-drivers/nvidia-drivers-340.102/nvidia-4.12.0.patch and pasted in it the content from your attachment here: https://627550.bugs.gentoo.org/attachment.cgi?id=488716. I think I did the same when installing the driver for the kernel 4.10: copying the corresponding patch in /etc/portage/patches/x11-drivers/nvidia-drivers-340.102 and emerging. I see you also posted this other patch: https://627550.bugs.gentoo.org/attachment.cgi?id=488718 but as, to be sincere, I don't know how to apply a patch to an ebuild (I'm no Gentoo expert at all, only a very regular user), I just copied the diff lines, edited the ebuild in my /usr/portage directory to paste said lines, recreated the manifest and went ahead with the emerge. I have used your modified ebuild but I get the same results. :-/ Thanks for your time.
Well, you are right and I must somehow doing things badly for applying your patch, because I have used the patch from Devtalk, and effectively I get the same build.log except for the info from lines 4992, 1258 and 1196, which are now 4993, 1259 and 1197, but their texts are exactly the same than before. So, I must be deffinitely doing something wrong. Could you please describe for me your exact process to apply your patch? Sorry for my clumsyness, heh.
I'm using a local overlay in order to use modified ebuilds. See https://wiki.gentoo.org/wiki/Custom_repository If you just want to get it installed once, you can also simply overwrite the official ebuild in portage. With the next portage sync your changes will be lost. To do so: 1. copy (=replace) the modified ebuild from the attachments above to /usr/portage/x11-drivers/nvidia-drivers/nvidia-drivers-340.102-r1.ebuild 2. copy the patch for nvidia-drivers-4.12 from above to /usr/portage/x11-drivers/nvidia-drivers/files/nvidia-4.12.0.patch 3. go to /usr/portage/x11-drivers/nvidia-drivers: ebuild nvidia-drivers-340.102-r1.ebuild digest 4. emerge nvidia-drivers If you want to do the manual way (no need to touch the ebuild): You need 2 terminals: 1. save the patch for nvidia-drivers-4.12 to your computer. 2. terminal 1: go to /usr/portage/x11-drivers/nvidia-drivers 3. terminal 1: ebuild nvidia-drivers-340.102-r1.ebuild unpack 4. terminal 2: go to /var/tmp/portage/x11-drivers/nvidia-drivers-340.102-r1/work 5. terminal 2: patch -p1 --dry-run < /path/to/nvidia-4.12.0.patch 6. terminal 2: if no errors occur, remove "--dry-run": patch -p1 < /path/to/nvidia-4.12.0.patch 7. terminal 1: ebuild nvidia-drivers-340.102-r1.ebuild compile 8. terminal 1: ebuild nvidia-drivers-340.102-r1.ebuild install 9. terminal 1: ebuild nvidia-drivers-340.102-r1.ebuild qmerge I guess, the way you did it, should be the official way. But I don't have any experience with user patches. No idea how to name the patch and no idea, in which order the patches are applied. Have fun!
Solved. The problem was one of those mistakes that are produced "spontaneously" or at least not related at all with all that technical stuff we have discussed here. I going to explain it just in case someone else could come to this page lookig for help with the same problem. Could find it helpful: First I tried what you described in the first method and moved my nvidia-4.12.0.patch file from /etc/portage/patches/blablabla... to /usr/portage/x11-drivers/nvidia-drivers/files/ with no luck; it even gave me more errors of the type: "No file to patch. Skipping patch." and "X out of X hunks ignored". So I tried the manual method. The patching process failed again, when running patch -p1 --dry-run, but this method provides more uselful information, and in the output messages I could see that the failure was due to "different line endings". I searched what the "duck" meant that and when made a slight idea I went again to your patch's attachment, copied the text but this time instead of pasting it in Nano directly and save it as nvidia-4.12.0.patch I first pasted it in Kate editor, selected all the text and in Tools/Line endings I made sure they were in the UNIX format. Then I copied the text again, pasted in Nano and saved as nvidia-4.12.0.patch. Then I followed the normal process: rebuild manifes/digest for nvidia-drivers-340.102-r1.ebuild you posted here, emerged, and everythong worked flawlessly. So, vielen dank (I hope I've guessed correctly you're german) for your help, Sven; there was never anything wrong with your ebuild, but I had not found the cause of the problem without your help. Best regards.
BTW, BGO admins, how can I change the bug status to solved? I dont see any button or link or something like that which allows me to change that "UNCONFIRMED" status.
Comment on attachment 488718 [details, diff] patch for the ebuild You can't use the eapply_user mechanism?