RFR: Add support for AIX in build process [v3]

Jorn Vernee jvernee at openjdk.org
Mon Dec 1 18:02:55 UTC 2025


On Mon, 1 Dec 2025 17:35:36 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   remove debug codE
>
> src/main/java/org/openjdk/jextract/clang/libclang/Index_h.java line 105:
> 
>> 103:             }
>> 104:         }
>> 105:         SYMBOL_LOOKUP = SymbolLookup.libraryLookup(libName + "(libclang.so.14)", Arena.global());
> 
> Pleas fix the indentation here.

Also, hard-coding paths the the build directories in the production code seems fishy. It also shouldn't be needed. If the library is properly included in the runtime image, that's where it can be found, and I'm expecting the call to `libraryLookup` to succeed.

If it doesn't then there's something wrong with the runtime image. You might want to test grabbing the .jmod file from the build, and creating another runtime image with it, and then trying to access some of the jextract API classes in e.g. a jshell session, to see if the library can be loaded.

> test/test-support/CMakeLists.txt line 32:
> 
>> 30:     # Link against libm to resolve sqrt() and other math symbols
>> 31:     target_link_libraries(${LIB_NAME} m)
>> 32: 
> 
> This does not work on Windows:
> 
> 
> LINK : fatal error LNK1181: cannot open input file 'm.lib'

Maybe you could use something like:
Suggestion:

    # Link against libm to resolve sqrt() and other math symbols
    find_library(LIBM, m)
    if(LIBM)
      target_link_libraries(${LIB_NAME} ${LIBM})
    endif()

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

PR Review Comment: https://git.openjdk.org/jextract/pull/297#discussion_r2578023133
PR Review Comment: https://git.openjdk.org/jextract/pull/297#discussion_r2578088201


More information about the jextract-dev mailing list