Giter Club home page Giter Club logo

Comments (12)

rogpeppe avatar rogpeppe commented on May 10, 2024 7

FWIW I tried to use bazel (installed with the instructions here) and it fails with this error:

% bazel build runsc
Couldn't find java at '/usr/lib/jvm/java-6-sun/bin/java'.

I think it would be great if at all possible that gvisor was buildable with the standard go tool.

At the least, it would be nice if source files could be grouped in the usual Go way (one command or package per directory). Example: it looks like there are two commands in the go_generics directory:

% go install
# gvisor.googlesource.com/gvisor/tools/go_generics
./merge.go:32:2: output redeclared in this block
	previous declaration at ./generics.go:106:2
./merge.go:40:6: main redeclared in this block
	previous declaration at ./generics.go:153:6
./merge.go:41:15: main.func1 redeclared in this block
	previous declaration at ./generics.go:154:15

from gvisor.

rogpeppe avatar rogpeppe commented on May 10, 2024 2

Re: java failure, it seems like your java installation might be broken. (Maybe an environment or alternatives issue?) I agree that the grouping should probably be fixed.

FWIW I'm pretty sure I have a working java installation (I can run the "java" command fine), but no binary at /usr/lib/jvm/java-6-sun/bin/java (this is the listing of my /usr/lib/jvm directory).

It would be nice if I didn't need to debug java installation issues to try to build a Go tool.

from gvisor.

amscanne avatar amscanne commented on May 10, 2024

Thanks for the reports.

Re: java failure, it seems like your java installation might be broken. (Maybe an environment or alternatives issue?) I agree that the grouping should probably be fixed.

I'm afraid I'm not familiar with the OpenSUSE build environment. Is this build.opensuse.org? I'm looking into this now. I want to understand the issue fully before any drastic considerations.

from gvisor.

vrothberg avatar vrothberg commented on May 10, 2024

I'm afraid I'm not familiar with the OpenSUSE build environment. Is this build.opensuse.org? I'm looking into this now. I want to understand the issue fully before any drastic considerations.

@amscanne That's correct. The core problem with bazel is that it fetches dependencies at build-time. I tried playing around with pre-fetching them using a cache and re-using that cache in the RPM build, but it doesn't seem to work as bazel will still miss some dependencies.

What would we optimal is to have all dependencies in ./vendor directory and to specify which libraries are additionally required at build-time and run-time. I was checking what other distros are doing with bazel and most have no packages, I assume because of the mentioned issue.

from gvisor.

hugelgupf avatar hugelgupf commented on May 10, 2024

It would be nice if I didn't need to debug java installation issues to try to build a Go tool.

You're right, and the Go parts are definitely possible to build with vendoring. But keep in mind we also have the VDSO in C++ - which has to be built and included in the Go binary: https://github.com/google/gvisor/blob/master/vdso/BUILD

from gvisor.

iangudger avatar iangudger commented on May 10, 2024

There is also all of the generated Go code. The Go toolchain doesn't handle that very well. I believe that is part of the reason that Kubernetes is transitioning to Bazel.

from gvisor.

bluecmd avatar bluecmd commented on May 10, 2024

@vrothberg @rogpeppe Have you raised these concerns with the Bazel team? It seems to me like bugs/valid feature requests, and fixing it there would help everyone that is using Bazel.

from gvisor.

vrothberg avatar vrothberg commented on May 10, 2024

@vrothberg @rogpeppe Have you raised these concerns with the Bazel team? It seems to me like bugs/valid feature requests, and fixing it there would help everyone that is using Bazel.

@bluecmd, not yet. I first wanted to raise the issue here, which is likely to be a blocker for a wider adoption of gvisor on many Linux distributions. Some of Bazel's options just left the experimental stage with v0.13.0, so I assume that support for it is still at an early stage.

from gvisor.

davidstanke avatar davidstanke commented on May 10, 2024

Hey folks! Bazel team here. Thanks for the feedback -- we'd love to understand your needs better and see how we might be able to help. I encourage you to raise issues in github.com/bazelbuild/bazel (or .../rules_go if that's appropriate), and I'd also be happy to hop on a call some time to talk through stuff. Just contact me at davidstanke [at] google [dot] com if you'd like to set up a chat.

from gvisor.

vrothberg avatar vrothberg commented on May 10, 2024

Hi @davidstanke, thanks for checking! I opened an issue for Bazel (see bazelbuild/bazel#5175).

[...] and I'd also be happy to hop on a call some time to talk through stuff. Just contact me at davidstanke [at] google [dot] com if you'd like to set up a chat.

Thanks! Let's see how the discussion kicks-off in the Bazel issue. In case we cannot resolve the issue, setting up a call sounds great, thanks.

from gvisor.

fvoznika avatar fvoznika commented on May 10, 2024

The issue with pre-fetching dependencies is being resolved in bazelbuild/bazel#5175.

Every build system has its pros and cons. I know that bazel is not widely adopted, but it fits pretty well with our project, considering we use it with the internal version of bazel.

from gvisor.

vrothberg avatar vrothberg commented on May 10, 2024

Thanks for the info, @fvoznika!

from gvisor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.