Hacker News new | past | comments | ask | show | jobs | submit login

The problem with Bazel is that a sandboxed build environment is useless unless you also have a hermetic runtime environment, and Bazel does nothing to solve this problem. While you may be able to consistently build, your runfiles tree can easily be un-runnable on any system except the one that built it.

When I was heavily using Bazel ~3 years ago we had made substantial changes to the Bazel source to try to support this, but ultimately couldn't get it across the finish line without making changes to Linux's dynamic loader. After talking to a few folks familiar with Blaze, it seems that's exactly what they've done inside Google to solve the problem.

Perhaps the situation has improved in the last 3 years, but my general experience with Bazel is that it made extremely lofty claims and delivered on very few of them.




> your runfiles tree

I don't remember using runfiles much outside of tests in Bazel, even at Google. My guess would be that runfiles are packaged up into via MPM [1], which in open source world I would guess a container image is the closest equivalent? Then you get hermetic runtime environment, especially because k8s/containers seems to be the default deployment platform these days. I think the bazel OCI rules [2] should package runfiles too (I haven't checked)

[1]: https://www.usenix.org/conference/lisa14/conference-program/...

[2]: https://github.com/bazel-contrib/rules_oci


Hi, Could you please elaborate on your original problem?

The binaries your Bazel system built could not be run unless the runtime environment matched the build environment?


I'm curious too. I'm guessing it's something to do with sonames & rpaths which often need fixing up during installation (CMake does this for example). I haven't ever used Bazel for distributing Linux binaries so maybe it just doesn't have that built in.

(I would go with statically linked binaries anyway tbh.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: