Ask Your Question
0

Trying to cross compiling OpenCV library for RISCV architecture statically but i am getting errors

asked 2018-08-01 05:19:39 -0600

updated 2018-08-01 05:28:02 -0600

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

edit retag flag offensive close merge delete

Comments

try to disable opencl:

cmake -DWITH_OPENCL=OFF
berak gravatar imageberak ( 2018-08-01 05:43:24 -0600 )edit

I have added -DWITH_OPENCL=OFF to my command but still it is giving the same error.

Billa Surendra gravatar imageBilla Surendra ( 2018-08-01 06:42:53 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-08-06 01:19:52 -0600

mshabunin gravatar image

First try to make a static build by setting -DBUILD_SHARED_LIBS=OFF, and not adding compiler options.

Second check this place for explicitly added linker libraries and try adding a branch specific for your configuration.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-08-01 05:19:39 -0600

Seen: 789 times

Last updated: Aug 06 '18