RFR: 8333326: Linux Alpine build fails after 8302744 [v2]
Severin Gehwolf
sgehwolf at openjdk.org
Tue Jun 4 13:11:15 UTC 2024
On Tue, 4 Jun 2024 13:03:32 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> we run into a basename related build issue on Alpine Linux
>>
>> basename related issue :
>> /priv/jenkins/client-home/workspace/openjdk-jdk-dev-linux_alpine_x86_64-opt/jdk/test/hotspot/gtest/runtime/test_cgroupSubsystem_linux.cpp: In member function 'virtual void cgroupTest_read_numerical_key_value_success_cases_Test::TestBody()':
>> /priv/jenkins/client-home/workspace/openjdk-jdk-dev-linux_alpine_x86_64-opt/jdk/test/hotspot/gtest/runtime/test_cgroupSubsystem_linux.cpp:139:19: error: 'basename' was not declared in this scope; did you mean 'rename'?
>> 139 | const char* b = basename(test_file);
>> | ^~~~~~~~
>> | rename
>>
>>
>> Additionally giving a 'const char*' to basename results in a warning as error because basename interface gets a char* .
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> use libgen basename not only on Alpine
test/hotspot/gtest/runtime/test_cgroupSubsystem_linux.cpp line 37:
> 35: #include <stdio.h>
> 36:
> 37: // for basename, needed for Alpine
Nit: Drop `needed for Alpine`. We include `libgen.h` unconditionally so that the posix version of `basename` is being used (rather than the GNU version).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19497#discussion_r1625971920
More information about the hotspot-runtime-dev
mailing list