Skip to content

Add CI for Rust implementation #28

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

Open
serenacofano opened this issue Feb 17, 2025 · 11 comments
Open

Add CI for Rust implementation #28

serenacofano opened this issue Feb 17, 2025 · 11 comments
Assignees

Comments

@serenacofano
Copy link
Contributor

No description provided.

@serenacofano serenacofano self-assigned this Feb 17, 2025
@algomaster99
Copy link
Member

Compiling cargo agent on linux is posing problems even if I follow instructions here.

  1. It fails because it is unable to find jni_md.h which a platform dependent header file. This file is actually in include/linux/ instead of include/. I tried to add another header to build.rs, but it still fails with the same error jni_md.h not found.
  2. I manually copy jni_md.h to include but then I get a lot of compilation errors error: extern block cannot be declared unsafe.

@serenacofano
Copy link
Contributor Author

If you hardcode your full path in the variables jvm_lib_path, jvm_include_path, jni_include_path (instead of mine), does it work?

@algomaster99
Copy link
Member

algomaster99 commented Feb 19, 2025

Hardcoding works but I still get compilation errors.

error: extern block cannot be declared unsafe
...
could not compile `cargo_agent` (lib) due to 99 previous errors

@serenacofano
Copy link
Contributor Author

Can you please check if you fulfilled the requirements to use bindgen?

@algomaster99
Copy link
Member

Checking

@algomaster99
Copy link
Member

I installed clang but I still get the same error. Attaching the logs -

err.log

@algomaster99
Copy link
Member

Can you also share your binding.rs and the version of rust you are using?

Where is binding.rs?

rustc 1.80.1 (3f5fd8dd4 2024-08-06)

@serenacofano
Copy link
Contributor Author

It should be here classport/cargo_agent/cargo_agent/target/release/build/cargo_agent-e4f7397e79b24696/out/bindings.rs

@algomaster99
Copy link
Member

bindings.txt Rename it to .rs.

@serenacofano
Copy link
Contributor Author

I found this issue. If you try to update rust to the latest version, clean and build, does it work?

@algomaster99
Copy link
Member

algomaster99 commented Feb 19, 2025 via email

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