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

Verovio SVG generation not working on Linux #12

Open
th-we opened this issue Sep 16, 2019 · 2 comments
Open

Verovio SVG generation not working on Linux #12

th-we opened this issue Sep 16, 2019 · 2 comments

Comments

@th-we
Copy link
Member

th-we commented Sep 16, 2019

Tried both the oXygen installer with bundled JRE (JAVA_VERSION="1.8.0_202") and the platform independent download together with openjdk 11.0.4.

I get the following respective console outputs in oXygen:

Executing:
"/path/to/Oxygen XML Editor 21/jre/bin/java" -Dfile.encoding=UTF-8 -Xmx256m -classpath "/path/to/Oxygen XML Editor 21/tools/ant/lib/ant-launcher.jar" "-Dant.home=/path/to/Oxygen XML Editor 21/tools/ant" org.apache.tools.ant.launch.Launcher -f "/path/to/.com.oxygenxml/extensions/v21.1/frameworks/file__path_to_Downloads_oXygen_MEI_addon.xml/oXygen-MEI-addon/stylesheets/SVG/build.xml" "-Dfile.path=/tmp/test.mei" "-Dverovio.path=/path/to/.com.oxygenxml/extensions/v21.1/frameworks/file__path_to_Downloads_oXygen_MEI_addon.xml/oXygen-MEI-addon/verovio/bindings/java/example-mei/" "-Dwebhelp.trial.license=yes"

Buildfile: /path/to/.com.oxygenxml/extensions/v21.1/frameworks/file__path_to_Downloads_oXygen_MEI_addon.xml/oXygen-MEI-addon/stylesheets/SVG/build.xml
     [echo] /tmp/test.mei

generate:
     [echo] /tmp/test.mei
     [java] Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /tmp/libverovio4798142149645763620.tmp which might have disabled stack guard. The VM will try to fix the stack guard now.
     [java] It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
     [java] Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libverovio4798142149645763620.tmp: /tmp/libverovio4798142149645763620.tmp: Ungültiger ELF-Header (Possible cause: endianness mismatch)
     [java] 	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
     [java] 	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
     [java] 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
     [java] 	at java.lang.Runtime.load0(Runtime.java:809)
     [java] 	at java.lang.System.load(System.java:1086)
     [java] 	at org.rismch.verovio.NativeUtils.loadLibraryFromJar(NativeUtils.java:91)
     [java] 	at main.main(main.java:13)

     [java] Java Result: 1
main:

BUILD SUCCESSFUL
Total time: 0 seconds

The process finished with exit code: 0
Executing:
"/usr/lib/jvm/java-11-openjdk-amd64/bin/java" -Dfile.encoding=UTF-8 -Xmx256m -classpath "/path/to/oxygen/tools/ant/lib/ant-launcher.jar" "-Dant.home=/path/to/oxygen/tools/ant" org.apache.tools.ant.launch.Launcher -f "/path/to/.com.oxygenxml/extensions/v21.1/frameworks/file__path_to_Downloads_oXygen_MEI_addon.xml/oXygen-MEI-addon/stylesheets/SVG/build.xml" "-Dfile.path=/tmp/test.mei" "-Dverovio.path=/path/to/.com.oxygenxml/extensions/v21.1/frameworks/file__path_to_Downloads_oXygen_MEI_addon.xml/oXygen-MEI-addon/verovio/bindings/java/example-mei/" "-Dwebhelp.trial.license=yes"

Buildfile: /path/to/.com.oxygenxml/extensions/v21.1/frameworks/file__path_to_Downloads_oXygen_MEI_addon.xml/oXygen-MEI-addon/stylesheets/SVG/build.xml
     [echo] /tmp/test.mei

generate:
     [echo] /tmp/test.mei
     [java] OpenJDK 64-Bit Server VM warning: You have loaded library /tmp/libverovio13222648962639583019.tmp which might have disabled stack guard. The VM will try to fix the stack guard now.
     [java] It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
     [java] Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libverovio13222648962639583019.tmp: /tmp/libverovio13222648962639583019.tmp: Ungültiger ELF-Header (Possible cause: endianness mismatch)
     [java] 	at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
     [java] 	at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2430)
     [java] 	at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2487)
     [java] 	at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2684)
     [java] 	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2617)
     [java] 	at java.base/java.lang.Runtime.load0(Runtime.java:767)
     [java] 	at java.base/java.lang.System.load(System.java:1831)
     [java] 	at org.rismch.verovio.NativeUtils.loadLibraryFromJar(NativeUtils.java:91)
     [java] 	at main.main(main.java:13)
     [java] Java Result: 1

main:

BUILD SUCCESSFUL
Total time: 1 second

The process finished with exit code: 0
@craigsapp
Copy link
Member

The text:

(Possible cause: endianness mismatch)

Seems to be key to the problem, probably indicating that verovio needs to be compiled on linux, but seems to have been compiled on a Mac.

@th-we
Copy link
Member Author

th-we commented Sep 17, 2019

I guess I'd have to compile a Linux-specific libverovio.jnilib. However, when I try to build the addon, ant fails with the following error:

verovio-prepare:
     [exec] WARNING: An illegal reflective access operation has occurred
     [exec] WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
     [exec] WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
     [exec] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
     [exec] WARNING: All illegal access operations will be denied in a future release
     [exec] [INFO] Scanning for projects...
     [exec] [INFO] 
     [exec] [INFO] ------------------< org.rism.verovio:VerovioToolkit >-------------------
     [exec] [INFO] Building VerovioToolkit 2.0.0
     [exec] [INFO] --------------------------------[ jar ]---------------------------------
     [exec] [INFO] 
     [exec] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ VerovioToolkit ---
     [exec] [INFO] Using 'UTF-8' encoding to copy filtered resources.
     [exec] [INFO] skip non existing resourceDirectory /home/tom/devel/oXygen-MEI-addon/submodules/verovio/bindings/java/src/main/resources
     [exec] [INFO] 
     [exec] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ VerovioToolkit ---
     [exec] [INFO] Changes detected - recompiling the module!
     [exec] [INFO] Compiling 1 source file to /home/tom/devel/oXygen-MEI-addon/submodules/verovio/bindings/java/target/classes
     [exec] [INFO] -------------------------------------------------------------
     [exec] [ERROR] COMPILATION ERROR : 
     [exec] [INFO] -------------------------------------------------------------
     [exec] [ERROR] Source option 5 is no longer supported. Use 6 or later.
     [exec] [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
     [exec] [INFO] 2 errors 
     [exec] [INFO] -------------------------------------------------------------
     [exec] [INFO] ------------------------------------------------------------------------
     [exec] [INFO] BUILD FAILURE
     [exec] [INFO] ------------------------------------------------------------------------
     [exec] [INFO] Total time:  1.262 s
     [exec] [INFO] Finished at: 2019-09-17T07:49:36+02:00
     [exec] [INFO] ------------------------------------------------------------------------
     [exec] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project VerovioToolkit: Compilation failure: Compilation failure: 
     [exec] [ERROR] Source option 5 is no longer supported. Use 6 or later.
     [exec] [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
     [exec] [ERROR] -> [Help 1]
     [exec] [ERROR] 
     [exec] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
     [exec] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
     [exec] [ERROR] 
     [exec] [ERROR] For more information about the errors and possible solutions, please read the following articles:
     [exec] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
     [exec] Result: 1

Where can I specify the source and target options? Without really knowing what I'm doing, I added the following lines to the build.properties file:

java.source=6
java.target=1.6

...which doesn't change anything.

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