RFR: 7903731: Jextract should support macOS frameworks [v4]

Nizar Benalla nbenalla at openjdk.org
Wed Mar 5 16:03:08 UTC 2025


On Wed, 5 Mar 2025 12:42:56 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> src/main/java/org/openjdk/jextract/JextractTool.java line 605:
>> 
>>> 603:     private String formatFrameworkPath(String optionString) {
>>> 604:         String publicPath = String.format("/System/Library/Frameworks/%1$s.framework/", optionString);
>>> 605:         String privatePath = String.format("/System/Library/PrivateFrameworks/%1$s.framework/", optionString);
>> 
>> I think Maurizios comment still applies. AFAIU we need to pass the exact framework path to `dlopen`, so we need to manually search for the frameworks in this system location, and also in the locations specified through `-F`, and then load it from one of those locations.
>
> Yep -- it seems to me that public/private paths are _default_ framework paths. But user can add more paths to that list, using `-F`. Btw, one related question here is what is the expected priority of the search -- e.g. should we look into `-F` paths first, and then use public/private paths as fallbacks or the other way around?

Thanks Jorn, I confused private and custom frameworks when I was writing this.
I look at the `-F` paths first which include paths in `compile_flags.txt`, those passed using `-framework` and the MacOS SDK then private/public frameworks.

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

PR Review Comment: https://git.openjdk.org/jextract/pull/268#discussion_r1981716318


More information about the jextract-dev mailing list