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: Fix build issue due to open-watcom-bin #87273

Merged
merged 1 commit into from May 9, 2020

Conversation

blitz
Copy link
Contributor

@blitz blitz commented May 8, 2020

Motivation for this change

We've already worked around failing stat() calls in the open-watcom-bin installer by running it in qemu-user. Turns out on some systems this workaround is also needed to run `wlib', the archiver of the Open Watcom toolchain.

This issue manifested itself in broken VirtualBox builds due to /build/virtualbox/out/linux.amd64/dbgopt/obj/VBoxPcBios32/pci32.obj not being found by `wlib'. Whether this issue manifests depends on the Linux kernel and sandboxing settings of the machine building the VirtualBox derivation.

We just wrap all Open Watcom binaries in qemu-user to avoid this now.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@flokli @tfc @B4dM4n @svanderburg

We've already worked around failing stat() calls in the installer by
running it in qemu-user. Turns out on some systems this workaround is
also needed to run `wlib', the archiver of the Open Watcom toolchain.

This issue manifested itself in broken VirtualBox builds due to
/build/virtualbox/out/linux.amd64/dbgopt/obj/VBoxPcBios32/pci32.obj
not being found by `wlib'.

We now just wrap all binaries in qemu-user to avoid this.
@blitz
Copy link
Contributor Author

blitz commented May 8, 2020

I've manually tested VirtualBox. It's happily running a Win10 guest.

@flokli
Copy link
Contributor

flokli commented May 9, 2020

@blitz do you have any idea on why I was still able to build it before this PR, but it fails on some machines?

@blitz
Copy link
Contributor Author

blitz commented May 9, 2020

@blitz do you have any idea on why I was still able to build it before this PR, but it fails on some machines?

@flokli It depends on how the stat system call behaves. The EOVERFLOW case is triggered when certain fields in the legacy struct stat cannot represent values. For example, an inode number that doesn't fit in a 16-bit value triggers EOVERFLOW for the legacy stat system call: https://elixir.bootlin.com/linux/v5.4.39/source/fs/stat.c#L226 And 16-bit inode numbers seem ridiculously small these days...

There are other paths that trigger EOVERFLOW for stat, but the outcome is the same.

@flokli
Copy link
Contributor

flokli commented May 9, 2020

Urgh, okay. Thanks for digging down to this!

@flokli flokli merged commit 5f7c449 into NixOS:master May 9, 2020
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

2 participants