I am unable to cross compiling RedEyeremoval OpenCV application.

asked 2019-01-29 02:24:40 -0500

I have cross compiled OpenCV library to get OpenMP support to run on RISCV processor multiple cores(cross compiling OpenCV library was successful). But while cross compiling RedEyeRemoval application for RISCV, I am getting errors. Please can anyone please tell me why I am getting error and what is the solution for below mentioned error.

Command used for cross compiling OpenCV Library for RISCV: 1.$ cmake -DCMAKE_TOOLCHAIN_FILE=../riscv.toolchain.cmake ../../.. -DWITH_PNG=OFF -DWITH_OPENEXR=OFF -DBUILD_OPENEXR=OFF -DBUILD_opencv_dnn=OFF -DBUILD_ZLIB=ON -DWITH_OPENMP=ON -DWITH_OPENCL=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_EXE_LINKER_FLAGS="--static" 2. $ make -j8 3.$ make install

Command used for cross compiling OpenCV applications for RISCV 1.make (I am running below makefile, after running make file I am getting errors) makefile: CXX =riscv64-unknown-linux-gnu-g++ CXXFLAGS += -c -Wall $(shell pkg-config --cflags /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/pkgconfig/opencv.pc) LDFLAGS += $(shell pkg-config --libs --static /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/pkgconfig/opencv.pc) all: removeRedEyes removeRedEyes: removeRedEyes.o; $(CXX) $< -o $@ $(LDFLAGS)%.o: %.cpp; $(CXX) $< -o $@ $(CXXFLAGS) clean: ; rm -f removeRedEyes.o removeRedEyes

Error Details: /home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_core.a(parallel.cpp.o): In function .L0 ': parallel.cpp:(.text._ZL17parallel_for_implRKN2cv5RangeERKNS_16ParallelLoopBodyEd._omp_fn.0+0x32): undefined reference toGOMP_loop_dynamic_start'

/home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_core.a(parallel.cpp.o): In function .L44': parallel.cpp:(.text._ZL17parallel_for_implRKN2cv5RangeERKNS_16ParallelLoopBodyEd._omp_fn.0+0x112): undefined reference toGOMP_loop_dynamic_next'

/home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_core.a(parallel.cpp.o): In function .L47': parallel.cpp:(.text._ZL17parallel_for_implRKN2cv5RangeERKNS_16ParallelLoopBodyEd._omp_fn.0+0x11c): undefined reference toGOMP_loop_end_nowait'

/home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_core.a(parallel.cpp.o): In function .L0 ': parallel.cpp:(.text._ZL17parallel_for_implRKN2cv5RangeERKNS_16ParallelLoopBodyEd._omp_fn.0+0x152): undefined reference toGOMP_loop_dynamic_next' parallel.cpp:(.text._ZN2cv13parallel_for_ERKNS_5RangeERKNS_16ParallelLoopBodyEd+0x19e): undefined reference to `GOMP_parallel'

/home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_core.a(parallel.cpp.o): In function cv::getThreadNum()': parallel.cpp:(.text._ZN2cv12getThreadNumEv+0x0): undefined reference toomp_get_thread_num'

/home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_core.a(parallel.cpp.o): In function cvGetThreadNum': parallel.cpp:(.text.cvGetThreadNum+0x0): undefined reference toomp_get_thread_num'

/home/billa/RISCV/OpenCV_multi_core_support/opencv-3.4.1/platforms/linux/riscv_build/install/lib/libopencv_core.a(parallel.cpp.o): In function .L0 ': parallel.cpp:(.text.startup._GLOBAL__sub_I_parallel.cpp+0x26): undefined reference toomp_get_max_threads' collect2: error: ld returned 1 exit status Makefile:9: recipe for target 'removeRedEyes' failed make: * [removeRedEyes] Error 1

edit retag flag offensive close merge delete