Ask Your Question
4

Cannot compile OpenCV 3.0

asked 2014-08-23 06:20:36 -0600

Oscanto gravatar image

updated 2014-08-23 06:27:49 -0600

berak gravatar image

Hello,

I downloaded OpenCV 3.0 from this website, and after the cmake step, I obtain an an error during the make step, here it is:

Linking CXX shared library ....\bin\libopencv_core300.dll c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lRunTmChk collect2.exe: error: ld returned 1 exit status modules\core\CMakeFiles\opencv_core.dir\build.make:1257: recipe for target 'bin/libopencv_core300.dll' failed mingw32-make[2]: * [bin/libopencv_core300.dll] Error 1 CMakeFiles\Makefile2:1325: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed mingw32-make[1]: [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 Makefile:136: recipe for target 'all' failed mingw32-make: ** [all] Error 2

I'm under Windows7 64bits, and using mingw32 4.8.1

I have no idea of what is -lRunTmChk, so any help would be greatful...

Also, I have to add that I can compile OpenCV 2.4.9 without any problem.

Any suggestion?

edit retag flag offensive close merge delete

Comments

I have the same problem. I'm running Windows7 32 bits.

First i get the following warning:

[ 31%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.obj C:\opencv3alfa\opencv\sources\modules\core\src\system.cpp: In function 'BOOL cv::DllMain(HINSTANCE, DWORD, LPVOID)': C:\opencv3alfa\opencv\sources\modules\core\src\system.cpp:918:13: warning: no previous declaration for 'BOOL cv::DllMain(HINSTANCE, DWORD, L PVOID)' [-Wmissing-declarations] BOOL WINAPI DllMain(HINSTANCE, DWORD fdwReason, LPVOID lpReserved) ^

then:

[ 31%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/tables.cpp.obj [ 32%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/types.cpp.obj

Miguel Lorenzo gravatar imageMiguel Lorenzo ( 2014-09-21 13:13:59 -0600 )edit

[ 32%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/umatrix.cpp.obj [ 32%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/opencl_kernels_core.cpp.obj Linking CXX shared library ....\bin\libopencv_core300.dll c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lRunTmChk collect2.exe: error: ld returned 1 exit status modules\core\CMakeFiles\opencv_core.dir\build.make:1260: recipe for target 'bin/libopencv_core300.dll' failed mingw32-make[2]: * [bin/libopencv_core300.dll] Error 1 CMakeFiles\Makefile2:1334: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed mingw32-make[1]: * [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 Makefile:135: recipe for target 'all' failed

Miguel Lorenzo gravatar imageMiguel Lorenzo ( 2014-09-21 13:20:03 -0600 )edit

mingw32-make: * [all] Error 2

Miguel Lorenzo gravatar imageMiguel Lorenzo ( 2014-09-21 13:20:39 -0600 )edit
4

RunTmChk is a msvc library erroneously linked to your mingw compiled library.

it'skinda a 'known bug' related to the ipp addition, - as long as the error prevails, you can't use IPP with mingw.

you could try to rerun cmake -DWITH_IPP=OFF (disable it)

berak gravatar imageberak ( 2014-09-21 13:22:54 -0600 )edit

Hello Guys,

I am getting same issue while building Intel's IPP and TBB with Opencv3.0 using Mingw on Windows machine. Here is the error screenshot and details. [https://software.intel.com/en-us/foru...] Kindly open this url to find more detail about this issue. Kindly, Let me know what steps should I take to remove this issue from root and I already tried below answers.

Thank you

Tushar Kachhadiya gravatar imageTushar Kachhadiya ( 2015-08-18 03:34:55 -0600 )edit

@tushar, you have to disable IPP if using mingw32. cmake -DWITH_IPP=OFF

(also, much better, if you ask your question here)

berak gravatar imageberak ( 2015-08-18 03:37:41 -0600 )edit

Hello

Thank you very much for quick response. I already tried it but,did not get success. Even, I tried to compile TBB alone with opencv though it was throwing same error.

Tushar Kachhadiya gravatar imageTushar Kachhadiya ( 2015-08-18 04:02:43 -0600 )edit

C:\opencv\sources\modules\core\src\system.cpp: In function 'BOOL cv::DllMain(HIN STANCE, DWORD, LPVOID)': C:\opencv\sources\modules\core\src\system.cpp:918:13: warning: no previous decla ration for 'BOOL cv::DllMain(HINSTANCE, DWORD, LPVOID)' [-Wmissing-declarations]

BOOL WINAPI DllMain(HINSTANCE, DWORD fdwReason, LPVOID lpReserved) ^ [ 32%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/tables.cp p.obj [ 32%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/types.cpp .obj [ 32%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/umatrix.c pp.obj [ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/opencl_kernel s_core.cpp.obj Linking CXX shared library ....\bin\libopencv_core300.dll

Tushar Kachhadiya gravatar imageTushar Kachhadiya ( 2015-08-18 04:13:28 -0600 )edit

CMakeFiles\opencv_core.dir/objects.a(parallel.cpp.obj):parallel.cpp:(.text$_ZN3t bb10interface78internal9start_forINS_13blocked_rangeIiEEN12_GLOBAL__N_113ProxyLo opBodyEKNS_16auto_partitionerEED2Ev+0x2): undefined reference to vtable for tbb ::task' CMakeFiles\opencv_core.dir/objects.a(parallel.cpp.obj):parallel.cpp:(.text$_ZN3t bb10interface78internal9flag_taskD1Ev[__ZN3tbb10interface78internal9flag_taskD1E v]+0x2): undefined reference tovtable for tbb::task' c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: CMakeFiles \opencv_core.dir/objects.a(parallel.cpp.obj): bad reloc address 0x2 in section ` .text$_ZN3tbb10interface78internal9flag_taskD1Ev[__ZN3tbb10interface78internal9f lag_taskD1Ev]'

Tushar Kachhadiya gravatar imageTushar Kachhadiya ( 2015-08-18 04:14:15 -0600 )edit

collect2.exe: error: ld returned 1 exit status modules\core\CMakeFiles\opencv_core.dir\build.make:1233: recipe for target 'bin/ libopencv_core300.dll' failed mingw32-make[2]: * [bin/libopencv_core300.dll] Error 1 CMakeFiles\Makefile2:1325: recipe for target 'modules/core/CMakeFiles/opencv_cor e.dir/all' failed mingw32-make[1]: [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 Makefile:136: recipe for target 'all' failed mingw32-make: ** [all] Error 2

I got this error while building only TBB with Opencv 3.0.

Thanks

Tushar Kachhadiya gravatar imageTushar Kachhadiya ( 2015-08-18 04:15:01 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2015-05-20 07:52:59 -0600

ker gravatar image

In the Cmake GUI you can uncheck the checkbox for WITH_IPP.

edit flag offensive delete link more
1

answered 2015-05-01 05:46:32 -0600

Lightsolver gravatar image

updated 2015-05-01 06:00:52 -0600

Simply remove ippicv from opencv\sources\3rdparty before using cmake, if you read the log it disables ipp (the folder contains the vc version) or turn IPP off in cmakelists.txt

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-08-23 06:20:36 -0600

Seen: 34,389 times

Last updated: May 01 '15