JDK-8286929 : [AIX] Undefined reference to pt_atexit_np
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: aix
  • Submitted: 2022-05-17
  • Updated: 2023-10-11
Related Reports
Relates :  
Description
After JDK-8282191, building with AIX 7.1 results in:

ld: 0711-318 ERROR: Undefined symbols were found.
        The following symbols are in error:
 Symbol                    Inpndx  TY CL Source-File(Object-File) OR Import-File{Shared-object}
                              RLD: Address  Section  Rld-type Referencing Symbol
 ----------------------------------------------------------------------------------------------
 .__pt_atexit_np           [1714]  ER PR /home/hotspot/openjdk/jdk-fork/src/hotspot/share/prims/universalUpcallHandler.cpp(/home/hotspot/openjdk/jdk-fork/build/aix-ppc64-server-fastdebug/hotspot/variant-server/libjvm/objs/universalUpcallHandler.o)
                                   00000050 .text    R_RBR    [1160]  <.__tls_init>
ER: The return code is 8.

This is a known issue with XL C. See Note 2 at [1].

According to [2] the min support version of AIX is 7.2. However, if a suitable workaround could be found, I'm sure it would be well received.

[1] https://www.ibm.com/docs/en/xl-c-and-cpp-aix/16.1?topic=end-language-standard-features
[2] https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms
Comments
I certainly thought so at first, but it turns out that the causes are very different. For JDK-8286891, the solution is easy once the problem is known: no default constructor results in sigill at runtime. This issue is caused by a difference in the way C++11 features are implemented in AIX 7.1 and 7.2. It's a known issue with the platform, and has no known workaround.
19-05-2022

Setting priority P3 -> P4. AIX version 7.1 is not part of the Supported Platforms for jdk19+. This may not be easy enough to fix to warrant the work for an unsupported platform.
19-05-2022

Isn't this basically the same thread_local issue reported in JDK-8286891?
19-05-2022