[jdk8u-dev] RFR: 8342822: jdk8u432-b06 does not compile on AIX [v2]

Stewart X Addison duke at openjdk.org
Wed Dec 18 12:58:44 UTC 2024


On Mon, 16 Dec 2024 22:48:40 GMT, Francisco Ferrari Bihurriet <fferrari at openjdk.org> wrote:

>> Varada M has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8342822: jdk8u432-b06 does not compile on AIX
>
> Hi, after getting access to an _AIX system_ (thanks @sxa) I have a clearer understanding of what is going on.
> 
> # Tests I executed in _AIX 7.2_
> 
> All the tests have the following structure, I will specify the C++ snippet and the results.
> 
> 
> cat >test.cpp <<'EOF'
> // C++ snippet goes here
> EOF
> /opt/IBM/xlC/13.1.3/bin/xlC_r -q64 -c -o/dev/null test.cpp
> /opt/IBM/xlC/16.1.0/bin/xlC_r -q64 -c -o/dev/null test.cpp
> rm -f test.cpp
> 
> 
> ## Finding the combination that causes the failure
> 
> ### Snippets that worked
> 
> All the following snippets worked, both with `xlC` 13.1.3 and 16.1.0.
> 
> #### Use `stdlib.h` alone, with `abs()`
> 
> 
> #include <stdlib.h>
> 
> long test() {
>     return abs((long)1);
> }
> 
> 
> #### Use `cstdlib` alone, with `std::abs()`
> 
> 
> #include <cstdlib>
> 
> long test() {
>     return std::abs((long)1);
> }
> 
> 
> #### Use `cstdlib` with `std::abs()`, but also include `cmath` before `cstdlib`
> 
> 
> #include <cmath>
> #include <cstdlib>
> 
> long test() {
>     return std::abs((long)1);
> }
> 
> 
> #### Use `cstdlib` with `std::abs()`, but also include `cmath` after `cstdlib`
> 
> 
> #include <cstdlib>
> #include <cmath>
> 
> long test() {
>     return std::abs((long)1);
> }
> 
> 
> ### Snippets that failed
> 
> The following snippets failed in the same way, both with `xlC` 13.1.3 and 16.1.0. See the error at the end.
> 
> #### Use `stdlib.h` with `abs()`, but also include `cmath` before `cstdlib`
> 
> 
> #include <cmath>
> #include <stdlib.h>
> 
> long test() {
>     return abs((long)1);
> }
> 
> 
> #### Use `stdlib.h` with `abs()`, but also include `cmath` after `cstdlib`
> 
> 
> #include <stdlib.h>
> #include <cmath>
> 
> long test() {
>     return abs((long)1);
> }
> 
> 
> #### Error
> 
> 
> "test.cpp", line 5.12: 1540-0219 (S) The call to "abs" has no best match.
> "test.cpp", line 5.16: 1540-1229 (I) Argument number 1 is an rvalue of type "long".
> "/usr/include/math.h", line 1033.20: 1540-1202 (I) No candidate is better than "abs(long double)".
> "test.cpp", line 5.16: 1540-1231 (I) The conversion from argument number 1 to "long double" uses "a floating point-integral conversion".
> "/usr/include/math.h", line 1003.14: 1540-1202 (I) No candidate is better than "abs(float)".
> "test.cpp", line 5.16: 1540-1231 (I) The conversion from argument number 1 to "float" uses "a floating point-integral conversion".
> "/usr/include/math.h", line 1001.15: 1540-1202 (I) No candidate is better than "abs(double)".
> "test.cpp", line 5.16: 1540-1231 (I) The conversion from argument number 1 to "double" uses "a floating point-integral conversion".
> "/usr/include/stdlib.h", line 829.18: 1540-1202 (I) No candidate ...

> Thank you, @franferrax, for identifying the root cause of the issue. I have added the header file, which is resolving the build error. Additionally, I checked by adding -D__ABS_LONG__ in the AIX configuration, and that also resolves the issue. Testing for hotspot/test is successful, with no related failures observed.

This seems to break Solaris which can't find the new header file:
`09:40:41  "/export/home/jenkins/workspace/build-scripts/jobs/jdk8u/jdk8u-solaris-x64-temurin/workspace/build/src/hotspot/src/share/vm/opto/superword.hpp", line 33: Error: Could not open include file "cstdlib".`

Ref: https://ci.adoptium.net/job/build-scripts/job/jobs/job/jdk8u/job/jdk8u-solaris-x64-temurin/524/consoleText

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

PR Comment: https://git.openjdk.org/jdk8u-dev/pull/600#issuecomment-2551256620


More information about the jdk8u-dev mailing list