Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 419361 - app-emulation/virtualbox-modules: error: implicit declaration of function "do_mmap"
Summary: app-emulation/virtualbox-modules: error: implicit declaration of function "d...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
: 426898 (view as bug list)
Depends on: 427852 CVE-2012-3221
Blocks:
  Show dependency tree
 
Reported: 2012-06-02 15:07 UTC by Arvydas Sidorenko
Modified: 2015-06-02 18:04 UTC (History)
7 users (show)

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


Attachments
Temporary fix (virtualbox-modules-200120601.patch,1.14 KB, text/plain)
2012-06-02 15:07 UTC, Arvydas Sidorenko
Details
Corrected patch (virtualbox-modules-20120601.patch,1.12 KB, patch)
2012-06-02 15:13 UTC, Arvydas Sidorenko
Details | Diff
VirtualBox-Modules 4.1.16 fix against 3.5rc0+ (vbox-4116-35rc0.patch,5.05 KB, patch)
2012-06-03 07:28 UTC, Manuel Lauss
Details | Diff
modified ebuild to automatically apply the vbox-4116-35rc0.patch in files dir (virtualbox-modules-4.1.16.ebuild,1.61 KB, text/plain)
2012-06-05 21:02 UTC, jospezial
Details
build log for 4.2.26 with 3.10.1 kernel (build.log,5.47 KB, text/x-log)
2013-07-17 16:26 UTC, Dongxu Li
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arvydas Sidorenko 2012-06-02 15:07:34 UTC
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 `>`
Comment 1 Arvydas Sidorenko 2012-06-02 15:13:36 UTC
Created attachment 313939 [details, diff]
Corrected patch

Ignore the first attached fix, stupid mistake in there
Comment 2 Manuel Lauss 2012-06-03 07:28:51 UTC
Created attachment 314031 [details, diff]
VirtualBox-Modules 4.1.16 fix against 3.5rc0+
Comment 3 Manuel Lauss 2012-06-03 07:30:03 UTC
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.
Comment 4 Arvydas Sidorenko 2012-06-03 13:45:55 UTC
(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.
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2012-06-03 22:43:25 UTC
This patch needs to be sent upstream but I guess they will release a new version as soon as 3.5.X is out
Comment 6 jospezial 2012-06-05 21:02:47 UTC
Created attachment 314345 [details]
modified ebuild to automatically apply the vbox-4116-35rc0.patch in files dir
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2012-07-09 14:12:00 UTC
Is this still an issue with virtualbox-modules-4.1.18?
Comment 8 Pacho Ramos gentoo-dev 2012-08-01 18:58:35 UTC
(In reply to comment #7)
> Is this still an issue with virtualbox-modules-4.1.18?

It fixes this problem
Comment 9 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2012-08-02 04:49:05 UTC
So let's wait for 4.1.18 to become stable.
Comment 10 Dongxu Li 2013-07-17 16:24:04 UTC
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
Comment 11 Dongxu Li 2013-07-17 16:26:22 UTC
Created attachment 353502 [details]
build log for 4.2.26 with 3.10.1 kernel

build.log from building failure
Comment 12 Ben Kohler gentoo-dev 2013-10-03 20:45:56 UTC
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
Comment 13 Ben Kohler gentoo-dev 2013-10-03 22:04:10 UTC
*** Bug 426898 has been marked as a duplicate of this bug. ***
Comment 14 jospezial 2015-01-07 22:40:08 UTC
(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.
Comment 15 jospezial 2015-06-01 23:57:40 UTC
All these old Vbox versions are gone.

No feedback from Dongxu Li for a half year.

Please close resolved fixed-upstream.