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

ccache not working on OS X/macOS #855

Open
koffes opened this issue Jan 19, 2025 · 6 comments
Open

ccache not working on OS X/macOS #855

koffes opened this issue Jan 19, 2025 · 6 comments

Comments

@koffes
Copy link

koffes commented Jan 19, 2025

I discovered that ccache is not working with Zephyr SDK 0.17.0 on macOS.
Let me know if I should file this ticket elsewhere.

From the log below, ccache is installed, and is found, but there are no hits:

Cacheable calls:               0 / 1258 ( 0.00%)
  Hits:                        0
    Direct:                    0
    Preprocessed:              0
  Misses:                      0
Uncacheable calls:          1258 / 1258 (100.0%)
  Bad compiler arguments:    756 / 1258 (60.10%)
  Called for linking:        256 / 1258 (20.35%)
  Called for preprocessing:  124 / 1258 ( 9.86%)
  No input file:             122 / 1258 ( 9.70%)
Successful lookups:
  Direct:                      0
  Preprocessed:                0
Local storage:
  Cache size (GiB):          0.0 /  5.0 ( 0.00%)
  Files:                       0
  Hits:                        0
  Misses:                      0
  Reads:                       0

Another colleague of mine, noticed the same thing on a different macOS setup. He claimed that this may have happened with the transition to sysbuild.

Tested on:
Sequoia 15.0.1
SDK 0.17.0
Zephyr bleeding edge today (d3a0e16)
samples/basic/blinky can be used to test

When I get more time, I will bisect and find when this broke. I will also try different SDK versions.

@kartben
Copy link

kartben commented Jan 19, 2025

@koffes can you try:

export CCACHE_IGNOREOPTIONS="-specs=* --specs=*"

I think we basically need to set this as a default somewhere
cc @nashif @tejlmand

@koffes
Copy link
Author

koffes commented Jan 20, 2025

Ah! Thank you @kartben ! That worked like a charm. Roughly 3X speedup.
As you said, this would be nice to set to default if possible. Will keep issue open.

@koffes
Copy link
Author

koffes commented Feb 4, 2025

I tried this on Windows as well, and setting the same env. var was required there.

@keith-packard
Copy link
Collaborator

Can anyone explain why this is needed? Seems like the --specs option should be the same in all compiles?

@kartben
Copy link

kartben commented Feb 5, 2025

Can anyone explain why this is needed? Seems like the --specs option should be the same in all compiles?

@keith-packard
https://github.com/zephyrproject-rtos/zephyr/blob/main/.github%2Fworkflows%2Fcodecov.yaml#L36

Does that help?
If there is a way to fix this (maybe by providing full path to the specs file? https://stackoverflow.com/a/77878905/1051634) it would be nice :)

@keith-packard
Copy link
Collaborator

For the SDK, we could provide the full path to the specs file. Annoying that ccache doesn't search the library path specified by the compiler. I just tried 'arm-none-eabi-gcc -print-file-name=picolibc.specs' and that happily provided me the full path name.

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

3 participants