Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtualbox: 5.1.26 -> 5.2.0 #31037

Merged
merged 1 commit into from Nov 15, 2017
Merged

Conversation

NeQuissimus
Copy link
Member

@NeQuissimus NeQuissimus commented Oct 31, 2017

Motivation for this change

Update

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Something is wrong with QT, I'll try to take a look

./result/bin/VirtualBox
Qt FATAL: This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Reinstalling the application may fix this problem.
[1]    2156 abort      ./result/bin/VirtualBox

@aszlig
Copy link
Member

aszlig commented Oct 31, 2017

@NeQuissimus: What about the guest additions?

@NeQuissimus
Copy link
Member Author

@aszlig yep, I need to look at the QT thing first, otherwise I could build but not try them out...

@NeQuissimus
Copy link
Member Author

@aszlig Can you check out the guest additions build? I made some changes but it's trying to build vboxvideo and can't... I am unsure why, there does not seem to be a Makefile for it... Just skipping it sounds like a bad idea :D

@peterhoeg
Copy link
Member

I need to look at the QT thing first, otherwise I could build but not try them out...

I'm guessing this is the recurring issue with Qt applications not installed in the global environment - doesn't it work if you install it there?

@NeQuissimus
Copy link
Member Author

I did it! Everything seems to work now, including the test.
And I've had enough of make for a while now...
I am sure there are nicer ways of fixing the build but I don't know any.

@NeQuissimus NeQuissimus changed the title [WIP] virtualbox: 5.1.26 -> 5.2.0 virtualbox: 5.1.26 -> 5.2.0 Nov 15, 2017
@NeQuissimus NeQuissimus force-pushed the virtualbox_5_2_0 branch 2 times, most recently from c2260fc to a8f0557 Compare November 15, 2017 15:07
@NeQuissimus
Copy link
Member Author

NeQuissimus commented Nov 15, 2017

Does not work with kernel 4.14 though

 CC [M]  /tmp/nix-build-virtualbox-modules-5.2.0-4.14.drv-0/virtualbox-5.2.0-modsrc/vboxnetadp/VBoxNetAdp.o
/tmp/nix-build-virtualbox-modules-5.2.0-4.14.drv-0/virtualbox-5.2.0-modsrc/vboxnetflt/linux/VBoxNetFlt-linux.c: In function 'vboxNetFltLinuxSkBufFromSG':
/tmp/nix-build-virtualbox-modules-5.2.0-4.14.drv-0/virtualbox-5.2.0-modsrc/vboxnetflt/linux/VBoxNetFlt-linux.c:741:24: error: 'SKB_GSO_UDP' undeclared (first use in this function)
             fGsoType = SKB_GSO_UDP;
                        ^~~~~~~~~~~
/tmp/nix-build-virtualbox-modules-5.2.0-4.14.drv-0/virtualbox-5.2.0-modsrc/vboxnetflt/linux/VBoxNetFlt-linux.c:741:24: note: each undeclared identifier is reported only once for each function it appears in
In file included from /nix/store/p4jbgdq7wgq8hyvj2q9y8qfxhvd7jzir-virtualbox-5.2.0-modsrc/vboxnetflt/include/iprt/types.h:29:0,
                 from /nix/store/p4jbgdq7wgq8hyvj2q9y8qfxhvd7jzir-virtualbox-5.2.0-modsrc/vboxnetflt/r0drv/linux/the-linux-kernel.h:34,
                 from /tmp/nix-build-virtualbox-modules-5.2.0-4.14.drv-0/virtualbox-5.2.0-modsrc/vboxnetflt/linux/VBoxNetFlt-linux.c:24:
/tmp/nix-build-virtualbox-modules-5.2.0-4.14.drv-0/virtualbox-5.2.0-modsrc/vboxnetflt/linux/VBoxNetFlt-linux.c: In function 'vboxNetFltLinuxCanForwardAsGso':
/tmp/nix-build-virtualbox-modules-5.2.0-4.14.drv-0/virtualbox-5.2.0-modsrc/vboxnetflt/linux/VBoxNetFlt-linux.c:1276:53: error: 'SKB_GSO_UDP' undeclared (first use in this function)
     if (RT_UNLIKELY( skb_shinfo(pSkb)->gso_type & ~(SKB_GSO_UDP | SKB_GSO_DODGY | SKB_GSO_TCPV6 | SKB_GSO_TCPV4) ))
                                                     ^
/nix/store/p4jbgdq7wgq8hyvj2q9y8qfxhvd7jzir-virtualbox-5.2.0-modsrc/vboxnetflt/include/iprt/cdefs.h:1631:53: note: in definition of macro 'RT_UNLIKELY'
 #  define RT_UNLIKELY(expr)     __builtin_expect(!!(expr), 0)
                                                     ^~~~
