Skip to content

gvisor: Depends on Go 1.14 #123601

Closed
Closed

Description

@uhthomas
Checklist
Project name

nix search name: nixos.gvisor (gvisor)

current version: 1.14
desired version: 1.16

Notify maintainers

maintainers: @andrew-d

Note for maintainers

Please tag this issue in your PR.

Additional

$ nix-shell --run "colmena build -f nix/hive.nix"
[INFO ] Enumerating nodes...
[INFO ] Selected all 5 nodes.
     (...) ❌ 0s Evalation failed: Nix exited with error code: 1
[ERROR] Evaluation of 5 nodes failed. Logs:
[ERROR] error: Package ‘go-1.14.15’ in /nix/store/q5cl71pgl7ia32llcr79qmwh4dhpgg8g-nixpkgs-src/pkgs/development/compilers/go/1.14.nix:264 is marked as insecure, refusing to evaluate.
[ERROR] 
[ERROR] 
[ERROR] Known issues:
[ERROR]  - Support for Go 1.14 ended with the release of Go 1.16: https://golang.org/doc/devel/release.html#policy
[ERROR] 
[ERROR] You can install it anyway by allowing this package, using the
[ERROR] following methods:
[ERROR] 
[ERROR] a) To temporarily allow all insecure packages, you can use an environment
[ERROR]    variable for a single invocation of the nix tools:
[ERROR] 
[ERROR]      $ export NIXPKGS_ALLOW_INSECURE=1
[ERROR] 
[ERROR] b) for `nixos-rebuild` you can add ‘go-1.14.15’ to
[ERROR]    `nixpkgs.config.permittedInsecurePackages` in the configuration.nix,
[ERROR]    like so:
[ERROR] 
[ERROR]      {
[ERROR]        nixpkgs.config.permittedInsecurePackages = [
[ERROR]          "go-1.14.15"
[ERROR]        ];
[ERROR]      }
[ERROR] 
[ERROR] c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
[ERROR]    ‘go-1.14.15’ to `permittedInsecurePackages` in
[ERROR]    ~/.config/nixpkgs/config.nix, like so:
[ERROR] 
[ERROR]      {
[ERROR]        permittedInsecurePackages = [
[ERROR]          "go-1.14.15"
[ERROR]        ];
[ERROR]      }
[ERROR] 
[ERROR] 
[ERROR] (use '--show-trace' to show detailed location information)
[ERROR] 

Activity

  1. added
    9.needs: package (update)
    on May 19, 2021
  2. added
    6.topic: golang
    on May 19, 2021
  3. uhthomas commented on May 19, 2021

    @uhthomas
    Author

    So, this issue is a little more nuanced than I initially thought.

    Go 1.14 just doesn't build for me at all.

    --- FAIL: TestChown (0.00 s)
      os_unix_test.go:58: gid: 100
      os_unix_test.go:70: groups: [ 65534 65534 65534 65534 65534 65534 65534 65534 65534 65534 65534 100 ]
      os_unix_test.go:73: chown /tmp/_Go_TestChown368184601 - 1 65534: chown /tmp/_Go_TestChown368184601: invalid argument
    --- FAIL: TestFileChown (0.00s)
      os_unix_test.go:101: gid: 100
      os_unix_test.go:113: groups:  [65534 65534 65534 65534 65534 65534 65534 65534 65534 65534 65534 100]
      os_unix_test.go:116: fchown /tmp/_Go_TestFileChown977451428 -1 65534: chown /tmp/_Go_TestFileChown977451428: invalid argument
    --- FAIL: TestLchown (0.00s)
      os_unix_test.go:153: gid: 100
      os_unix_test.go:168: groups:  [65534 65534 65534 65534 65534 65534 65534 65534 65534 65534 65534 100]
      os_unix_test.go:171: lchown /tmp/_Go_TestLchown8193635072 -1 65534: lchown /tmp/_Go_TestLchown8193635072: invalid argument
    FAIL
    FAIL    os      1.112s
    

    Go 1.15 and 1.16 also don't build but for different reasons.

    ERROR: /build/source/pkg/tcpip/link/rawfile/BUILD:5:11: GoCompilePkg pkg/tcpip/link/rawfile/linux_amd64_pure_stripped/rawfile%/gvisor.dev/gvisor/pkg/tcpip/link/rawfile.a failed (Exit 1): builder failed: error executing command bazel-out/host/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src pkg/tcpip/link/rawfile/blockingpoll_noyield_unsafe.go -src ... (remaining 33 argument(s) skipped)
    
    compilepkg: error running subcommand: exit status 2
    /build/output/sandbox/linux-sandbox/619/execroot/__main__/pkg/tcpip/link/rawfile/rawfile_unsafe.go:137:10: undefined: BlockingPoll
    /build/output/sandbox/linux-sandbox/619/execroot/__main__/pkg/tcpip/link/rawfile/rawfile_unsafe.go:159:10: undefined: BlockingPoll
    /build/output/sandbox/linux-sandbox/619/execroot/__main__/pkg/tcpip/link/rawfile/rawfile_unsafe.go:189:14: undefined: BlockingPoll
    
  4. uhthomas commented on May 19, 2021

    @uhthomas
    Author

    Further, I tried updating gvisor and it just doesn't work at all. I think this package needs some work.

    {
      virtualisation.cri-o = {
        enable = true;
        extraPackages = with pkgs; [
          ((gvisor.override { go = go_1_16; }).overrideAttrs (oldAttrs: {
            src = fetchFromGitHub {
              owner = "google";
              repo = "gvisor";
              rev = "release-20210510.0";
              sha256 = "0cqm0mqzd377mln6jqf99w5gncbk889qyl6yv6brbmrm7hydalz4";
            };
          }))
        ];
        runtime = "crun";
      };
    }

    Build fails with

    ERROR: no such package '@coral_crosstool//': java.io.IOException: Error downloading [https://github.com/google-coral/crosstool/archive/142e930ac6bf1295ff3ba7ba2b5b6324dfb42839.tar.gz] to /build/output/external/coral_crosstool/temp9208542546138715886/142e930ac6bf1295ff3ba7ba2b5b6324dfb42839.tar.gz: Unknown host: github.com
    
  5. uhthomas commented on May 20, 2021

    @uhthomas
    Author

    Actually, I'm going to make a new issue for gvisor not building even with Go 1.14.

  6. andrew-d commented on May 21, 2021

    @andrew-d
    Contributor

    So, I don't have the time right now to fix the build, but... gvisor now publishes a "go" branch which doesn't use Bazel and simply has everything pre-generated and buildable with the Go tooling:
    https://github.com/google/gvisor/tree/go

    If someone wanted to take a pass at converting the derivation to use buildGoModule / buildGoPackage, I'd happily review / provide feedback on that PR!

  7. uhthomas commented on May 21, 2021

    @uhthomas
    Author

    @andrew-d That's good to know! I can take a look tonight.

  8. uhthomas commented on May 21, 2021

    @uhthomas
    Author
  9. andrew-d commented on Jun 7, 2021

    @andrew-d
    Contributor

    @lukegb - Thank you!

  10. lukegb commented on Jun 8, 2021

    @lukegb
    Contributor

    It might still be worthwhile switching to the Go native build system though, for ease of updating :)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    6.topic: golang9.needs: package (update)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions