-
Notifications
You must be signed in to change notification settings - Fork 14
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
Error in compilation in after_script: - ./dlib-java java-jar #2
Comments
Hello !
I do not have the code in front of me right now, but I'll try to take a
look today.
First, you are right: the path I used is wrong and you used the correct one
in your second attempt.
Second, can you tell me which version of java you're using? It seems that
you're issue is related tout JavaFX and I don't use it directly. I bet it's
an issue comming from OpenCV and you should stick to java 1.8
Le mer. 27 févr. 2019 à 23:13, agunin <notifications@github.com> a écrit :
… I am following the compilation process of this project, in the last step
on 3
1)before_install:
- ./dlib-java make-opencv
- ./dlib-java make-dlib
2)script:
- ./dlib-java mvn-package
1. after_script:
- ./dlib-java java-jar
*I'm throwing an error in this step that I detail below*
./dlib-java java-jar
//LD_LIBRARY_PATH="/tmp/dlib/usr/lib;/tmp/opencv/usr/lib;/tmp/opencv/usr/share/OpenCV/java"
java -jar "target/dlib-1.0-SNAPSHOT.jar"
Error: Unable to access jarfile target/dlib-1.0-SNAPSHOT.jar
*also try to change that line in the script code dlib-java*
LD_LIBRARY_PATH="/tmp/dlib/usr/lib;/tmp/opencv/usr/lib;/tmp/opencv/usr/share/OpenCV/java"
java -jar "dlib/target/dlib-1.0-SNAPSHOT.jar"
*but I deployed the following error*
./dlib-java java-jar
*Error: no se ha encontrado el método principal en la clase
com.github.radium226.dlib.DLib, defina el método principal del siguiente
modo:\n public static void main(String[] args)\nde lo contrario, se deberá
ampliar una clase de aplicación JavaFX javafx.application.Application*
*What is I doing wrong, the classes are downloaded from the project and
followed step by step the same, could you help me? thank you*
*I detail my output in the command construction / dlib-java mvn-package*
./dlib-java mvn-package
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] DLib Parent
[INFO] DLib
[INFO] DLib Models
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building DLib Parent 1.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ dlib-parent ---
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building DLib 1.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ dlib ---
[INFO] Deleting /home/usuario/dlib_java/dlib-java-master/dlib/target
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (make-initialize) @ dlib ---
==> Creating directories
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (make-generate-sources) @ dlib ---
==> Generating Java sources using SWIG
- showcase
Language subdirectory: java
Search paths:
./
src/main/native/swig/
src/main/native/include/
./swig_lib/java/
/usr/share/swig3.0/java/
./swig_lib/
/usr/share/swig3.0/
Preprocessing...
Starting language-specific parse...
Processing types...
C++ analysis...
Processing nested classes...
Generating wrappers...
- dlib
Language subdirectory: java
Search paths:
./
src/main/native/swig/
src/main/native/include/
./swig_lib/java/
/usr/share/swig3.0/java/
./swig_lib/
/usr/share/swig3.0/
Preprocessing...
Starting language-specific parse...
Processing types...
C++ analysis...
Processing nested classes...
Generating wrappers...
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:add-source (generate-sources) @
dlib ---
[INFO] Source directory:
/home/usuario/dlib_java/dlib-java-master/dlib/target/generated-sources/swig
added.
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (make-generate-resources) @ dlib
---
==> Compiling source files to objects
- src/main/native/face_descriptor_computer.cpp to
target/native/build/face_descriptor_computer.o
- src/main/native/showcase.cpp to target/native/build/showcase.o
- src/main/native/shape_predictor.cpp to
target/native/build/shape_predictor.o
- src/main/native/face_detector.cpp to target/native/build/face_detector.o
- target/native/showcase_wrap.cpp to target/native/build/showcase_wrap.o
- target/native/dlib_wrap.cpp to target/native/build/dlib_wrap.o
==> Linking object files to shared library
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:add-resource
(generate-resources) @ dlib ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ dlib
---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ dlib ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 14 source files to
/home/usuario/dlib_java/dlib-java-master/dlib/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources
(default-testResources) @ dlib ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 10 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @
dlib ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to
/home/usuario/dlib_java/dlib-java-master/dlib/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ dlib ---
[INFO] Surefire report directory:
/home/usuario/dlib_java/dlib-java-master/dlib/target/surefire-reports
------------------------------
T E S T S
Running com.github.radium226.dlib.FaceDescriptorComputerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.033 sec
- in com.github.radium226.dlib.FaceDescriptorComputerTest
Running com.github.radium226.dlib.ShapePredictorTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.01 sec -
in com.github.radium226.dlib.ShapePredictorTest
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 2
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ dlib ---
[INFO] Building jar:
/home/usuario/dlib_java/dlib-java-master/dlib/target/dlib-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-shade-plugin:3.1.1:shade (default) @ dlib ---
[INFO] Including opencv:opencv:jar:3.4.1 in the shaded jar.
[INFO] Including tw.edu.sju.ee.eea.commons:commons-nativeutils:jar:1.0 in
the shaded jar.
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing
/home/usuario/dlib_java/dlib-java-master/dlib/target/dlib-1.0-SNAPSHOT.jar
with
/home/usuario/dlib_java/dlib-java-master/dlib/target/dlib-1.0-SNAPSHOT-shaded.jar
[INFO] Dependency-reduced POM written at:
/home/usuario/dlib_java/dlib-java-master/dlib/dependency-reduced-pom.xml
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building DLib Models 1.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ dlib-models ---
[INFO] Deleting /home/usuario/dlib_java/dlib-java-master/dlib-models/target
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (make-generate-resources) @
dlib-models ---
wget --quiet "
http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2" -O
"./shape_predictor_68_face_landmarks.dat.bz2"
bzip2 --quiet --decompress --keep
"./shape_predictor_68_face_landmarks.dat.bz2"
wget --quiet "
http://dlib.net/files/shape_predictor_5_face_landmarks.dat.bz2" -O
"./shape_predictor_5_face_landmarks.dat.bz2"
bzip2 --quiet --decompress --keep
"./shape_predictor_5_face_landmarks.dat.bz2"
wget --quiet "
http://dlib.net/files/dlib_face_recognition_resnet_model_v1.dat.bz2" -O
"./dlib_face_recognition_resnet_model_v1.dat.bz2"
bzip2 --quiet --decompress --keep
"./dlib_face_recognition_resnet_model_v1.dat.bz2"
rm shape_predictor_5_face_landmarks.dat.bz2
dlib_face_recognition_resnet_model_v1.dat.bz2
shape_predictor_68_face_landmarks.dat.bz2
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:add-resource
(generate-resources) @ dlib-models ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
dlib-models ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @
dlib-models ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to
/home/usuario/dlib_java/dlib-java-master/dlib-models/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources
(default-testResources) @ dlib-models ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/home/usuario/dlib_java/dlib-java-master/dlib-models/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @
dlib-models ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ dlib-models ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ dlib-models ---
[INFO] Building jar:
/home/usuario/dlib_java/dlib-java-master/dlib-models/target/dlib-models-1.0-SNAPSHOT.jar
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] DLib Parent ........................................ SUCCESS [
0.533 s]
[INFO] DLib ............................................... SUCCESS [01:30
min]
[INFO] DLib Models ........................................ SUCCESS [05:25
min]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 06:56 min
[INFO] Finished at: 2019-02-27T18:58:14-03:00
[INFO] Final Memory: 21M/56M
[INFO]
------------------------------------------------------------------------
***@***.***:~/dlib_java/dlib-java-master$
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGBcUOkGK2U_UwlLiRGtcDSivMEbYgqeks5vRwMTgaJpZM4bVkU5>
.
|
Hi how are you? usuario@usuario-VirtualBox:~/dlib_java/dlib-java-master$ java -version java -XshowSettings:properties |
Other considerations that I had to modify for me to compile are /home/usuario/dlib_java/dlib-java-master/dlib/src/main/native/make.sh I had to modify the function by adding -std = c ++ 11 gcc :: compile_object ()
} /home/usuario/dlib_java/dlib-java-master/dlib/src/main/native/face_descriptor_computer.hpp Comment this line //crops.push_back(dlib::jitter_image(img,rnd)); and the line cv :: Mat m; // = dlib :: toMat (face_chip); thanks for your time. Agustín |
Hi! Thanks a lot for you feedback. I've cloned the source and took a look of everything and I figured out that a lot of stuff were actually missing. I'l try to update the |
Hi! I've made multiple updates in the Feel free to make me some feedback! |
Hello how are you? thank you very much for the changes and for your work! Download the project again and now compile everything without problems to a certain extent, which I detail below, I think it is my mistake in my linux but I do not realize how to fix it usuario@usuario-VirtualBox:~/dlib_java/dlib-java-master$ mvn package
My generated .pc file is as follows Package Information for pkg-configprefix=/tmp/opencv/usr Name: OpenCV Any suggestions? , I will continue trying to solve this error. thank you very much, greetings |
I took some time... But I rewrote the compilation process. If you're still interested, you can check the |
I am following the compilation process of this project, in the last step on 3
1)before_install:
2)script:
I'm throwing an error in this step that I detail below
./dlib-java java-jar
//LD_LIBRARY_PATH="/tmp/dlib/usr/lib;/tmp/opencv/usr/lib;/tmp/opencv/usr/share/OpenCV/java" java -jar "target/dlib-1.0-SNAPSHOT.jar"
Error: Unable to access jarfile target/dlib-1.0-SNAPSHOT.jar
also try to change that line in the script code dlib-java
LD_LIBRARY_PATH="/tmp/dlib/usr/lib;/tmp/opencv/usr/lib;/tmp/opencv/usr/share/OpenCV/java" java -jar "dlib/target/dlib-1.0-SNAPSHOT.jar"
but I deployed the following error
./dlib-java java-jar
Error: no se ha encontrado el método principal en la clase com.github.radium226.dlib.DLib, defina el método principal del siguiente modo:\n public static void main(String[] args)\nde lo contrario, se deberá ampliar una clase de aplicación JavaFX javafx.application.Application
What is I doing wrong, the classes are downloaded from the project and followed step by step the same, could you help me? thank you
I detail my output in the command construction / dlib-java mvn-package
./dlib-java mvn-package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] DLib Parent
[INFO] DLib
[INFO] DLib Models
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building DLib Parent 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ dlib-parent ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building DLib 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ dlib ---
[INFO] Deleting /home/usuario/dlib_java/dlib-java-master/dlib/target
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (make-initialize) @ dlib ---
==> Creating directories
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (make-generate-sources) @ dlib ---
==> Generating Java sources using SWIG
- showcase
Language subdirectory: java
Search paths:
./
src/main/native/swig/
src/main/native/include/
./swig_lib/java/
/usr/share/swig3.0/java/
./swig_lib/
/usr/share/swig3.0/
Preprocessing...
Starting language-specific parse...
Processing types...
C++ analysis...
Processing nested classes...
Generating wrappers...
- dlib
Language subdirectory: java
Search paths:
./
src/main/native/swig/
src/main/native/include/
./swig_lib/java/
/usr/share/swig3.0/java/
./swig_lib/
/usr/share/swig3.0/
Preprocessing...
Starting language-specific parse...
Processing types...
C++ analysis...
Processing nested classes...
Generating wrappers...
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:add-source (generate-sources) @ dlib ---
[INFO] Source directory: /home/usuario/dlib_java/dlib-java-master/dlib/target/generated-sources/swig added.
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (make-generate-resources) @ dlib ---
==> Compiling source files to objects
- src/main/native/face_descriptor_computer.cpp to target/native/build/face_descriptor_computer.o
- src/main/native/showcase.cpp to target/native/build/showcase.o
- src/main/native/shape_predictor.cpp to target/native/build/shape_predictor.o
- src/main/native/face_detector.cpp to target/native/build/face_detector.o
- target/native/showcase_wrap.cpp to target/native/build/showcase_wrap.o
- target/native/dlib_wrap.cpp to target/native/build/dlib_wrap.o
==> Linking object files to shared library
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:add-resource (generate-resources) @ dlib ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ dlib ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ dlib ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 14 source files to /home/usuario/dlib_java/dlib-java-master/dlib/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ dlib ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 10 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ dlib ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/usuario/dlib_java/dlib-java-master/dlib/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ dlib ---
[INFO] Surefire report directory: /home/usuario/dlib_java/dlib-java-master/dlib/target/surefire-reports
T E S T S
Running com.github.radium226.dlib.FaceDescriptorComputerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.033 sec - in com.github.radium226.dlib.FaceDescriptorComputerTest
Running com.github.radium226.dlib.ShapePredictorTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.01 sec - in com.github.radium226.dlib.ShapePredictorTest
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 2
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ dlib ---
[INFO] Building jar: /home/usuario/dlib_java/dlib-java-master/dlib/target/dlib-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-shade-plugin:3.1.1:shade (default) @ dlib ---
[INFO] Including opencv:opencv:jar:3.4.1 in the shaded jar.
[INFO] Including tw.edu.sju.ee.eea.commons:commons-nativeutils:jar:1.0 in the shaded jar.
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing /home/usuario/dlib_java/dlib-java-master/dlib/target/dlib-1.0-SNAPSHOT.jar with /home/usuario/dlib_java/dlib-java-master/dlib/target/dlib-1.0-SNAPSHOT-shaded.jar
[INFO] Dependency-reduced POM written at: /home/usuario/dlib_java/dlib-java-master/dlib/dependency-reduced-pom.xml
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building DLib Models 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ dlib-models ---
[INFO] Deleting /home/usuario/dlib_java/dlib-java-master/dlib-models/target
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (make-generate-resources) @ dlib-models ---
wget --quiet "http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2" -O "./shape_predictor_68_face_landmarks.dat.bz2"
bzip2 --quiet --decompress --keep "./shape_predictor_68_face_landmarks.dat.bz2"
wget --quiet "http://dlib.net/files/shape_predictor_5_face_landmarks.dat.bz2" -O "./shape_predictor_5_face_landmarks.dat.bz2"
bzip2 --quiet --decompress --keep "./shape_predictor_5_face_landmarks.dat.bz2"
wget --quiet "http://dlib.net/files/dlib_face_recognition_resnet_model_v1.dat.bz2" -O "./dlib_face_recognition_resnet_model_v1.dat.bz2"
bzip2 --quiet --decompress --keep "./dlib_face_recognition_resnet_model_v1.dat.bz2"
rm shape_predictor_5_face_landmarks.dat.bz2 dlib_face_recognition_resnet_model_v1.dat.bz2 shape_predictor_68_face_landmarks.dat.bz2
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:add-resource (generate-resources) @ dlib-models ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ dlib-models ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ dlib-models ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/usuario/dlib_java/dlib-java-master/dlib-models/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ dlib-models ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/usuario/dlib_java/dlib-java-master/dlib-models/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ dlib-models ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ dlib-models ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ dlib-models ---
[INFO] Building jar: /home/usuario/dlib_java/dlib-java-master/dlib-models/target/dlib-models-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] DLib Parent ........................................ SUCCESS [ 0.533 s]
[INFO] DLib ............................................... SUCCESS [01:30 min]
[INFO] DLib Models ........................................ SUCCESS [05:25 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:56 min
[INFO] Finished at: 2019-02-27T18:58:14-03:00
[INFO] Final Memory: 21M/56M
[INFO] ------------------------------------------------------------------------
usuario@usuario-VirtualBox:~/dlib_java/dlib-java-master$
The text was updated successfully, but these errors were encountered: