Trying to cross compiling OpenCV library for RISCV architecture statically but i am getting errors
Trying to cross compiling OpenCV library for RISCV architecture statically but i am getting warning as well as errors.Please can any one suggest me what I want to do.Here I am Providing error deatils
Command for Cross Compiling
cmake -DCMAKE_TOOLCHAIN_FILE=../riscv.toolchain.cmake ../../.. -DWITH_PNG=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_EXE_LINKER_FLAGS="-static"
Errors:
../../lib/libopencv_core.a(opencl_core.cpp.o): In function .L19':
opencl_core.cpp:(.text._ZL15opencl_check_fni+0x13e): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/billa/Documents/riscv/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: attempted static link of dynamic object
/usr/local/lib/libz.so'
collect2: error: ld returned 1 exit status
apps/version/CMakeFiles/opencv_version.dir/build.make:96: recipe for target 'bin/opencv_version' failed
make[2]: * [bin/opencv_version] Error 1
CMakeFiles/Makefile2:4608: recipe for target 'apps/version/CMakeFiles/opencv_version.dir/all' failed
make[1]: [apps/version/CMakeFiles/opencv_version.dir/all] Error 2
make[1]: ** Waiting for unfinished jobs....
Thanks in Advance
try to disable opencl:
I have added -DWITH_OPENCL=OFF to my command but still it is giving the same error.