0

How can I rebuild jna-4.1.0.jar file to include the linux-s390x specific libjnidispatch.so file.

This is needed by one of my application and failing on the dependency of this libjnidispatch.so file.

Did try to follow this question: How to use JNAerator with multiple dynamic libraries under one header?

Syntax Used:

java -jar jnaerator-0.11-shaded.jar \
> -arch linux-s390x linux-s390x/libjnidispatch.so \
> -mode jna-3.3.0-jenkins-3.jar \
> -jar jna-3.3.0-jenkins-3_updated.jar

Getting below error:

 ERROR: JNAeration failed !
#
#       Error parsing arguments :
#       -arch linux-s390x linux-s390x/libjnidispatch.so -mode jna-3.3.0-jenkins-3.jar -jar jna-3.3.0-jenkins-3_updated.jar : com.ochafik.lang.jnaerator.JNAerator$CommandLineException: Argument 'linux_s390x' is not one of the expected values :
#               linux_x64,
#               linux_x86,
#               armeabi,
#               sunos_x86,
#               sunos_sparc,
#               darwin_universal,
#               win32,
#               win64
#       Please use -h for help on the command-line options available.
Community
  • 1
  • 1
Mir S Mehdi
  • 1,482
  • 3
  • 19
  • 32

1 Answers1

0

Clone the git repository.

Make sure you have a JDK installed, with Apache ant and native build tools (make, gcc, grep, etc).

Then just run ant native; ant jar.

Note that s390x may not be recognized out of the box, but if you look through the build files for how the other platforms are handled it should be straightforward to add in a switch for s390x (see build.xml and native/Makefile).

If you have a package distribution for a previous JNA version, that package may include the necessary packages and if so, consider submitting them to the JNA project as a github pull request to have them incorporating into the project proper.

technomage
  • 9,861
  • 2
  • 26
  • 40