When I try to build OpenCV for java on Ubuntu I got the following error:
[ 61%] Built target opencv_test_objdetect
Generating opencl_kernels.cpp, opencl_kernels.hpp
CMake Error at /home/dinhvantan/opencv/opencv/cmake/cl2cpp.cmake:50 (string):
string does not recognize sub-command MD5
make[2]: *** [modules/ocl/opencl_kernels.cpp] Error 1
make[1]: *** [modules/ocl/CMakeFiles/opencv_ocl.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 70%] Built target opencv_legacy
make: *** [all] Error 2
Could anyone tell me what I need to do resolve this problem?
This link suggests you need to upgrade to a newer CMake version.
You could either upgrade to a new Ubuntu release, or use a PPA, or build CMake from source.
Related
I'm trying to compile dlib for Android. My SO is Ubuntu 20.04. I followed this tutorial from https://github.com/tzutalin/dlib-android
I downloaded Android-NDK version r14b and unzipped it at /opt. When I run python3 build.py command, I get this error:
/bin/sh: 1: /opt/android-ndk-r14b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++: not found
/bin/sh: 1: /opt/android-ndk-r14b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++: not found
make: *** [/opt/android-ndk-r14b/build/core/build-binary.mk:530: obj/local/armeabi-v7a/objs/android_dlib/jni_imageutils.o] Error 127
make: *** Waiting for unfinished jobs....
/bin/sh: 1: /opt/android-ndk-r14b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++: not found
make: *** [/opt/android-ndk-r14b/build/core/build-binary.mk:530: obj/local/armeabi-v7a/objs/android_dlib/jni_pedestrian_det.o] Error 127
make: *** [/opt/android-ndk-r14b/build/core/build-binary.mk:530: obj/local/armeabi-v7a/objs/android_dlib/jni_face_det.o] Error 127
Build Error
Inspecting /opt/android-ndk-r14b, there is no linux-x86_64 under prebuild folder. The only directory there is darwin-x86_64.
I also tried with android-ndk-r21d, but I got another error:
/opt/android-ndk-r21d/build/core/add-application.mk:178: *** Android NDK: APP_STL gnustl_static is no longer supported. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information. . Stop.
Build Error
Can you help me?
You can look into this, https://github.com/Luca96/dlib-for-android/blob/master/setup.sh. I did not try on linux but if there are problems the link below could give some hints.
I used the powershell script with some modifications from the repo above and used dlib master from github to compile on windows. It copies files to given Android Studio folder when done. Latest modified script here, https://github.com/quickgrid/Setup-Guide/blob/master/dlib-android-setup.ps1.
I am trying to build openJDK8 in Solaris 10.
Solaris:
uname -a
o/p: SunOS xxxx 5.10 Generic_148889-05 i86pc i386 i86pc
I followed the steps mentioned in https://hg.openjdk.java.net/jdk8u/jdk8u/raw-file/tip/README-builds.html#solaris
Installed necessary packages to build openJDK such as Mercurial, gmake, freetype, cups and xRender from openCSW.
I've downloaded jdk8 from Mercurials and got source.
bash ./configure is success. After that when i run gmake all getting below error.
Making libjvm_db.so
Opening 'libjvm_db.so' for update
No SHF_ALLOC flags needed to be cleared.
Done with 'libjvm_db.so'
Computing CRC for 'libjvm_db.debuginfo'
Opening 'libjvm_db.so' for update
Adding ELF data for new section name
Adding ELF data for debug_info_path value
Saving updates to 'libjvm_db.so'
Done updating 'libjvm_db.so'
/usr/ccs/bin/nm: g1CollectedHeap.o: Format error: shdr table truncated
ld: warning: symbol '__JvmOffsets' has differing types:
(file JvmOffsets.o type=OBJT; file dtrace.o type=FUNC);
ld: warning: symbol 'CodeCache::_heap' has differing types:
(file codeCache.o type=OBJT; file dtrace.o type=FUNC);
ld: warning: symbol 'BufferBlob::__vtbl' has differing types:
(file codeBlob.o type=OBJT; file dtrace.o type=FUNC);
ld: fatal: file g1CollectedHeap.o: Format error: shdr table truncated
ld: fatal: file processing errors. No output written to libjvm.so
gmake[6]: *** [libjvm.so] Error 2
gmake[5]: *** [the_vm] Error 2
gmake[4]: *** [product] Error 2
gmake[3]: *** [generic_build2] Error 2
gmake[2]: *** [product] Error 2
gmake[1]: *** [/export/home/openjdk/build/solaris-x86_64-normal-server-release/hotspot/_hotspot.timestamp] Error 2
gmake: *** [hotspot-only] Error 2
Can anyone point out how to resolve this error.
I am trying to install OpenCV Java for Mac with homebrew, but CMake is giving me error during the process. The steps I have taken are as follows:
Installing CMake
Installing ant with: brew install ant
Changing the variable -DBUILD_opencv_java=OFF to ON
Installing OpenCV using: brew install --build-from-source opencv
Here is what gets printed to my terminal (error below):
==> Downloading https://github.com/opencv/opencv/archive/4.2.0.tar.gz
Already downloaded: /Users/gtalmor/Library/Caches/Homebrew/downloads/2606bd5bbd9d3231837dd3bc1f76c1a935cb4ce0eae9c2a472fd15c77dfbb510--opencv-4.2.0.tar.gz
==> Downloading https://github.com/opencv/opencv_contrib/archive/4.2.0.tar.gz
Already downloaded: /Users/gtalmor/Library/Caches/Homebrew/downloads/47ad25f9dd163b753420e122bad3928281696bdb5cd1c925fc90cf82e91ccda5--opencv_contrib-4.2.0.tar.gz
==> cmake .. -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG
==> make
Last 15 lines from /Users/gtalmor/Library/Logs/Homebrew/opencv/02.make:
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(gzip_stream.cc.o) has no symbols
/usr/bin/ranlib ../lib/liblibprotobuf.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(arenastring.cc.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(io_win32.cc.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(gzip_stream.cc.o) has no symbols
[ 26%] Built target libprotobuf
[ 26%] Linking CXX static library ../../../../../../lib/libmultiview.a
cd /tmp/opencv-20200203-6856-92bpyc/opencv-4.2.0/build/modules/sfm/src/libmv/libmv/multiview && /usr/local/Cellar/cmake/3.16.3/bin/cmake -P CMakeFiles/multiview.dir/cmake_clean_target.cmake
cd /tmp/opencv-20200203-6856-92bpyc/opencv-4.2.0/build/modules/sfm/src/libmv/libmv/multiview && /usr/local/Cellar/cmake/3.16.3/bin/cmake -E cmake_link_script CMakeFiles/multiview.dir/link.txt --verbose=1
/usr/bin/ar qc ../../../../../../lib/libmultiview.a CMakeFiles/multiview.dir/conditioning.cc.o CMakeFiles/multiview.dir/euclidean_resection.cc.o CMakeFiles/multiview.dir/fundamental.cc.o CMakeFiles/multiview.dir/fundamental_kernel.cc.o CMakeFiles/multiview.dir/homography.cc.o CMakeFiles/multiview.dir/panography.cc.o CMakeFiles/multiview.dir/panography_kernel.cc.o CMakeFiles/multiview.dir/projection.cc.o CMakeFiles/multiview.dir/robust_estimation.cc.o CMakeFiles/multiview.dir/robust_fundamental.cc.o CMakeFiles/multiview.dir/robust_resection.cc.o CMakeFiles/multiview.dir/triangulation.cc.o CMakeFiles/multiview.dir/twoviewtriangulation.cc.o
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../../../../../lib/libmultiview.a(robust_estimation.cc.o) has no symbols
/usr/bin/ranlib ../../../../../../lib/libmultiview.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../../../../../lib/libmultiview.a(robust_estimation.cc.o) has no symbols
[ 26%] Built target multiview
make: *** [all] Error 2
READ THIS: https://docs.brew.sh/Troubleshooting
Any idea what went wrong? I have seen posts of people with same issue and exact same error in different forums, but no one seem to have resolved it..
I have 32 bit R, Java, and Excel, yet XLConnect is still not installing. Here is the error info:
* installing *source* package 'XLConnectJars' ...
** package 'XLConnectJars' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: No CurrentVersion entry in Software/JavaSoft registry! Try re-
installing Java and make sure R and Java have matching architectures.
Error: loading failed
Execution halted
ERROR: loading failed for 'x64'
* removing 'C:/'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.3/bin/i386/R" CMD INSTALL -l
"C:\"
C:.../XLConnectJars_0.2-13.tar.gz' had status 1
Warning in install.packages :
installation of package ‘XLConnectJars’ had non-zero exit status
ERROR: dependency 'XLConnectJars' is not available for package 'XLConnect'
* removing 'C:/...3.2/XLConnect'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.3/bin/i386/R" CMD INSTALL -l
"C:\"
C:\.../XLConnect_0.2-13.tar.gz' had status 1
Warning in install.packages :
installation of package ‘XLConnect’ had non-zero exit status
I'm not sure what else could be causing this problem since everything is 32 bit
I get this error when i try to install thrift on Ubuntu 12.04.
I use ant 1.9.1 an install thrift 0.9.
when i try 'make' command i got this error.
Can anybody help me show this error. Thanks.
make all-recursive
make[1]: Entering directory /opt/thrift-0.9.0'
Making all in compiler/cpp
make[2]: Entering directory/opt/thrift-0.9.0/compiler/cpp'
make all-am
make[3]: Entering directory /opt/thrift-0.9.0/compiler/cpp'
make[3]: Nothing to be done forall-am'.
make[3]: Leaving directory /opt/thrift-0.9.0/compiler/cpp'
make[2]: Leaving directory/opt/thrift-0.9.0/compiler/cpp'
Making all in lib
make[2]: Entering directory /opt/thrift-0.9.0/lib'
Making all in cpp
make[3]: Entering directory/opt/thrift-0.9.0/lib/cpp'
Making all in .
make[4]: Entering directory /opt/thrift-0.9.0/lib/cpp'
make[4]: Nothing to be done forall-am'.
make[4]: Leaving directory /opt/thrift-0.9.0/lib/cpp'
Making all in test
make[4]: Entering directory/opt/thrift-0.9.0/lib/cpp/test'
make[4]: Nothing to be done for all'.
make[4]: Leaving directory/opt/thrift-0.9.0/lib/cpp/test'
make[3]: Leaving directory /opt/thrift-0.9.0/lib/cpp'
Making all in java
make[3]: Entering directory/opt/thrift-0.9.0/lib/java'
/opt/ant1.91/bin/ant
Buildfile: /opt/thrift-0.9.0/lib/java/build.xml
setup.init:
mvn.ant.tasks.check:
proxy:
mvn.ant.tasks.download:
[get] Getting: http://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
[get] To: /opt/thrift-0.9.0/lib/java/build/tools/maven-ant-tasks-2.1.3.jar
[get] Not modified - so not downloaded
mvn.init:
BUILD FAILED
/opt/thrift-0.9.0/lib/java/build.xml:282: artifact:pom doesn't support the "groupId" attribute
Total time: 1 second
make[3]: * [all-local] Error 1
make[3]: Leaving directory /opt/thrift-0.9.0/lib/java'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory/opt/thrift-0.9.0/lib'
make[1]: [all-recursive] Error 1
make[1]: Leaving directory `/opt/thrift-0.9.0'
make: ** [all] Error 2
This error is caused by Apache Ant 1.9.x. Refer to [1] for more info.
Remove apache ant, and reinstall with version 1.8.x [2]
# sudo apt-get remove ant
# tar -jxvf http://archive.apache.org/dist/ant/source/apache-ant-1.8.4-src.tar.bz2
# cd apache-ant-1.8.4/
# sed -i 's;jars,test-jar;jars;' build.xml
# sudo mkdir /opt/ant-1.8.4
# sudo ./build.sh -Ddist.dir=/opt/ant-1.8.4 dist
# sudo ln -v -sfn ant-1.8.4 /opt/ant
Configure thrift [3]
# export PATH=$PATH:/opt/ant/bin
# export ANT_HOME=/opt/ant
# PYTHON=/usr/bin/python2 ./configure --prefix=/usr --without-ruby
# make
# sudo make install
I am using thrift 0.9.1 on Ubuntu 12.04 and I found the same problem occurred regardless of ant 1.8.4 or 1.9.4:
...artifact:pom doesn't support the "groupId" attribute
What really helped was this suggestion: http://wiki.apache.org/cassandra/RunningCassandraInEclipse#artifact:pom_error
You have to ensure the maven-ant-tasks-2.1.3.jar file is in the lib directory for the active version of ant you are using.