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

Build fails due to /usr/bin/ccache being detected as Clang by build/build.py #20841

Open
andportnoy opened this issue Apr 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@andportnoy
Copy link
Contributor

Description

A workaround is to uninstall ccache.

JAX commit: cea36a0
Invocation:

python build/build.py \
       --use_clang \
       --enable_cuda \
       --cuda_compute_capabilities=8.9 \
       --bazel_options=--override_repository=xla=/home/aportnoy/Projects/xla \
       --bazel_options=--disk_cache=/home/aportnoy/bazel-cache \
       --bazel_options=--linkopt=-fuse-ld=lld \
       --bazel_options=--strip=never \
       --bazel_options=--cxxopt=-fno-omit-frame-pointer \
       --bazel_options=--cxxopt=-g \
       --cuda_path /usr/local/cuda \
       --cudnn_path /usr \
       --editable

Output:

Bazel binary path: /home/aportnoy/.local/bin/bazel
Bazel version: 6.1.0
Python binary path: /home/aportnoy/Projects/jax/venv/bin/python
Python version: 3.12
NumPy version: 1.26.4
Use clang: yes
clang path: /usr/bin/ccache
Traceback (most recent call last):
  File "/home/aportnoy/Projects/jax/build/build.py", line 713, in <module>
    main()
  File "/home/aportnoy/Projects/jax/build/build.py", line 610, in main
    clang_major_version = get_clang_major_version(clang_path)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aportnoy/Projects/jax/build/build.py", line 246, in get_clang_major_version
    clang_version_proc = subprocess.run(
                         ^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/ccache', '-E', '-P', '-']' returned non-zero exit status 1.

System info (python version, jaxlib version, accelerator, etc.)

(jax) box:~/Projects/jax $ which clang
/usr/lib64/ccache/clang
(jax) box:~/Projects/jax $ ls -l $(which clang)
lrwxrwxrwx. 1 root root 16 Mar  9 11:13 /usr/lib64/ccache/clang -> ../../bin/ccache
(jax) box:~/Projects/jax $ python -c "import pathlib; print(pathlib.Path('$(which clang)').resolve())"
/usr/bin/ccache
@andportnoy andportnoy added the bug Something isn't working label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant