Cannot make build v2.2.0 on my mac_book_pro.Error info says cannot find clang. I already installed clang

huangapple go评论45阅读模式
英文:

Cannot make build v2.2.0 on my mac_book_pro.Error info says cannot find clang. I already installed clang

问题

以下是命令 make build 的输出信息的中文翻译:

运行命令 `make build`
$ make build
cargo build --workspace --bins
   正在编译 protos v2.1.0 (/Users/song/code/lib/cnosdb/common/protos)
   正在编译 trace v2.1.0 (/Users/song/code/lib/cnosdb/common/trace)
   正在编译 limiter_bucket v0.1.0 (/Users/song/code/lib/cnosdb/common/limiter_bucket)
   正在编译 memory_pool v2.1.0 (/Users/song/code/lib/cnosdb/common/memory_pool)
   正在编译 test v2.1.0 (/Users/song/code/lib/cnosdb/query_server/test)
   正在编译 models v2.1.0 (/Users/song/code/lib/cnosdb/common/models)
   正在编译 metrics v2.1.0 (/Users/song/code/lib/cnosdb/common/metrics)
   正在编译 line_protocol v2.1.0 (/Users/song/code/lib/cnosdb/common/line_protocol)
   正在编译 meta v2.1.0 (/Users/song/code/lib/cnosdb/meta)
   正在编译 http_protocol v2.1.0 (/Users/song/code/lib/cnosdb/common/http_protocol)
   正在编译 client v2.1.0 (/Users/song/code/lib/cnosdb/client)
   正在编译 tskv v2.1.0 (/Users/song/code/lib/cnosdb/tskv)
错误: 链接 `cc` 失败: 退出状态: 1
  |
  = 注: "cc" "-arch" "x86_64" "-m64" "/var/folders/1j/0q49fbc11clf_b6j0fprg8_00000gp/T/rustcjVVVk3/symbols.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.10jjfa2iitha5hhu.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.12laa2jqu80r3ldr.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.17h811af7lnqyian.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.1enbk7xag2c1y3kc.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.24hzzy051ll42k6z.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.2capk740rv4d9bs7.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.2ejlf3dwbu7zw94t.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.2ivbfy2o0a3ox2c2.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.2qzqntk18gjyy0ls.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.376arya8lchw2kte.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.4eo93emv8pa86wug.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.4sxdhsnz8d8rd2gx.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.4vu6n22ugmfiofgy.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.54186xcgmtocs3gd.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.5a32wnmaz2oz2cfb.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.r637wj2phb18054.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.1pa17jh6g9usyijo.rcgu.o" "-L" "/Users/song/code/lib/cnosdb/target/debug/deps" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/zstd-sys-d8f2256af84249be/out" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/bzip2-sys-d74689d0d25b6016/out/lib" "-L" "/opt/local/lib" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/ring-2faa79b0a61df189/out" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/lz4-sys-cb6f12277ad150b7/out" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/blake3-681968b55e042b75/out" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/blake3-681968b55e042b75/out" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/openssl-sys-21238c3fc688495c/out/openssl-build/install/lib" "-L" "/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/curl-sys-b07df1bcdece5366/out/build" ......
"/Users/song/.rustup/toolchains/1.66-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-5499e73158598aca.rlib" "/Users/song/.rustup/toolchains/1.66-x86_64

<details>
<summary>英文:</summary>

run command `make build`

$ make build
cargo build --workspace --bins
Compiling protos v2.1.0 (/Users/song/code/lib/cnosdb/common/protos)
Compiling trace v2.1.0 (/Users/song/code/lib/cnosdb/common/trace)
Compiling limiter_bucket v0.1.0 (/Users/song/code/lib/cnosdb/common/limiter_bucket)
Compiling memory_pool v2.1.0 (/Users/song/code/lib/cnosdb/common/memory_pool)
Compiling test v2.1.0 (/Users/song/code/lib/cnosdb/query_server/test)
Compiling models v2.1.0 (/Users/song/code/lib/cnosdb/common/models)
Compiling metrics v2.1.0 (/Users/song/code/lib/cnosdb/common/metrics)
Compiling line_protocol v2.1.0 (/Users/song/code/lib/cnosdb/common/line_protocol)
Compiling meta v2.1.0 (/Users/song/code/lib/cnosdb/meta)
Compiling http_protocol v2.1.0 (/Users/song/code/lib/cnosdb/common/http_protocol)
Compiling client v2.1.0 (/Users/song/code/lib/cnosdb/client)
Compiling tskv v2.1.0 (/Users/song/code/lib/cnosdb/tskv)
error: linking with cc failed: exit status: 1
|
= note: "cc" "-arch" "x86_64" "-m64" "/var/folders/1j/0q49fbc11clf_b6j0fprg8_00000gp/T/rustcjVVVk3/symbols.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.10jjfa2iitha5hhu.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.12laa2jqu80r3ldr.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.17h811af7lnqyian.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.1enbk7xag2c1y3kc.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.24hzzy051ll42k6z.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.2capk740rv4d9bs7.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.2ejlf3dwbu7zw94t.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.2ivbfy2o0a3ox2c2.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.2qzqntk18gjyy0ls.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.376arya8lchw2kte.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.4eo93emv8pa86wug.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.4sxdhsnz8d8rd2gx.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.4vu6n22ugmfiofgy.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.54186xcgmtocs3gd.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.5a32wnmaz2oz2cfb.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.r637wj2phb18054.rcgu.o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d.1pa17jh6g9usyijo.rcgu.o" "-L" "/Users/song/code/lib/cnosdb/target/debug/deps" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/zstd-sys-d8f2256af84249be/out" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/bzip2-sys-d74689d0d25b6016/out/lib" "-L" "/opt/local/lib" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/ring-2faa79b0a61df189/out" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/lz4-sys-cb6f12277ad150b7/out" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/blake3-681968b55e042b75/out" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/blake3-681968b55e042b75/out" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/openssl-sys-21238c3fc688495c/out/openssl-build/install/lib" "-L" "/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin" "-L" "/Users/song/code/lib/cnosdb/target/debug/build/curl-sys-b07df1bcdece5366/out/build" "-L"
......
"/Users/song/.rustup/toolchains/1.66-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-5499e73158598aca.rlib" "/Users/song/.rustup/toolchains/1.66-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-b3cfcaf4922fc643.rlib" "-lclang_rt.osx" "-framework" "Security" "-framework" "CoreFoundation" "-framework" "SystemConfiguration" "-lz" "-llzma" "-framework" "Security" "-framework" "Security" "-framework" "CoreFoundation" "-liconv" "-lSystem" "-lc" "-lm" "-L" "/Users/song/.rustup/toolchains/1.66-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/Users/song/code/lib/cnosdb/target/debug/deps/cnosdb_meta-333621a54a29f97d" "-Wl,-dead_strip" "-nodefaultlibs"
= note: ld: warning: directory not found for option '-L/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin'
ld: library not found for -lclang_rt.osx
clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: could not compile meta due to previous error
warning: build failed, waiting for other jobs to finish...
make: *** [build] Error 101



Check make file is ok.

</details>


# 答案1
**得分**: 1

如果目录`/Library/Developer/CommandLineTools/usr/lib/clang/`中有内容,但不是`13.1.6`,重新启动您的计算机可以解决这个问题。

<details>
<summary>英文:</summary>

If directory `/Library/Developer/CommandLineTools/usr/lib/clang/` has something in it, but not `13.1.6`, a restart of your computer can solve this problem.

</details>



huangapple
  • 本文由 发表于 2023年4月17日 15:37:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76032711.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定