Ask Your Question
0

Unable to cross compiling OpenCV based application program(face detection) for RISCV architecture

asked 2019-01-24 23:01:23 -0600

I have cross compiled OpenCV library to support multi core execution with "-DWITH_OPENMP=ON" option, cmake was built successfully but when i am going to cross compiling OpenCV applications (face detection) I am getting some errors.

Error:

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_ml.a when searching for -lopencv_ml

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_videostab.a when searching for -lopencv_videostab

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_stitching.a when searching for -lopencv_stitching

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_calib3d.a when searching for -lopencv_calib3d

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_shape.a when searching for -lopencv_shape

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_objdetect.a when searching for -lopencv_objdetect

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_features2d.a when searching for -lopencv_features2d

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_flann.a when searching for -lopencv_flann

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_superres.a when searching for -lopencv_superres

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_highgui.a when searching for -lopencv_highgui

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_videoio.a when searching for -lopencv_videoio

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_imgcodecs.a when searching for -lopencv_imgcodecs

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_photo.a when searching for -lopencv_photo

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_video.a when searching for -lopencv_video

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_imgproc.a when searching for -lopencv_imgproc

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_core.a when searching for -lopencv_core

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/share/OpenCV/3rdparty/lib/libzlib.a when searching for -lzlib

/usr/bin/ld: cannot find -lzlib

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/share/OpenCV/3rdparty/lib/liblibjpeg.a when searching for -llibjpeg

/usr/bin/ld: cannot find -llibjpeg

/usr/bin/ld: skipping incompatible /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux /riscv_build/install/share/OpenCV/3rdparty/lib/liblibwebp.a when searching for -llibwebp

/usr/bin/ld: cannot find ... (more)

edit retag flag offensive close merge delete

Comments

Looks like your OpenCV build was wrong, maybe it was not cross-compiled. You should check cmake output and verify compiler/libraries/sysroot. Did you use cmake toolchain file?

mshabunin gravatar imagemshabunin ( 2019-01-25 05:06:41 -0600 )edit

OpenCV cross compiled successfully with riscv cmake toolchain, but when i am executing OpenCV application I am getting above mentioned errors.

Command which I used to cross compiling OpenCV library: 1.$ cmake -DCMAKE_TOOLCHAIN_FILE=../riscv.toolchain.cmake ../../.. -DWITH_PNG=OFF -DWITH_OPENEXR=OFF -DWITH_OPENMP=ON -DBUILD_OPENEXR=OFF -DBUILD_opencv_dnn=OFF -DBUILD_ZLIB=ON -DBUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_EXE_LINKER_FLAGS="-static" 2. $ make -j8 3. $ make install These all steps are successfully done. Please can any one help me above mentioned error. Thanks in advance

Billa Surendra gravatar imageBilla Surendra ( 2019-01-26 04:40:35 -0600 )edit

In above command if I am trying to disable -DWITH_OPENCL=OFF and I am trying to enable -DWITH_OPENMP=ON but with this option my cross compilation for RISC-V was not successful.

Billa Surendra gravatar imageBilla Surendra ( 2019-01-28 00:19:34 -0600 )edit

Thanks for helping me, my problem solved by adding --static -lzlib when cross compiling OpenCV application.

Billa Surendra gravatar imageBilla Surendra ( 2019-02-12 02:59:52 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-02-12 03:00:20 -0600

Thanks for helping me, my problem solved by adding --static -lzlib when cross compiling OpenCV application.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-01-24 23:01:23 -0600

Seen: 628 times

Last updated: Feb 12 '19