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

Build fails on FreeBSD #12

Open
wyc opened this issue Nov 29, 2020 · 1 comment
Open

Build fails on FreeBSD #12

wyc opened this issue Nov 29, 2020 · 1 comment
Labels
bug-unconfirmed Probably a bug

Comments

@wyc
Copy link
Contributor

wyc commented Nov 29, 2020

I suspect it has to do with a BSD-specific issue with the jni crate.

Please see the following build log for system information and reproduction:

$ git clone [email protected]:spruceid/ssi.git
$ git clone [email protected]:spruceid/didkit.git
$ cd didkit/
$ uname -vp
FreeBSD 12.2-RELEASE r366954 GENERIC  amd64
$ cargo build
   Compiling jni v0.17.0
error[E0425]: cannot find value `EXPECTED_JVM_FILENAME` in this scope
  --> /home/wayne/.cargo/registry/src/github.com-1ecc6299db9ec823/jni-0.17.0/build.rs:97:25
   |
97 |         if file_name == EXPECTED_JVM_FILENAME {
   |                         ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error: aborting due to previous error

For more information about this error, try `rustc --explain E0425`.
error: could not compile `jni`

To learn more, run the command again with --verbose.
@wyc
Copy link
Contributor Author

wyc commented Feb 22, 2021

Got it to build and pass tests with the following patch after build failed.

$ uname -a
FreeBSD localhost 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC  amd64

Had to apply the following diff to /home/wayne/.cargo/registry/src/github.com-1ecc6299db9ec823/jni-0.17.0/build.rs:

$ diff build.rs build.old.rs
25,26d24
< #[cfg(target_os = "freebsd")]
< const EXPECTED_JVM_FILENAME: &str = "libjvm.so";

We can leave this issue open until upstream recognizes FreeBSD or if we create a local non-jni workaround for fbsd.

@clehner clehner added the bug-unconfirmed Probably a bug label Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-unconfirmed Probably a bug
Projects
None yet
Development

No branches or pull requests

2 participants