VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 beta

Discussions about using Linux guests in VirtualBox.

VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 beta

Postby GabyB » 13. Dec 2013, 12:35

I have installed rhel-7-public-beta-x86_64-dvd.iso as a VirtualBox machine and tried to install the VBOXADDITIONS
but the build of the kernel module is aborted with the error:

/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeMapUser’:
/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1542:26: error: ‘struct mm_struct’ has no member named ‘numa_next_reset’
pTask->mm->numa_next_reset = jiffies + 0x7fffffffffffffffUL;
^
make[2]: *** [/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxguest] Error 2


I have attached the full logfile

My host system is CentOS-6.5 with VirtualBox-4.3-4.3.4_91027_el6-1.x86_64

Gabriella
Attachments
vboxadd-install.log
Log file of VirtualBox-Addition Installation
(82.41 KiB) Downloaded 125 times
GabyB
 
Posts: 3
Joined: 13. Dec 2013, 11:55
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: CentOS, Windows-7, Windows-XP

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby Perryg » 13. Dec 2013, 16:18

Is gcc installed and match the kernel?
What about the headers?
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby GabyB » 13. Dec 2013, 16:28

Perryg wrote:Is gcc installed and match the kernel?
What about the headers?


[root@rhel7-beta ~]# rpm -q gcc kernel-headers
gcc-4.8.2-3.el7.x86_64
kernel-headers-3.10.0-54.0.1.el7.x86_64

[root@rhel7-beta ~]# uname -r
3.10.0-54.0.1.el7.x86_64
GabyB
 
Posts: 3
Joined: 13. Dec 2013, 11:55
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: CentOS, Windows-7, Windows-XP

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby Perryg » 13. Dec 2013, 18:42

Code: Select all   Expand viewCollapse view
grep: /lib/modules/3.10.0-54.0.1.el7.x86_64/build/include/linux/version.h: No such file or directory

There is the problem. You might get it to work if you link the headers version.h to the location indicated above. (seems to be a common issue with rpm beta)

But you will still have issues because of the pre-released xorg. See screen shot.

rhel7beta-ga-fail.png
rhel7beta-ga-fail.png (149.51 KiB) Viewed 19722 times
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby GabyB » 14. Dec 2013, 13:28

Perryg wrote:
Code: Select all   Expand viewCollapse view
grep: /lib/modules/3.10.0-54.0.1.el7.x86_64/build/include/linux/version.h: No such file or directory

There is the problem. You might get it to work if you link the headers version.h to the location indicated above. (seems to be a common issue with rpm beta)

But you will still have issues because of the pre-released xorg. See screen shot.

rhel7beta-ga-fail.png


Thanks for this info. (I´ll continue test next year :wink: my Chrismas holidays started yesterday)
Perhaps there are updates until then.

Gabriella
GabyB
 
Posts: 3
Joined: 13. Dec 2013, 11:55
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: CentOS, Windows-7, Windows-XP

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby Zrax0111 » 17. Dec 2013, 21:37

This appears to be the same change that broke kernel 3.13 -- Red Hat must have backported this change to their 3.10 kernel. I tried removing the lines in memobj-r0drv-linux.c protected by the 3.13 check, and the modules compiled successfully (well, except for the video driver, which still fails due to the unsupported 1.14.99 Xorg version).
Zrax0111
 
Posts: 15
Joined: 17. Dec 2013, 21:23

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby andyh » 28. Dec 2013, 22:32

Still doesn't work in VirtualBox 4.3.6 and the corresponding additions.

Zrax0111's workaround for src/vboxguest-4.3.6/vboxguest/r0drv/linux/memobj-r0drv-linux.c seems to work for me (or rather allows installation to get further). Updating init/vboxadd-x11 to remove the check for a pre-release version of an Xorg server (commenting out the first .99. case) also allows the installation for the X11 driver to apparently succeed.

Tested by unpacking the installer (use --target .. --keep) and then VBoxGuestAdditions-amd64.tar.bz2, updating the files, repacking the bzip2, and running installer.sh.

Cursor is no longer bounded to the window when in X, but guest resolution doesn't re-adjust when the window is resized. Shared folders and copy/paste appears to work too.

