Created attachment 313937 [details] Temporary fix On linux-3.4.0-next-20120531 the app-emulation/virtualbox-modules build fail: error: implicit declaration of function "do_mmap" I don't know what's Gentoo policy on linux-next kernel breakages, but this is going to RC so reporting it early enough to be aware. do_mmap was replaced with vm_mmap. I have attached a patch which I used to build the modules on this kernel version. Be aware that the patch is not correct to deploy, use it if you have this specific error. When RC is live `>=` should be replaced with `>`
Created attachment 313939 [details, diff] Corrected patch Ignore the first attached fix, stupid mistake in there
Created attachment 314031 [details, diff] VirtualBox-Modules 4.1.16 fix against 3.5rc0+
Arvydas' patch is incomplete; it misses the changed locking semantics of vm_mmap() as well as the missing do_munmap(). I attached a tested patch.
(In reply to comment #3) > Arvydas' patch is incomplete; it misses the changed locking semantics of > vm_mmap() as well as the missing do_munmap(). > > I attached a tested patch. Yes, thank you for a proper fix.
This patch needs to be sent upstream but I guess they will release a new version as soon as 3.5.X is out
Created attachment 314345 [details] modified ebuild to automatically apply the vbox-4116-35rc0.patch in files dir
Is this still an issue with virtualbox-modules-4.1.18?
(In reply to comment #7) > Is this still an issue with virtualbox-modules-4.1.18? It fixes this problem
So let's wait for 4.1.18 to become stable.
I still get this error for all kernel versions I tried: 3.10.1 3.9.10 and 3.9.6 also tried virtualbox versions: 4.1.26, 4.2.14, and 4.2.16
Created attachment 353502 [details] build log for 4.2.26 with 3.10.1 kernel build.log from building failure
I think something is going wrong with your kernel version detection. The first error is "memobj-r0drv-linux.c:216:9: error: implicit declaration of function 'do_mmap'" should not be triggered on kernels 3.5.0 or higher: #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) .. #else <LINE 216 IS HERE> #endif The second error is "memobj-r0drv-linux.c:1465:38: error: 'VM_RESERVED' undeclared" and should not be triggered on 3.7.0 or higher: #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) .. #else <LINE 1465 HERE> #endif
*** Bug 426898 has been marked as a duplicate of this bug. ***
(In reply to Dongxu Li from comment #10) > I still get this error for all kernel versions I tried: 3.10.1 3.9.10 and > 3.9.6 > > also tried virtualbox versions: 4.1.26, 4.2.14, and 4.2.16 Any change since? I think this can be set to resolved fixed-upstream.
All these old Vbox versions are gone. No feedback from Dongxu Li for a half year. Please close resolved fixed-upstream.