Open whit2333 opened 5 years ago
OpenCV seems to be compiled with Java 10.
CLARA and CLAS12 use Java 8.
Any idea how to fix this?
You'll probably have to compile OpenCV with a compatible Java version.
Here you have all the CMake options used to compile OpenCV in the CI:
Note that CMAKE_INSTALL_PREFIX
is set to $CLARA_HOME
for simplicity, you can keep it that way to see it work, but it is recommended to use an standard location or a directory like /opt/opencv3/
.
If a non-standard directory is used, it may be required to set the OpenCV install location as a Gradle property:
The same for C++, if CMake cannot find OpenCV, you should pass where OpenCV is installed with -DOpenCV_ROOT=<path>
(in the Travis build CMake finds OpenCV because it is installed in the same install prefix path).
You may want to ensure the Java 8 compiler is used (while Clara compiles with JDK 11, I do not know about OpenJDK).
The build passes and the Clara shell runs without issues:
https://travis-ci.org/JeffersonLab/clara-demo/builds/497325107
But all this is just for this example, and it is specified in build.gradle
/CMakeLists.txt
. (I couldn't think of anything else to demo services than OpenCV.) In your own services you should have control over your own dependencies and paths.
But all this is just for this example, and it is specified in build.gradle/CMakeLists.txt. (I couldn't think of anything else to demo services than OpenCV.) In your own services you should have control over your own dependencies and paths.
Could you make a c++ demo without any dependencies that does something trivial?
I have setup something (non functioning) here: https://github.com/whit2333/clara_cpp_test
Thanks for the tips for building opencv-3. Running this demo I get the same failure:
2019-06-30 20:24:16.369: Could not use 172.17.0.1 for processing: could not start container = 172.17.0.1%7650_cpp:whit
. Clara seems to hang at this point.
The full output is below:
Distribution : clara-cre-4.3.8
CLAS12 plugin : coatjava-5.9.0
==========================================
CLARA FE/DPE
==========================================
Name = 172.17.0.1%7640_java
Session = whit_clara
Start time = 2019-06-30 20:24:10
Version = 4.3
Lang = Java
Pool size = 2
Proxy Host = 172.17.0.1
Proxy Port = 7640
==========================================
=========================================
CLARA DPE
=========================================
Name = 172.17.0.1%7650_cpp
Date = 2019-06-30 20:24:11
Version = 4.3
Lang = C++
Proxy Host = 172.17.0.1
Proxy Port = 7650
FrontEnd Host = 172.17.0.1
FrontEnd Port = 7640
FrontEnd Lang = Java
=========================================
==========================================
CLARA Orchestrator
==========================================
Front-end = 172.17.0.1%7640_java
Start time = 2019-06-30 20:24:13
Threads = 2
Input directory = /mnt/old_home/whit/projects/clara/clara-demo/resources
Output directory = /mnt/old_home/whit/projects/clara/clara-demo
Output file prefix = out_
Number of files = 1
==========================================
2019-06-30 20:24:13.646: Waiting for local node...
2019-06-30 20:24:13.801: Start processing on 172.17.0.1...
2019-06-30 20:24:13.802: Searching services in 172.17.0.1...
2019-06-30 20:24:13.816: Deploying services in 172.17.0.1...
2019-06-30 20:24:14: started container = 172.17.0.1%7640_java:whit
2019-06-30 20:24:14: basic_string::_M_create
2019-06-30 20:24:14: started service = 172.17.0.1%7640_java:whit:DataManager pool_size = 1
2019-06-30 20:24:14: started service = 172.17.0.1%7640_java:whit:ImageReaderService pool_size = 1
using classifier: lbpcascade_frontalface.xml
2019-06-30 20:24:15: started service = 172.17.0.1%7640_java:whit:ImageWriterService pool_size = 1
2019-06-30 20:24:15: started service = 172.17.0.1%7640_java:whit:FaceDetectorService pool_size = 4
2019-06-30 20:24:16.369: Could not use 172.17.0.1 for processing:
could not start container = 172.17.0.1%7650_cpp:whit