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

clang: error: linker command failed with exit code 1 #14321

Open
huhuiqi7 opened this issue Jul 1, 2024 · 1 comment
Open

clang: error: linker command failed with exit code 1 #14321

huhuiqi7 opened this issue Jul 1, 2024 · 1 comment

Comments

@huhuiqi7
Copy link

huhuiqi7 commented Jul 1, 2024

environment:
cuda=12.2, nccl=2.19.3-1+cuda12.2, clang=17.0.2, python=3.9.19, Ubuntu=20.04

compile command:
./configure.py --backend=CUDA --clang_path=/usr/bin/clang-17 --nccl --cuda_compiler=CLANG
HERMETIC_PYTHON_VERSION=3.9 bazel build --repo_env=HERMETIC_PYTHON_VERSION --test_output=all --spawn_strategy=sandboxed //xla/... --python_path=/root/miniconda3/envs/py39/bin/python --sandbox_debug

error compile log:

/usr/bin/ld: bazel-out/k8-opt/bin/external/tsl/tsl/profiler/backends/cpu/libtraceme_recorder_impl.lo(traceme_recorder.o): in function `void __gnu_cxx::new_allocator<tsl::profiler::TraceMeRecorder::ThreadLocalRecorder>::construct<tsl::profiler::TraceMeRecorder::ThreadLocalRecorder>(tsl::profiler::TraceMeRecorder::ThreadLocalRecorder*)':
traceme_recorder.cc:(.text._ZN9__gnu_cxx13new_allocatorIN3tsl8profiler15TraceMeRecorder19ThreadLocalRecorderEE9constructIS4_JEEEvPT_DpOT0_[_ZN9__gnu_cxx13new_allocatorIN3tsl8profiler15TraceMeRecorder19ThreadLocalRecorderEE9constructIS4_JEEEvPT_DpOT0_]+0x6a): undefined reference to `tsl::Env::Default()'
/usr/bin/ld: bazel-out/k8-opt/bin/xla/stream_executor/cuda/libcuda_driver_cuda_only.a(cuda_driver.o): in function `stream_executor::gpu::GpuDriver::GraphDebugDotPrint[abi:cxx11](CUgraph_st*, char const*, bool)':
cuda_driver.cc:(.text._ZN15stream_executor3gpu9GpuDriver18GraphDebugDotPrintB5cxx11EP10CUgraph_stPKcb+0x8b): undefined reference to `tsl::Env::Default()'
/usr/bin/ld: bazel-out/k8-opt/bin/xla/stream_executor/cuda/libcuda_driver_cuda_only.a(cuda_driver.o): in function `stream_executor::gpu::GpuDriver::LoadPtx(stream_executor::gpu::GpuContext*, char const*, CUmod_st**)':
cuda_driver.cc:(.text._ZN15stream_executor3gpu9GpuDriver7LoadPtxEPNS0_10GpuContextEPKcPP8CUmod_st+0x122): undefined reference to `tsl::Env::Default()'
/usr/bin/ld: bazel-out/k8-opt/bin/xla/stream_executor/gpu/libgpu_command_buffer_gpu_only.a(gpu_command_buffer.o): in function `stream_executor::gpu::GpuCommandBuffer::Trace(stream_executor::Stream*, absl::lts_20230802::AnyInvocable<absl::lts_20230802::Status ()>)':
gpu_command_buffer.cc:(.text._ZN15stream_executor3gpu16GpuCommandBuffer5TraceEPNS_6StreamEN4absl12lts_2023080212AnyInvocableIFNS5_6StatusEvEEE+0x82): undefined reference to `tsl::Env::Default()'
/usr/bin/ld: gpu_command_buffer.cc:(.text._ZN15stream_executor3gpu16GpuCommandBuffer5TraceEPNS_6StreamEN4absl12lts_2023080212AnyInvocableIFNS5_6StatusEvEEE+0x10d): undefined reference to `tsl::Env::Default()'
/usr/bin/ld: bazel-out/k8-opt/bin/xla/stream_executor/gpu/libgpu_command_buffer_gpu_only.a(gpu_command_buffer.o):gpu_command_buffer.cc:(.text._ZN15stream_executor3gpu16GpuCommandBuffer8FinalizeEv+0x273): more undefined references to `tsl::Env::Default()' follow
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@huhuiqi7
Copy link
Author

huhuiqi7 commented Jul 1, 2024

The above error may be caused by the following error:
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/data/huhuiqi/cpplib/xla-mesha/xla/third_party/tsl/tsl/platform/ml_dtypes.h).C/C++(1696) cannot open source file "ml_dtypes/include/float8.h"C/C++(1696)

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

1 participant