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

fatal error: jni.h: No such file or directory #39

Open
bruceleerabbit opened this issue May 3, 2024 · 0 comments
Open

fatal error: jni.h: No such file or directory #39

bruceleerabbit opened this issue May 3, 2024 · 0 comments

Comments

@bruceleerabbit
Copy link

After git clone, make dist was executed. It ran for a while and apparently made significant progress but aborted when a header file was missing:

  …(snipped)…

      |
  279 | fn cbox_is_prekey(c_prekey: *const uint8_t, c_prekey_len: size_t, id: *mut uint16_t) -> CBoxResult {
      |                                                                            ^^^^^^^^

  warning: use of deprecated type alias `libc::uint8_t`: Use u8 instead.
     --> src/lib.rs:297:58
      |
  297 | pub extern fn cbox_vec_data(v: *const Vec<u8>) -> *const uint8_t {
      |                                                          ^^^^^^^

  warning: `cryptobox-c` (lib) generated 14 warnings
      Finished release [optimized] target(s) in 3m 43s
  cp build/src/cryptobox-v1.1.3/target/release/libcryptobox.so build/lib/libcryptobox.so
  mkdir -p build/include
  cp build/src/cryptobox-v1.1.3/src/cbox.h build/include/
  cc -std=c99 -g -Wall src/cryptobox-jni.c \
      -I"/include" \
      -I"/include/linux" \
      -Ibuild/include \
      -Lbuild/lib \
      -lsodium \
      -lcryptobox \
      -shared \
      -fPIC \
      -Wl,-soname,libcryptobox-jni.so \
      -o build/lib/libcryptobox-jni.so
  src/cryptobox-jni.c:16:10: fatal error: jni.h: No such file or directory
     16 | #include <jni.h>
        |          ^~~~~~~
  compilation terminated.
  make: *** [Makefile:44: compile-native] Error 1
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

1 participant