Public bug reported: Relevant version information: mga-vid: 2.6.32-1 Kernel: 3.12.0-7-generic #15-Ubuntu SMP
It is not possible to build the mga-vid module on kernels >= 3.4. In kernel 3.4, asm/system.h was removed; this file is referred to by mga_vid.c and its absence causes the compilation to fail. Further, in kernel 3.7, VM_RESERVED was removed; this symbol is also referred to by mga_vid.c and its absence causes the compilation to fail. This compilation failure will occur on all versions of Ubuntu which use kernels >= 3.4 by default, ie. everything from quantal onwards. To reproduce the bug, install mga-vid-source and execute "sudo m-a a-i mga-vid" on a system running a kernel >=3.4 (>=3.7 to see both failures). Below is a patch which resolves the problem. With this patch, the compilation succeeds; mga_vid_test produces the expected results; mplayer works fine; and I am getting 288fps from glxgears on a G450 with 16MB RAM. --- modules/mga-vid.orig/mga_vid.c 2010-05-18 14:16:10.000000000 +0100 +++ modules/mga-vid/mga_vid.c 2013-12-16 00:01:08.000000000 +0000 @@ -52,6 +52,16 @@ #include <linux/kernel.h> #include <linux/sched.h> #include <linux/mm.h> +/* + * VM_RESERVED is not in kernels >= 3.7 + * Bug fix cribbed from: + * http://lists.alioth.debian.org/pipermail/pkg-nvidia-devel/2013-January/008414.html + * https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=314e51b9851b4f4e8ab302243ff5a6fc6147f379 + * + */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) +#define VM_RESERVED (VM_IO | VM_DONTEXPAND | VM_DONTDUMP) +#endif #include <linux/string.h> #include <linux/errno.h> @@ -70,7 +80,15 @@ #endif #include <asm/uaccess.h> +/* + * asm/system.h is not in kernels >= 3.4 + * Bug fix cribbed from: + * https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/993506 + * + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0) #include <asm/system.h> +#endif #include <asm/io.h> #ifndef PCI_DEVICE_ID_MATROX_G200_PCI ** Affects: mga-vid (Ubuntu) Importance: Undecided Status: New ** Patch added: "Patch to fix mga-vid module compilation failure on kernels >= 3.4" https://bugs.launchpad.net/bugs/1261248/+attachment/3930024/+files/mga-vid.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1261248 Title: mga-vid module fails to build on kernels >=3.4 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mga-vid/+bug/1261248/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs