On Wed, 12 Aug 2026 13:40:36 GMT, Erik Joelsson <[email protected]> wrote:

>> It looks like we can't use `UTIL_FIXUP_PATH`, since it first tests whether 
>> the directory exists.  I made the following change:
>> 
>> 
>> diff --git a/make/autoconf/build-performance.m4 
>> b/make/autoconf/build-performance.m4
>> index 76332e0b7f8..620f3b5a461 100644
>> --- a/make/autoconf/build-performance.m4
>> +++ b/make/autoconf/build-performance.m4
>> @@ -300,11 +303,8 @@ AC_DEFUN([BPERF_SETUP_SCCACHE],
>> 
>>    if test "x$with_sccache_dir" != x; then
>>      SCCACHE_DIR="$with_sccache_dir"
>> -    SCCACHE_DIR_FOR_SCCACHE="$SCCACHE_DIR"
>> -    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
>> -      SCCACHE_DIR_FOR_SCCACHE=`$FIXPATH_BASE -m print 
>> "$SCCACHE_DIR_FOR_SCCACHE"`
>> -    fi
>> -    SET_SCCACHE_DIR="SCCACHE_DIR=$SCCACHE_DIR_FOR_SCCACHE"
>> +    UTIL_FIXUP_PATH(SCCACHE_DIR)
>> +    SET_SCCACHE_DIR="SCCACHE_DIR=$SCCACHE_DIR"
>>      if test "x$SCCACHE" = x; then
>>        AC_MSG_WARN([--with-sccache-dir has no meaning when sccache is not 
>> enabled])
>>      fi
>> 
>> 
>> 
>> but the build fails if the specified directory does not exist:
>> 
>> 
>> checking if sccache is available... yes
>> checking if sccache is enabled... enabled, from command line
>> configure: The path of SCCACHE_DIR, which is given as "/tmp/x", can not be 
>> properly resolved.
>> configure: Please see the section "Special Considerations" in building.md.
>> configure: This is the error message given by fixpath:
>> fixpath: warning: Path '/tmp/x' does not exist
>> /tmp/x
>> configure: error: Cannot continue
>> configure exiting with result code 1
>
> Ok, then keep the current solution, but add a comment explaining why 
> UTIL_FIXUP_PATH isn't used.

Good idea, added the following comment in the most recent commit:

> Ideally, we'd use `UTIL_FIXUP_PATH()`, but it expects the supplied path to
> already exist, which might not be true for the sccache directory during
> the configure step.  As a workaround, we manually invoke fixpath.sh.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32059#discussion_r3769065006

Reply via email to