On Wed, 9 Aug 2023 12:36:59 GMT, Jan Kratochvil <jkratoch...@openjdk.org> wrote:

>> https://bugs.openjdk.org/browse/JDK-8313374
>> --enable-ccache's CCACHE_BASEDIR breaks builds
>
> Jan Kratochvil has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Use true/false for REWRITE_PATHS_RELATIVE and initialize it
>    - suggested by Erik Joelsson

I tried this myself today and here are my findings. If the output dir is a 
subdir of the `CCACHE_BASEDIR` the issue reproduces. The source/header files in 
the *.d files can be relative without impacting how make resolves them, but if 
the object files are relative, then make doesn't understand that they should 
match the absolute files used in the rest of the makefiles.

Kim is likely not seeing this because in Oracle builds, because we add a custom 
repository outside of the OpenJDK repository, we typically put the build dir 
outside of the OpenJDK repo, and so outside of `CCACHE_BASEDIR`. This is 
actually a bug with the ccache configuration. We should change the definition 
of `CCACHE_BASEDIR` to be `$WORKSPACE_ROOT` instead of `$TOPDIR` (otherwise 
source files in the Oracle repo will not be treated the same as source files in 
the OpenJDK repo).

So in summary, this fix is needed, and we have a different bug with ccache 
handling for Oracle builds that hid it from us.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15080#issuecomment-1677346127

Reply via email to