Skip to content
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

how to build with musl #38

Open
lasorda opened this issue Jun 10, 2024 · 2 comments
Open

how to build with musl #38

lasorda opened this issue Jun 10, 2024 · 2 comments

Comments

@lasorda
Copy link

lasorda commented Jun 10, 2024

I run bazel-lsp on centos 7, it exit with

./bazel-lsp: /usr/lib64/libc.so.6: version `GLIBC_2.33' not found (required by ./bazel-lsp)
./bazel-lsp: /usr/lib64/libc.so.6: version `GLIBC_2.27' not found (required by ./bazel-lsp)
./bazel-lsp: /usr/lib64/libc.so.6: version `GLIBC_2.34' not found (required by ./bazel-lsp)
./bazel-lsp: /usr/lib64/libc.so.6: version `GLIBC_2.32' not found (required by ./bazel-lsp)
./bazel-lsp: /usr/lib64/libc.so.6: version `GLIBC_2.29' not found (required by ./bazel-lsp)
./bazel-lsp: /usr/lib64/libc.so.6: version `GLIBC_2.28' not found (required by ./bazel-lsp)
./bazel-lsp: /usr/lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./bazel-lsp)
./bazel-lsp: /usr/lib64/libc.so.6: version `GLIBC_2.25' not found (required by ./bazel-lsp)
./bazel-lsp: /usr/lib64/libm.so.6: version `GLIBC_2.38' not found (required by ./bazel-lsp)
./bazel-lsp: /usr/lib64/libm.so.6: version `GLIBC_2.29' not found (required by ./bazel-lsp)

i build bazel-lsp from source with bazel 7.1.2, it has error

➜ bazel build //:bazel-lsp -c opt
Starting local Bazel server and connecting to it...
INFO: Analyzed target //:bazel-lsp (356 packages loaded, 17660 targets configured).
[254 / 1,015] 14 actions, 13 running
    Creating runfiles tree bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~/protoc.runfiles [for tool]; 0s local
    Creating runfiles tree bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~~crate~crates__starlark_map-0.12.0/starlark_map_bs_.runfiles [for tool]; 0s local
    Creating runfiles tree bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~~crate~crates__memoffset-0.6.5/memoffset_bs_.runfiles [for tool]; 0s local
    Creating runfiles tree bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~~crate~crates__parking_lot_core-0.9.9/parking_
ERROR: /data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~/util/process_wrapper/BUILD.bazel:31:36: Compiling Rust (without process_wrapper) bin process_wrapper (6 files) [for tool] failed: (Exit 1): process_wrapper.sh failed: error executing Rustc command (from target @@rules_rust~//util/process_wrapper:process_wrapper) bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.sh -- ... (remaining 32 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
error: linking with `/usr/local/bin/gcc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/rust_toolchain/lib/rustlib/x86_64-unknown-linux-gnu/bin" VSLANG="1033" "/usr/local/bin/gcc" "-m64" "/tmp/rustcloNTuu/symbols.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.00.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.01.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.02.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.03.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.04.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.05.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.06.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.07.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.08.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.09.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.10.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.11.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.12.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.13.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.14.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.process_wrapper.fd3c76c5d8bafb89-cgu.15.rcgu.o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper.3dni8wxag7qwi0gl.rcgu.o" "-Wl,--as-needed" "-L" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/rust_toolchain/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~~i~rules_rust_tinyjson" "-L" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/rust_toolchain/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/bazel-execroot/_main/bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~~i~rules_rust_tinyjson/libtinyjson-1980135637.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-2d08990d644ac786.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-6f2d4ec7ff80253d.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-c194d68892442324.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-9a71c52c5946f83b.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-ae9aec4ce2dabc4f.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-6a207457d27610cc.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-fb1d2514710eef16.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-e36e7ed4b08caeac.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-9e8dafdf0a1b7ecd.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-b218f37fe3c9ce2e.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-20c30954fd9b5ef4.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-6d3dfaf536d51163.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-cb4ce50789112af8.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-9897980a3b548e05.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-b7bd4d010c784af2.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-6d4515df28ba3369.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-e28568c1a21499f7.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-eedf3675950a13c2.rlib" "/data/home/zhihaopan/.cache/bazel/_bazel_zhihaopan/bddd503d9f55f2636cf1c5161c00bcf8/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-715e69127681e2e0.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/rust_toolchain/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/rules_rust~/util/process_wrapper/process_wrapper" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-debug" "-nodefaultlibs" "-fuse-ld=gold" "-B/usr/local/bin" "-Wl,-no-as-needed" "-Wl,-z,relro,-z,now" "-pass-exit-codes" "-Wl,--gc-sections" "-ldl" "-lpthread" "-lstdc++" "-lm"
  = note: collect2: fatal error: cannot find 'ld'
          compilation terminated.


error: aborting due to 1 previous error

Target //:bazel-lsp failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 11.407s, Critical Path: 1.52s
INFO: 134 processes: 73 internal, 61 linux-sandbox.
ERROR: Build did NOT complete successfully
@cameron-martin
Copy link
Owner

Do you have ld installed?

@cameron-martin
Copy link
Owner

Possibly related? bazelbuild/rules_rust#1114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants