CaffeOnSpark
CaffeOnSpark copied to clipboard
Error when building [exec] src/main/cpp/jni/JniMat.cpp: In function ‘void Java_com_yahoo_ml_jcaffe_Mat_decode(JNIEnv*, jobject, jint, jlong)’: [exec] src/main/cpp/jni/JniMat.cpp:82:65: error: too many arguments to function ‘cv::Mat cv::imdecode(cv::InputArray, int)’
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /home/labuser/CaffeOnSpark/caffe-distri/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ caffe-distri --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 10 source files to /home/labuser/CaffeOnSpark/caffe-distri/target/classes [INFO] [INFO] --- maven-antrun-plugin:1.7:run (make) @ caffe-distri --- [INFO] Executing tasks
make:
[exec] make[1]: Entering directory `/home/labuser/CaffeOnSpark/caffe-distri'
[exec] javah -d include/jni -force -cp target/classes
[exec] com.yahoo.ml.jcaffe.MatVector
[exec] javah -d include/jni -force -cp target/classes
[exec] com.yahoo.ml.jcaffe.Mat
[exec] javah -d include/jni -force -cp target/classes
[exec] com.yahoo.ml.jcaffe.FloatBlob
[exec] javah -d include/jni -force -cp target/classes
[exec] com.yahoo.ml.jcaffe.FloatDataTransformer
[exec] javah -d include/jni -force -cp target/classes
[exec] com.yahoo.ml.jcaffe.FloatArray
[exec] javah -d include/jni -force -cp target/classes
[exec] com.yahoo.ml.jcaffe.CaffeNet
[exec] CXX src/main/cpp/jni/JniMatVector.cpp
[exec] CXX src/main/cpp/jni/JniMat.cpp
[exec] make[1]: *** [.build_release/src/main/cpp/jni/JniMat.o] Error 1
[exec] src/main/cpp/jni/JniMat.cpp: In function ‘void Java_com_yahoo_ml_jcaffe_Mat_decode(JNIEnv*, jobject, jint, jlong)’:
[exec] src/main/cpp/jni/JniMat.cpp:82:65: error: too many arguments to function ‘cv::Mat cv::imdecode(cv::InputArray, int)’
[exec] /usr/include/opencv2/highgui/highgui.hpp:136:18: note: declared here
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] caffe .............................................. SUCCESS [ 0.002 s]
[INFO] caffe-distri ....................................... FAILURE [ 17.266 s]
[INFO] caffe-grid ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.547 s
[INFO] Finished at: 2017-04-09T19:57:00-04:00
[INFO] Final Memory: 21M/455M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (make) on project caffe-distri: An Ant BuildException has occured: exec returned: 2
[ERROR] around Ant part ...
I got this error when building, i didn't find solution for this.
Your openCV version may not be compatible. We use openCV2.4, which is not compatible with 3.x.
Thanks, feedback. Actually, I install opencv3.x solve the problem. The previous one is openCV2.x install by using apt-get under ubuntu 12.04.