/tmp/nix-build-virtualbox-modules-5.2.0-4.14.drv-0/virtualbox-5.2.0-modsrc/vboxnetflt/linux/VBoxNetFlt-linux.c: In function 'vboxNetFltLinuxForwardToIntNetInner':
/tmp/nix-build-virtualbox-modules-5.2.0-4.14.drv-0/virtualbox-5.2.0-modsrc/vboxnetflt/linux/VBoxNetFlt-linux.c:1526:47: error: 'SKB_GSO_UDP' undeclared (first use in this function)
         if (   (skb_shinfo(pBuf)->gso_type & (SKB_GSO_UDP | SKB_GSO_TCPV6 | SKB_GSO_TCPV4))
                                               ^~~~~~~~~~~
  CC [M]  /tmp/nix-build-virtualbox-modules-5.2.0-4.14.drv-0/virtualbox-5.2.0-modsrc/vboxdrv/SUPDrv.o
make[4]: *** [/nix/store/dpx61jja08dd9pnni9s6a024r28fagwi-linux-4.14-dev/lib/modules/4.14.0/source/scripts/Makefile.build:314: /tmp/nix-build-virtualbox-modules-5.2.0-4.14.drv-0/virtualbox-5.2.0-modsrc/vboxnetflt/linux/VBoxNetFlt-linux.o] Error 1

Edit: Looks like this is it https://www.virtualbox.org/ticket/17267

Copy link
Contributor

@orivej orivej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've confirmed that the new VirtualBox works. Thank you!

@orivej orivej merged commit b8f7027 into NixOS:master Nov 15, 2017
@NeQuissimus NeQuissimus deleted the virtualbox_5_2_0 branch November 15, 2017 18:42
@etu
Copy link
Contributor

etu commented Nov 20, 2017

@NeQuissimus I've got the same error as you with 4.14 even if I build it with 5.2.0.

The Virtualbox-ticket linked suggest that it should work with 5.2.0 on 4.14... Hmm...

Edit: Oh, I see in #31640, it should be fixed in 5.2.1

@vcunat
Copy link
Member

vcunat commented Nov 22, 2017

I suspect this broke "vboxvideo" driver: #31889 as merge of this PR is contained in that user's upgrade range.

aszlig added a commit that referenced this pull request Nov 24, 2017
Upstream changes without issue IDs:

 * User interface: various improvements for high resolution screens
 * User interface: added functionality to duplicate optical and floppy
                   images
 * User interface: various improvements for the virtual media manager
 * VMM: fixed emulation so that Plan 9 guests can start once more (5.1.0
        regression)
 * Storage: fixed regression breaking iSCSI
 * Audio: added HDA support for more exotic guests (e.g. Haiku)
 * Serial: fixed hanging I/O when using named pipes on Windows (5.2.0
           regression)
 * Serial: fixed broken communication with certain devices on Linux
           hosts
 * USB/OHCI: improved behavior so that the controller state after a VM
             reset is closer to the initial state after VM start
 * EFI: fixed HFS+ driver which in rare cases failed to access most
        files on a volume
 * Shared clipboard: fixed hang with OS X host and Linux guest
 * Linux hosts: fixed kernel module compilation and start failures with
                Linux kernel 4.14
 * X11 hosts: better handle WM_CLASS setting
 * Linux guests: fixed kernel module compilation and other problems with
                 Linux kernel 4.14
 * Linux guests: fixed various 5.2.0 regressions
 * Bridged networking: fixed duplicate EtherType in VLAN/priority tags
                       on Linux (5.2.0 regression)

The full changelog including issue IDs can be found at:

https://www.virtualbox.org/wiki/Changelog

Aside from just bumping the version number I also had to strip 3 levels
of the paths included in the guest-additions patches, because the
version was hardcoded in there and the patches still apply as-is.

I've re-added the stripped path using patchFlags and the -d option of
the patch utility.

Tested this by running all of the tests in the "virtualbox" NixOS VM
test module, here is the URL to the finished evaluation on my Hydra:

https://headcounter.org/hydra/eval/380191

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @NeQuissimus, @orivej, @etu, @vcunat
Issue: #31640
Issue: #31037
@vcunat
Copy link
Member

vcunat commented Dec 10, 2017

Now there's a question what to do about virtualbox on 17.09: #32537 I suspect that full virtualbox upgrade might be too intrusive.

aszlig added a commit that referenced this pull request Dec 11, 2017
This is done by adding two patches, one is the complete patch containing
the upstream fixes for version 5.2.2 backported against version 5.1.26.

The other one is basically the same patch, but only the relevant changes
for the guest additions and the hunks changed to use CR/LF instead of LF
line endings.

Both patches are based on [r62611], however the revision turned out to
not be the right one corresponding to the tarball, so instead of
rebasing the patch again I looked at the conflicts and the changes that
have been introduced in [r64183] was the reason for the conflict.

So I manually edited the second hunk for vbox_drv.c and dropped the
first three lines of context (those declaring the "i" variable). The
hunk still is distinct enough (not even another "vgacon_text_force" in
the source) so we shouldn't run into weird conflicts if we'd bump
VirtualBox to version 5.1.30.

While we could have fixed this by just updating VirtualBox to version
5.2.2, this would be a bit too intrusive (like @vcunat mentioned in
#31037 (comment)), not
only in our ecosystem but because version 5.2 has some known upstream
issues that are not resolved yet.

Quoting from https://www.virtualbox.org/wiki/Downloads:

   Note: (updated 8 December 2017) The Guest Additions image with the
   5.2.2 release still has some known problems with certain Linux
   distributions when 3D acceleration is enabled.

I have tested this change by running all the tests in the "virtualbox"
NixOS VM test against basically all of the kernel versions we ship
except linux-testing (4.15-rc1) and specialized versions. So the
specific linuxPackages_* attributes I've tested were:

  * linuxPackages_4_4 (failed, see below)
  * linuxPackages_4_9
  * linuxPackages_4_13
  * linuxPackages_4_14

Running the tests for Linux 4.4 have failed because the KVM guest
machines couldn't be started and timed out. However after running the
tests with the same kernel but the nixpkgs revision prior to this
commit, the tests had the same issue, so the test failure is unrelated
to this commit.

[r62611]: https://www.virtualbox.org/changeset/62611/vbox
[r64183]: https://www.virtualbox.org/changeset/64183/vbox

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @svanderburg
Fixes: #32537
@aszlig
Copy link
Member

aszlig commented Dec 11, 2017

@vcunat: I've backported the relevant fixes to VirtualBox version 5.1.26 in cb751f9.

@jpotier
Copy link
Contributor

jpotier commented Dec 11, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants