RFR: 7903132: Replace casts with type test pattern
Jorn Vernee
jvernee at openjdk.java.net
Fri Mar 25 16:22:36 UTC 2022
On Fri, 25 Mar 2022 15:40:21 GMT, Ethan McCue <duke at openjdk.java.net> wrote:
>> So yes, 100% on me. But in my defense I am getting a particularly obtuse error before compilation and there isn't exactly someone to ask without pretense.
>>
>>
>> $ /usr/bin/clang --version
>> Apple clang version 13.1.6 (clang-1316.0.21.2)
>> Target: arm64-apple-darwin21.3.0
>> Thread model: posix
>> InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
>>
>> ---------------------
>>
>> $ sh ./gradlew -Pjdk18_home=/Users/emccue/Library/Java/JavaVirtualMachines/openjdk-18/Contents/Home clean verify
>>
>> FAILURE: Build failed with an exception.
>>
>> * Where:
>> Build file '/Users/emccue/Development/jextract/build.gradle' line: 13
>>
>> * What went wrong:
>> A problem occurred evaluating root project 'jextract'.
>>> Could not get unknown property 'libclang_home' for root project 'jextract' of type org.gradle.api.Project.
>>
>> * Try:
>>> Run with --stacktrace option to get the stack trace.
>>> Run with --info or --debug option to get more log output.
>>> Run with --scan to get full insights.
>>
>> * Get more help at https://help.gradle.org
>>
>> BUILD FAILED in 297ms
>>
>> ---------------------
>>
>> $ sh ./gradlew -Pjdk18_home=/Users/emccue/Library/Java/JavaVirtualMachines/openjdk-18/Contents/Home -Plibclang_home=/usr/bin/clang clean verify
>>
>> FAILURE: Build failed with an exception.
>>
>> * Where:
>> Build file '/Users/emccue/Development/jextract/build.gradle' line: 14
>>
>> * What went wrong:
>> A problem occurred evaluating root project 'jextract'.
>>> Cannot invoke method getAt() on null object
>>
>> * Try:
>>> Run with --stacktrace option to get the stack trace.
>>> Run with --info or --debug option to get more log output.
>>> Run with --scan to get full insights.
>>
>> * Get more help at https://help.gradle.org
>>
>> BUILD FAILED in 287ms
>>
>> ---------------------
>>
>> $ sh ./gradlew -Pjdk18_home=/Users/emccue/Library/Java/JavaVirtualMachines/openjdk-18/Contents/Home -Plibclang_home=/usr/bin/ clean verify
>>
>> FAILURE: Build failed with an exception.
>>
>> * Where:
>> Build file '/Users/emccue/Development/jextract/build.gradle' line: 14
>>
>> * What went wrong:
>> A problem occurred evaluating root project 'jextract'.
>>> Cannot invoke method getAt() on null object
>>
>> * Try:
>>> Run with --stacktrace option to get the stack trace.
>>> Run with --info or --debug option to get more log output.
>>> Run with --scan to get full insights.
>>
>> * Get more help at https://help.gradle.org
>>
>> BUILD FAILED in 290ms
>
> (I was counting on some CI/CD to be triggered on PR, which i suppose either isn't the case or isn't the case unless i get past the issue number check)
Questions can be directed at the mailing list (either jextract-dev at openjdk.java.net or panama-dev at openjdk.java.net). You can send an email there without making an account as well (it will go through a moderation queue first).
I agree the error message is not great. In this case the issue seems to be this line in build.gradle:
def clang_version = new File("${libclang_home}/lib/clang/").list()[0]
i.e. the `libclang_home` directory does not have the expected directory structure. It is looking for a directory like `<libclang_home>/lib/clang/<VERSION>`. So please make sure that exists.
-------------
PR: https://git.openjdk.java.net/jextract/pull/5
More information about the jextract-dev
mailing list