NVIDIA Drivers 381.22 + Linux 4.11 = patch is still required. Really, NVIDIA? (Fixed in 4.11.1)
Without this patch https://pkgs.rpmfusion.org/cgit/nonfree/nvidia-kmod.git/tree/kernel_4.11.patch NVIDIA drivers 381.22 fail to build: [code]ld -r -o /usr/src/nvidia-381.22/nvidia-modeset/nv-modeset-interface.o /usr/src/nvidia-381.22/nvidia-modeset/nvidia-modeset-linux.o LD [M] /usr/src/nvidia-381.22/nvidia.o LD [M] /usr/src/nvidia-381.22/nvidia-uvm.o LD [M] /usr/src/nvidia-381.22/nvidia-modeset.o LD [M] /usr/src/nvidia-381.22/nvidia-drm.o Building modules, stage 2. MODPOST 4 modules FATAL: modpost: GPL-incompatible module nvidia-drm.ko uses GPL-only symbol 'refcount_inc' make[2]: *** [__modpost] Error 1 make[1]: *** [modules] Error 2 make[1]: Leaving directory `/usr/src/kernels/linux-4.11' make: *** [modules] Error 2[/code] This is with vanilla 4.11 kernel. Aaron, that's kinda unexpected. I mean RC1 for kernel 4.11 was released over two months ago and you still haven't made your drivers compatible with the last stable kernel. Shame on you.
Without this patch

https://pkgs.rpmfusion.org/cgit/nonfree/nvidia-kmod.git/tree/kernel_4.11.patch

NVIDIA drivers 381.22 fail to build:

ld -r -o /usr/src/nvidia-381.22/nvidia-modeset/nv-modeset-interface.o /usr/src/nvidia-381.22/nvidia-modeset/nvidia-modeset-linux.o
LD [M] /usr/src/nvidia-381.22/nvidia.o
LD [M] /usr/src/nvidia-381.22/nvidia-uvm.o
LD [M] /usr/src/nvidia-381.22/nvidia-modeset.o
LD [M] /usr/src/nvidia-381.22/nvidia-drm.o
Building modules, stage 2.
MODPOST 4 modules
FATAL: modpost: GPL-incompatible module nvidia-drm.ko uses GPL-only symbol 'refcount_inc'
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/kernels/linux-4.11'
make: *** [modules] Error 2


This is with vanilla 4.11 kernel.

Aaron, that's kinda unexpected. I mean RC1 for kernel 4.11 was released over two months ago and you still haven't made your drivers compatible with the last stable kernel. Shame on you.

Artem S. Tashkinov
Linux and Open Source advocate

#1
Posted 05/10/2017 09:49 AM   
4.12 kernel should work. I was told on irc that this may fix it https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d557d1b58b3546bab2c5bc2d624c5709840e6b10

#2
Posted 05/10/2017 01:05 PM   
Thanks! This is kinda f*cked up, but I should have got used to this years ago. I hope some 4.11.x patch will be released to revert this _GPL madness.
Thanks!

This is kinda f*cked up, but I should have got used to this years ago. I hope some 4.11.x patch will be released to revert this _GPL madness.

Artem S. Tashkinov
Linux and Open Source advocate

#3
Posted 05/10/2017 06:03 PM   
For 4.11, if you don't need nvidia-drm (the module that needs to be relicensed) then try excluding it - this works for 375.66: http://rglinuxtech.com/?p=1970
For 4.11, if you don't need nvidia-drm (the module that needs to be relicensed) then try excluding it - this works for 375.66: http://rglinuxtech.com/?p=1970

#4
Posted 05/10/2017 11:02 PM   
I notified Greg and [b]v4.11.1[/b] should fix it. However you can apply the needed patch to your kernel sooner: https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.11/refcount-change-export_symbol-markings.patch
Answer Accepted by Original Poster
I notified Greg and v4.11.1 should fix it. However you can apply the needed patch to your kernel sooner: https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.11/refcount-change-export_symbol-markings.patch

#5
Posted 05/11/2017 09:52 AM   
I just got notified by Greg that [b]v4.11.1[/b] is now in stable review. Expected to be released this weekend.
I just got notified by Greg that v4.11.1 is now in stable review. Expected to be released this weekend.

#6
Posted 05/11/2017 05:38 PM   
You can simply patch the Linux kernel sources themselves so that they stop this GPL terrorism and let all drivers compile whatever the license. Here's the patch I made (that one was for v4.2 but it still applies to Linux v4.11): [code] diff -durN linux-4.2.0/include/linux/export.h linux-4.2.0-patched/include/linux/export.h --- linux-4.2.0/include/linux/export.h 2015-08-30 20:34:09.000000000 +0200 +++ linux-4.2.0-patched/include/linux/export.h 2015-08-31 16:35:20.620645230 +0200 @@ -69,14 +69,14 @@ __EXPORT_SYMBOL(sym, "") #define EXPORT_SYMBOL_GPL(sym) \ - __EXPORT_SYMBOL(sym, "_gpl") + __EXPORT_SYMBOL(sym, "") #define EXPORT_SYMBOL_GPL_FUTURE(sym) \ - __EXPORT_SYMBOL(sym, "_gpl_future") + __EXPORT_SYMBOL(sym, "") #ifdef CONFIG_UNUSED_SYMBOLS #define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused") -#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl") +#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused") #else #define EXPORT_UNUSED_SYMBOL(sym) #define EXPORT_UNUSED_SYMBOL_GPL(sym) [/code]
You can simply patch the Linux kernel sources themselves so that they stop this GPL terrorism and let all drivers compile whatever the license.

Here's the patch I made (that one was for v4.2 but it still applies to Linux v4.11):
diff -durN linux-4.2.0/include/linux/export.h linux-4.2.0-patched/include/linux/export.h
--- linux-4.2.0/include/linux/export.h 2015-08-30 20:34:09.000000000 +0200
+++ linux-4.2.0-patched/include/linux/export.h 2015-08-31 16:35:20.620645230 +0200
@@ -69,14 +69,14 @@
__EXPORT_SYMBOL(sym, "")

#define EXPORT_SYMBOL_GPL(sym) \
- __EXPORT_SYMBOL(sym, "_gpl")
+ __EXPORT_SYMBOL(sym, "")

#define EXPORT_SYMBOL_GPL_FUTURE(sym) \
- __EXPORT_SYMBOL(sym, "_gpl_future")
+ __EXPORT_SYMBOL(sym, "")

#ifdef CONFIG_UNUSED_SYMBOLS
#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused")
-#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl")
+#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused")
#else
#define EXPORT_UNUSED_SYMBOL(sym)
#define EXPORT_UNUSED_SYMBOL_GPL(sym)

#7
Posted 05/11/2017 08:22 PM   
[quote=""]I notified Greg and [b]v4.11.1[/b] should fix it. However you can apply the needed patch to your kernel sooner: https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.11/refcount-change-export_symbol-markings.patch[/quote] Can you help me out with how to apply this patch?
said:I notified Greg and v4.11.1 should fix it. However you can apply the needed patch to your kernel sooner: https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.11/refcount-change-export_symbol-markings.patch



Can you help me out with how to apply this patch?

#8
Posted 05/13/2017 01:42 PM   
[quote=""]I just got notified by Greg that [b]v4.11.1[/b] is now in stable review. Expected to be released this weekend.[/quote] Sorts the issue out here!! Thanks.
said:I just got notified by Greg that v4.11.1 is now in stable review. Expected to be released this weekend.


Sorts the issue out here!! Thanks.

#9
Posted 05/17/2017 01:35 PM   
Scroll To Top

Add Reply