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
Merged

Conversation

@blitz
Copy link
Contributor

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

@blitz blitz requested review from flokli, tfc, svanderburg and B4dM4n May 8, 2020
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
16 checks passed
16 checks passed
open-watcom-bin, open-watcom-bin.passthru.tests on aarch64-linux No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3dbb32f"; rev="3dbb32f6265bfacea10059500b9ae2ad1db80058"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3dbb32f"; rev="3dbb32f6265bfacea10059500b9ae2ad1db80058"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3dbb32f"; rev="3dbb32f6265bfacea10059500b9ae2ad1db80058"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3dbb32f"; rev="3dbb32f6265bfacea10059500b9ae2ad1db80058"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3dbb32f"; rev="3dbb32f6265bfacea10059500b9ae2ad1db80058"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3dbb32f"; rev="3dbb32f6265bfacea10059500b9ae2ad1db80058"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3dbb32f"; rev="3dbb32f6265bfacea10059500b9ae2ad1db80058"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
open-watcom-bin, open-watcom-bin.passthru.tests on x86_64-linux Success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.