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

CI cmake-based builds are not using ccache even if specified in build spec by 'ccache' : true #7599

Open
janvrany opened this issue Jan 7, 2025 · 0 comments

Comments

@janvrany
Copy link
Contributor

janvrany commented Jan 7, 2025

While working on RISC-V native builds, I noticed that builds that use CMake do not use ccache even if specified.

For example, RISC-V native build, ccache is true [1], but looking at RISC-V build [2] shows
that initialy cache is empty:

16:18:13  Output CCACHE stats before running and clear them
[Pipeline] sh
16:18:13  + ccache -s -z
16:18:14  Local storage:
16:18:14    Cache size (GiB): 0.0 / 5.0 ( 0.00%)
16:18:14  Statistics zeroed

CMake seems to use /usr/bin/c++ and /usr/bin/cc directly (i.e., not ccache wrappers not using ccache to launch the compiler):

16:18:16  -- Check for working CXX compiler: /usr/bin/c++ - skipped
16:18:16  -- Detecting CXX compile features
16:18:16  -- Detecting CXX compile features - done
16:18:16  -- Detecting C compiler ABI info
16:18:17  -- Detecting C compiler ABI info - done
16:18:17  -- Check for working C compiler: /usr/bin/cc - skipped

And indeed cache is still completely empty after the build:

[Pipeline] echo
17:24:57  Output CCACHE stats after running
[Pipeline] sh
17:24:57  + ccache -s
17:24:57  Local storage:
17:24:57    Cache size (GiB): 0.0 / 5.0 ( 0.00%)
[Pipeline] }

Same happens for other builds too as far as I can see: [3], [4].

Interestingly, for some builds it does work, for example linux_ppc-64_le_gcc [5]:

14:51:48  -- The CXX compiler identification is GNU 9.4.0
14:51:48  -- The C compiler identification is GNU 9.4.0
14:51:48  -- Check for working CXX compiler: /usr/lib/ccache/c++
14:51:48  -- Check for working CXX compiler: /usr/lib/ccache/c++ -- works
14:51:48  -- Detecting CXX compiler ABI info
14:51:48  -- Detecting CXX compiler ABI info - done
14:51:48  -- Detecting CXX compile features
14:51:48  -- Detecting CXX compile features - done
14:51:48  -- Check for working C compiler: /usr/lib/ccache/cc
14:51:48  -- Check for working C compiler: /usr/lib/ccache/cc -- works
14:51:48  -- Detecting C compiler ABI info
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