Can't see any errors in the logs but YMMV.
andyh
 
Posts: 1
Joined: 28. Dec 2013, 22:05

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby Sardo_Numpsa » 1. Jan 2014, 22:39

I can't help, I just need to make a post before I can start a thread.

Happy New Year peeps!
Sardo_Numpsa
 
Posts: 2
Joined: 1. Jan 2014, 22:24

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby spicysomtam » 6. Jan 2014, 16:50

I have tried both fixes suggested. The device build issue is fixed but I don't see the virtualized display offer different resolutions, etc? Maybe I need to install mint 16/rh6u5 and compare? Here are some patches for both:

Code: Select all   Expand viewCollapse view
[root@rhel7beta tmp]# cat memobj-r0drv-linux.patch
*** memobj-r0drv-linux.c.orig   2014-01-06 12:22:01.008835191 +0000
--- memobj-r0drv-linux.c   2014-01-06 12:26:44.316816806 +0000
*************** DECLHIDDEN(int) rtR0MemObjNativeMapUser(
*** 1533,1546 ****
                  /** @todo Ugly hack! But right now we have no other means to disable
                   *        automatic NUMA page balancing. */
  # ifdef RT_OS_X86
- #  if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
-                 pTask->mm->numa_next_reset = jiffies + 0x7fffffffUL;
- #  endif
                  pTask->mm->numa_next_scan  = jiffies + 0x7fffffffUL;
  # else
- #  if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
-                 pTask->mm->numa_next_reset = jiffies + 0x7fffffffffffffffUL;
- #  endif
                  pTask->mm->numa_next_scan  = jiffies + 0x7fffffffffffffffUL;
  # endif
              }
--- 1533,1540 ----


Code: Select all   Expand viewCollapse view
[root@rhel7beta tmp]# cat vboxadd-x11.patch
*** vboxadd-x11.orig   2014-01-06 12:53:09.326004826 +0000
--- vboxadd-x11   2014-01-06 12:53:56.685669424 +0000
*************** setup()
*** 327,337 ****
          esac
      fi
      case $x_version in
!         1.*.99.* )
!             echo "Warning: unsupported pre-release version of X.Org Server installed.  Not"
!             echo "installing the X.Org drivers."
!             dox11config=""
!             ;;
          1.11.* )
              xserver_version="X.Org Server 1.11"
              vboxvideo_src=vboxvideo_drv_111.so
--- 327,337 ----
          esac
      fi
      case $x_version in
! #        1.*.99.* )
! #            echo "Warning: unsupported pre-release version of X.Org Server installed.  Not"
! #            echo "installing the X.Org drivers."
! #            dox11config=""
! #            ;;
          1.11.* )
              xserver_version="X.Org Server 1.11"
              vboxvideo_src=vboxvideo_drv_111.so
spicysomtam
 
Posts: 7
Joined: 2. Aug 2011, 13:19
Primary OS: Ubuntu 12.12
VBox Version: OSE Debian
Guest OSses: rhel5u5

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby spicysomtam » 6. Jan 2014, 18:52

Can confirm from a centos 6u5 install+guest additions, I get full screen. So needs some more work.
spicysomtam
 
Posts: 7
Joined: 2. Aug 2011, 13:19
Primary OS: Ubuntu 12.12
VBox Version: OSE Debian
Guest OSses: rhel5u5

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby Zrax0111 » 13. Jan 2014, 21:59

Note that commenting out the version check to get it to compile is not actually doing what you expect... Specifically, it causes the kernel module to compile against the Xorg 1.14 drivers, which Xorg tries to load (see your Xorg logs), but fails due to ABI differences between 1.14 and 1.15. These drivers are actually provided as binaries in the distributed guest additions package (see /opt/VBoxGuestAdditions-<version>/lib/VBoxGuestAdditions/vboxvideo_drv_*.so).

We need to actually get (or compile from OSE source) an Xorg 1.15 driver in order for it to be compatible with the Xorg included in RHEL7, not just comment out the check. Also, since RHEL does include the beta version, the script will also have to treat the Xorg beta version as being 1.15, so it won't try to build 1.14 (the beta reports itself as version 1.14.99).

UPDATE: I copied the vboxvideo.so from Arch Linux's virtualbox-guest-utils package into my RHEL7's /opt/VBoxGuestAdditions-4.3.6/lib/VBoxGuestAdditions/vboxvideo_drv_115.so, and updated the script to treat 1.14.99.* as Xorg 1.15 -- SUCCESS! I now have access to full screen resolutions. :)
Zrax0111
 
Posts: 15
Joined: 17. Dec 2013, 21:23

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby tcamuso » 23. Jan 2014, 17:37

I've submitted ticket #12638 for the compiler error along with the patch from spicysomtam for it.
tcamuso
 
Posts: 7
Joined: 23. Jan 2014, 15:33

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby spicysomtam » 27. Jan 2014, 16:35

Zrax0111 wrote:Note that commenting out the version check to get it to compile is not actually doing what you expect... Specifically, it causes the kernel module to compile against the Xorg 1.14 drivers, which Xorg tries to load (see your Xorg logs), but fails due to ABI differences between 1.14 and 1.15. These drivers are actually provided as binaries in the distributed guest additions package (see /opt/VBoxGuestAdditions-<version>/lib/VBoxGuestAdditions/vboxvideo_drv_*.so).

We need to actually get (or compile from OSE source) an Xorg 1.15 driver in order for it to be compatible with the Xorg included in RHEL7, not just comment out the check. Also, since RHEL does include the beta version, the script will also have to treat the Xorg beta version as being 1.15, so it won't try to build 1.14 (the beta reports itself as version 1.14.99).

UPDATE: I copied the vboxvideo.so from Arch Linux's virtualbox-guest-utils package into my RHEL7's /opt/VBoxGuestAdditions-4.3.6/lib/VBoxGuestAdditions/vboxvideo_drv_115.so, and updated the script to treat 1.14.99.* as Xorg 1.15 -- SUCCESS! I now have access to full screen resolutions. :)


Can you share? Maybe paste/updated the .so and a patch/instructions? Thanks
spicysomtam
 
Posts: 7
Joined: 2. Aug 2011, 13:19
Primary OS: Ubuntu 12.12
VBox Version: OSE Debian
Guest OSses: rhel5u5

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby spicysomtam » 27. Jan 2014, 18:16

Ok, I managed to do it. Full credit to Zraz0111 :)

Put this block in before the 1.*.99.* block (or comment the 1.*.99.* block out). This is in vboxadd-x11. Don't leave other vboxadd-x11 files around as it processes each one (eg a .sav, etc) :D

Code: Select all   Expand viewCollapse view
    case $x_version in
        1.14.99.* )
            xserver_version="X.Org Server 1.15"
            vboxvideo_src=vboxvideo_drv_115.so
            test "$system" = "redhat" || setupxorgconf=""
            ;;


I also attach the vboxvideo.so from arch linux. Rename this vboxvideo_drv_115.so in the lib/VBoxGuestAdditions dir.

This is an x86_64 so.
Attachments
vboxvideo.so.zip
(134.17 KiB) Downloaded 388 times
spicysomtam
 
Posts: 7
Joined: 2. Aug 2011, 13:19
Primary OS: Ubuntu 12.12
VBox Version: OSE Debian
Guest OSses: rhel5u5

Re: VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 bet

Postby miglesias » 13. Feb 2014, 02:56

Where is the script to be edited?
/opt/VBoxGuestAdditions-4.3.6/lib/VBoxGuestAdditions/ ???

Also, just edit the script or something else need to be done?

I edited the three vboxadd-x11 on my system
[root localhost /]# find . -name vboxadd-x11

./etc/rc.d/init.d/vboxadd-x11
./opt/VBoxGuestAdditions-4.3.6/lib/VBoxGuestAdditions/vboxadd-x11
./opt/VBoxGuestAdditions-4.3.6/init/vboxadd-x11
without any luck!

Thanks
miglesias
 
Posts: 1
Joined: 13. Feb 2014, 02:50


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 4 guests