Coder Social home page Coder Social logo

Comments (6)

siddharthab avatar siddharthab commented on July 17, 2024

Thanks for the report. I will try to get to it over this weekend.

from toolchains_llvm.

luxe avatar luxe commented on July 17, 2024

more specifically, something like this fails:

/home/laptop/.cache/bazel/_bazel_laptop/install/a4696acfbd71b79376c811717f94d1ac/_embedded_binaries/linux-sandbox -t 15 -w /home/laptop/.cache/bazel/_bazel_laptop/9e74040f84b92184f3149fef1e79ff7d/sandbox/linux-sandbox/123/execroot/__main__ -w /tmp -w /dev/shm -D -- external/llvm_toolchain/bin/llvm-ar @bazel-out/host/bin/external/boost/libchrono.a-2.params

The external path(external/llvm_toolchain/bin/llvm-ar) is no longer there. Somehow no longer copied into the sandbox.

from toolchains_llvm.

luxe avatar luxe commented on July 17, 2024

I think we need to add an ar action in cc_toolchain_config.bzl
https://docs.bazel.build/versions/master/cc-toolchain-config-reference.html#ar-actions

from toolchains_llvm.

luxe avatar luxe commented on July 17, 2024

It seems the execroot occasionally doesn't include the external/ folder where the llvm tools are (clang and ar), but I've seen it show up for things like clang++

temporary hack: --strategy=CppCompile=standalone --strategy=CppLink=standalone.
It leaves the sandbox which is undesirable.

from toolchains_llvm.

luxe avatar luxe commented on July 17, 2024

This ticket explains the issue well.
bazelbuild/bazel#8531

I've solved the problem with:
--incompatible_use_specific_tool_files=false

To fix this, we could probably change native.cc_toolchain to use ar_files
https://github.com/grailbio/bazel-toolchain/blob/f2d0aeca399e70297414341d228c7be460b4d6a0/toolchain/internal/configure.bzl#L126

But at the same time, the docs say ar_files is currently not used.
https://docs.bazel.build/versions/master/be/c-cpp.html#cc_library

from toolchains_llvm.

siddharthab avatar siddharthab commented on July 17, 2024

Thank you for the investigation. Your help made this an easy task for me.

from toolchains_llvm.

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.