-
Notifications
You must be signed in to change notification settings - Fork 757
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
[bazel] fix lld
system requirement
#12448
Comments
Deferring post M2 as there is a workaround. |
supplements lowRISC#12448 Signed-off-by: Timothy Chen <[email protected]>
supplements lowRISC#12448 Signed-off-by: Timothy Chen <[email protected]>
supplements #12448 Signed-off-by: Timothy Chen <[email protected]>
In my case on CentOS, this required symbolically linking |
@dbeitel-opentitan Are you still suffering from this issue in your build environment? Could you give some details about your environment (OS, version, packages installed) so that I might try to duplicate the problem? |
Mmm, I don't remember this issue. I don't think I ran into this problem (At least I don't remember it). |
Yes still facing this issue
|
On some systems, the CC toolchain discovered by bazel uses a different path for the linker than where the linker (that is specified by the `-fuse-ld=` flag) actually lives on the system. The issue stems from rules_rust deciding to pass `-fuse-ld=lld` a link arg, rather than just using what was detected by the CC toolchain. This results in the linker not being found, as reported by lowRISC/opentitan#12448 This is a workaround that enables telling rules_rust where other linker directories might be on your system. It is used by passing `--@rules_rust//:extra_rustc_toolchain_dirs=/path/to/somewhere/else` to `bazel ...` invocations. Signed-off-by: Tim Trippel <[email protected]>
Status Update: I have identified the source (but not root cause) of the issue and drafted document to describe to one might observe the issue: https://docs.google.com/document/d/1GWEHfkZZI_Fz8JMytCY7cPozi5j9xt1SiWmq-Zf0Mak/edit?usp=sharing The document also contains pointers to a potential patch to rules_rust that we could merge into the lowRISC fork. Still working with Todd to resolve this. |
On some systems, the CC toolchain discovered by bazel uses a different path for the linker than where the linker (that is specified by the `-fuse-ld=` flag) actually lives on the system. The issue stems from rules_rust deciding to pass `-fuse-ld=lld` a link arg, rather than just using what was detected by the CC toolchain. This results in the linker not being found, as reported by lowRISC/opentitan#12448 This is a workaround that enables telling rules_rust where other linker directories might be on your system. It is used by passing `--@rules_rust//:extra_rustc_toolchain_dirs=/path/to/somewhere/else` to `bazel ...` invocations. Signed-off-by: Tim Trippel <[email protected]>
lowRISC/rules_rust#4 should patch our fork of rules_rust to enable a workaround |
On some systems, the CC toolchain discovered by bazel uses a different path for the linker than where the linker (that is specified by the `-fuse-ld=` flag) actually lives on the system. The issue stems from rules_rust deciding to pass `-fuse-ld=lld` a link arg, rather than just using what was detected by the CC toolchain. This results in the linker not being found, as reported by lowRISC/opentitan#12448 This is a workaround that enables telling rules_rust where other linker directories might be on your system. It is used by passing `--@rules_rust//:extra_rustc_toolchain_dirs=/path/to/somewhere/else` to `bazel ...` invocations. Signed-off-by: Tim Trippel <[email protected]>
This updates rules_rust to make use of a new patch that was added in the lowRISC fork of rules_rust that enables a workaround for lowRISC#12448. The workaround provides a command line build flag `--@rules_rust//:extra_rustc_toolchain_dirs=/path/to/somewhere/else` that you can add to your `.bazelrc` file to specify a different location on your system where host toolchain tools may be found. Signed-off-by: Tim Trippel <[email protected]>
This updates rules_rust to make use of a new patch that was added in the lowRISC fork of rules_rust that enables a workaround for lowRISC#12448. The workaround provides a command line build flag `--@rules_rust//:extra_rustc_toolchain_dirs=/path/to/somewhere/else` that you can add to your `.bazelrc` file to specify a different location on your system where host toolchain tools may be found. Signed-off-by: Tim Trippel <[email protected]>
This updates rules_rust to make use of a new patch that was added in the lowRISC fork of rules_rust that enables a workaround for #12448. The workaround provides a command line build flag `--@rules_rust//:extra_rustc_toolchain_dirs=/path/to/somewhere/else` that you can add to your `.bazelrc` file to specify a different location on your system where host toolchain tools may be found. Signed-off-by: Tim Trippel <[email protected]>
This updates rules_rust to make use of a new patch that was added in the lowRISC fork of rules_rust that enables a workaround for lowRISC#12448. The workaround provides a command line build flag `--@rules_rust//:extra_rustc_toolchain_dirs=/path/to/somewhere/else` that you can add to your `.bazelrc` file to specify a different location on your system where host toolchain tools may be found. Signed-off-by: Tim Trippel <[email protected]>
On some systems, the CC toolchain discovered by bazel uses a different path for the linker than where the linker (that is specified by the `-fuse-ld=` flag) actually lives on the system. The issue stems from rules_rust deciding to pass `-fuse-ld=lld` a link arg, rather than just using what was detected by the CC toolchain. This results in the linker not being found, as reported by lowRISC/opentitan#12448 This is a workaround that enables telling rules_rust where other linker directories might be on your system. It is used by passing `--@rules_rust//:extra_rustc_toolchain_dirs=/path/to/somewhere/else` to `bazel ...` invocations. Signed-off-by: Tim Trippel <[email protected]>
On some systems, the CC toolchain discovered by bazel uses a different path for the linker than where the linker (that is specified by the `-fuse-ld=` flag) actually lives on the system. The issue stems from rules_rust deciding to pass `-fuse-ld=lld` a link arg, rather than just using what was detected by the CC toolchain. This results in the linker not being found, as reported by lowRISC/opentitan#12448 This is a workaround that enables telling rules_rust where other linker directories might be on your system. It is used by passing `--@rules_rust//:extra_rustc_toolchain_dirs=/path/to/somewhere/else` to `bazel ...` invocations. Signed-off-by: Tim Trippel <[email protected]>
Since #12263, there is a new system requirement (the LLVM linker
lld
) needed to prevent the build from erroring out with:Temporary solution:
The temporary solution is to simply:
lld
with:sudo apt install lld
lld
to the relevant*-requirements.txt
filesLong-term solution:
Figure out why bazel is attempting to use
gcc
withlld
to build some rust crates.Hints:
The text was updated successfully, but these errors were encountered: