Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not compile jni (build script) #524

Closed
badcodecat opened this issue Feb 10, 2024 · 1 comment
Closed

Could not compile jni (build script) #524

badcodecat opened this issue Feb 10, 2024 · 1 comment
Assignees

Comments

@badcodecat
Copy link

I received the following error when building my project:

error[E0425]: cannot find value `EXPECTED_JVM_FILENAME` in this scope                                              --> .../jni-0.19.0/build.rs:102:25
    |
102 |         if file_name == EXPECTED_JVM_FILENAME {
    |                         ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

This was on rust 1.75.0.
I'm not sure if its relevant but due to the JVM thing mentioned in the error I have openjdk 17 installed.

@argv-minus-one
Copy link
Contributor

You're using an old version of the jni crate (0.20.0 or earlier) with an unsupported target operating system. The only supported target operating systems in that version are Android, FreeBSD, Linux, macOS, NetBSD, OpenBSD, and Windows.

That was fixed in version 0.21.0. This crate should work on any operating system now, but you'll need to update.

Note that the invocation feature is still limited to whichever operating systems are supported by the libloading crate.

@argv-minus-one argv-minus-one self-assigned this Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants