OlegKunitsyn / libshout-java

Libshout binding for streaming audio to Icecast servers from Java applications
MIT License
41 stars 14 forks source link

Compilation error #22

Closed denysobukh closed 6 years ago

denysobukh commented 6 years ago

OS Description: Ubuntu 18.04 LTS Release: 18.04 Codename: bionic

gcc gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0

Java openjdk version "1.8.0_171" OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.18.04.1-b11) OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)

Icecast Icecast 2.4.3

libshout-dev libshout3-dev/bionic,now 2.4.1-2build1 amd64

mvn install

[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building libshout-java 2.2.2
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ libshout-java ---
[INFO] Deleting /home/denys/libshout-java/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ libshout-java ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/denys/libshout-java/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ libshout-java ---
[INFO] Compiling 1 source file to /home/denys/libshout-java/target/classes
[INFO] 
[INFO] --- native-maven-plugin:1.0-alpha-8:javah (javah) @ libshout-java ---
[INFO] /bin/sh -c cd /home/denys/libshout-java && javah -d /home/denys/libshout-java/target/native -classpath /home/denys/libshout-java/target/classes com.gmail.kunicins.olegs.libshout.Libshout
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
[INFO] 
[INFO] --- native-maven-plugin:1.0-alpha-8:compile (javah) @ libshout-java ---
[INFO] /bin/sh -c cd /home/denys/libshout-java && gcc -fpic -Wall -I/home/denys/libshout-java/src/main/native -I/usr/lib/jvm/java-8-openjdk-amd64/jre/../include/darwin -I/home/denys/libshout-java/target/native -I/usr/lib/jvm/java-8-openjdk-amd64/jre/../include -I/usr/lib/jvm/java-8-openjdk-amd64/jre/../include/linux -o/home/denys/libshout-java/target/objs/libshout.o -c /home/denys/libshout-java/src/main/native/libshout.c
[INFO] 
[INFO] --- native-maven-plugin:1.0-alpha-8:link (javah) @ libshout-java ---
[INFO] /bin/sh -c cd /home/denys/libshout-java && gcc -shared -lshout -o/home/denys/libshout-java/target/libshout-java-2.2.2.jar target/objs/libshout.o -o /home/denys/libshout-java/target/libshout-java.so
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ libshout-java ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ libshout-java ---
[INFO] Compiling 1 source file to /home/denys/libshout-java/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ libshout-java ---
[INFO] Surefire report directory: /home/denys/libshout-java/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
Running com.gmail.kunicins.olegs.libshout.LibshoutTest
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java: symbol lookup error: /home/denys/libshout-java/target/libshout-java.so: undefined symbol: shout_init

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.525 s
[INFO] Finished at: 2018-06-26T00:41:31+03:00
[INFO] Final Memory: 16M/232M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project libshout-java: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
OlegKunitsyn commented 6 years ago

For some reason it's not compiling on Ubuntu. Please try pre-compiled so files in the target folder, 32 or 64 bit.