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

Add "linux-riscv64" entry to OSGI Bundle-NativeCode header in MANIFEST.MF #1623

Merged

Conversation

matthiasblaesing
Copy link
Member

Closes: #1622

@matthiasblaesing
Copy link
Member Author

@yuzibo valid question and indeed the MANIFEST entry for linux-riscv64 is missing. This PR fixes this. Please see if this fixes your issue.

Here is a pre-build binary:
jna.zip

@yuzibo
Copy link

yuzibo commented Sep 6, 2024

Thanks for quick feedback.

Okay, No problem, I will test it on my local env. But I am not sure how to replace original jar file from local jar under eclipse-equinox/p2. This will cost some time maybe.

Thanks again.

@yuzibo
Copy link

yuzibo commented Sep 6, 2024

@yuzibo valid question and indeed the MANIFEST entry for linux-riscv64 is missing. This PR fixes this. Please see if this fixes your issue.

hmm, could you give me a code snapshot which how to test to verify the jar file works on riscv64? This is the easiest way to test it on my riscv64 machines I think... Sorry to bother you again.

@matthiasblaesing
Copy link
Member Author

If you only want to test the file if it works on the target platform, you can run:

java -jar jna.jar 

That will load libjnidispatch.so from the jar and show the version information.

@yuzibo
Copy link

yuzibo commented Sep 6, 2024

Great, Thanks for code.

This old jar from here

r$ java -jar jna-5.14.0.jar
Java Native Access (JNA) API Version 5
Version: 5.14.0 (b0)
 Native: 7.0.0 (5fb98531302accd485c534c452dd952a)
 Prefix: linux-riscv64

And if test the jar you attached:

r$ java -jar jna.jar
Java Native Access (JNA) API Version 5
Version: 5.15.0-SNAPSHOT (b0)
 Native: 7.0.2 (5fb98531302accd485c534c452dd952a)
 Prefix: linux-riscv64

It seems the missing entry about linux-riscv64 in MANIFEST.MF do not affect application but will affect mvn configuration I think.

anyway, I think the PR will not break something.

@yuzibo
Copy link

yuzibo commented Sep 6, 2024

Okay, No problem, I will test it on my local env. But I am not sure how to replace original jar file from local jar under eclipse-equinox/p2. This will cost some time maybe.

hmm, it seems I have to find a way how to enable eclipse-equinox/p2 will find the custom jar file given not sure what time JNA will release a new version.

@matthiasblaesing
Copy link
Member Author

Wait - the change has a problem - the file path is wrong.

@matthiasblaesing
Copy link
Member Author

Updated:
jna.zip

@yuzibo
Copy link

yuzibo commented Sep 6, 2024

Thanks.

Now it looks

r$ java -jar jna.jar
Java Native Access (JNA) API Version 5
Version: 5.15.0-SNAPSHOT (b0)
 Native: 7.0.2 (5fb98531302accd485c534c452dd952a)
 Prefix: linux-riscv64

And

cat MANIFEST.MF
...
9;osname=linux, com/sun/jna/linux-mips64el/libjnidispatch.so; process
 or=mips64el;osname=linux, com/sun/jna/linux-s390x/libjnidispatch.so;
 processor=S390x;osname=linux, com/sun/jna/linux-loongarch64/libjnidis
 patch.so; processor=loongarch64;osname=linux, com/sun/jna/linux-riscv
 64/libjnidispatch.so; processor=riscv64;osname=linux,  com/sun/jna/dr
 agonflybsd-x86-64/libjnidispatch.so; processor=x86-64;osname=dragonfl
...

we can see osname=linux, com/sun/jna/linux-riscv64/libjnidispatch.so; processor=riscv64; in MANIFEST.MF

@yuzibo
Copy link

yuzibo commented Sep 9, 2024

Thanks for the PR again.

hmm, I know this is not the right place to ask such a question, but could you share the plan for the next release? I've been groping in the past three days, but it is not easy to replace the jar locally under eclipse.

@matthiasblaesing matthiasblaesing merged commit 58655f7 into java-native-access:master Sep 14, 2024
14 checks passed
@matthiasblaesing
Copy link
Member Author

@yuzibo
Copy link

yuzibo commented Sep 15, 2024

@yuzibo release is out: https://groups.google.com/g/jna-users/c/MJswDpdiqWI/m/5c2EYB3XAAAJ

That is amazing news!!! Thank you very much again!

BR,
Bo

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

Successfully merging this pull request may close these issues.

linux-riscv64 was not synced in MANIFEST.MF on jna-5.14.0.jar
2 participants