RFR: 8313374: --enable-ccache's CCACHE_BASEDIR breaks builds [v6]

Kim Barrett kim.barrett at oracle.com
Tue Aug 15 22:36:08 UTC 2023



> On Aug 14, 2023, at 10:09 AM, Erik Joelsson <erikj at openjdk.org> wrote:
> 
> On Wed, 9 Aug 2023 12:36:59 GMT, Jan Kratochvil <jkratochvil at 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.

Thanks for chasing that down Erik.  On that basis, I’ve no issues with the proposed change.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20230815/435e056c/signature.asc>


More information about the build-dev mailing list