carbon-lang
carbon-lang copied to clipboard
Invalid name in argument '
I tried to build Carbon from this command.
bazel run //explorer -- ./explorer/testdata/print/format_only.carbon
Then I got his error message.
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 4163dac0-cd36-4c70-bc8f-2f19371ab5ad
WARNING: Download from https://mirror.bazel.build/ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://mirror.bazel.build/github.com/jmillikin/rules_m4/releases/download/v0.1/m4-gnulib-788db09a9f88abbef73c97e8d7291c40455336d8.tar.xz failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://mirror.bazel.build/ftp.gnu.org/gnu/bison/bison-3.3.2.tar.xz failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://mirror.bazel.build/github.com/jmillikin/rules_bison/releases/download/v0.1/bison-gnulib-788db09a9f88abbef73c97e8d7291c40455336d8.tar.xz failed: class java.io.FileNotFoundException GET returned 404 Not Found
INFO: Analyzed target //explorer:explorer (67 packages loaded, 1560 targets configured).
INFO: Found 1 target...
ERROR: /home/<username>/.cache/bazel/_bazel_<username>/08167dd903d854433b4fdb420e57b969/external/m4_v1.4.18/bin/BUILD.bazel:2:10: Linking external/m4_v1.4.18/bin/m4 [for host] failed: (Exit 1): clang++ failed: error executing command /usr/lib/llvm-14/bin/clang++ @bazel-out/host/bin/external/m4_v1.4.18/bin/m4-2.params
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
clang++: error: invalid linker name in argument '-fuse-ld=lld'
Target //explorer:explorer failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 523.493s, Critical Path: 3.84s
INFO: 248 processes: 152 internal, 96 linux-sandbox.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
This was run on Ubuntu 22.04, x64.
I have a similar error.
You may need to install lld. Doing so fixed this problem for me.
In particular, we specifically recommend using the Homebrew install of llvm which includes Clang, LLD, and libc++ in a configuration that should work.
@Tembocs This issue has been resolved by pull the latest commit. The reason for this is yet not known, I'll check details soon. ( Unfortunately, I lost a commit that I checked 6 days ago. )
Cloud you try it?
@tkadur @chandlerc Thank you for comments!
I'm closing this issue since it's a bit old and has unclear resolution, but looks mostly addressed. For future reference, I'll note we added some build troubleshooting tips.