Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Building OpenCV with IPP 7 via CMAKE and Eclipse

Thomas_Bause
Beginner
503 Views
Hi There

I am trying to build OpenCV 2.3 with IPP Version 7 for Windows using CMAKE (version 2.8.6, 32Bit) on Windows 7 64bit system. My compiler is GCC/G++ via MinGW 64 (version 4.6.2). I created the make files via CMAKE and Eclipse CDT4/MinGW which seemed to have worked fine. Unfortunately when I execute the make file in Eclipse Indigo I receive fatal errors once I reach the IPP libs.

Error messages below:

undefined reference to `__GSHandlerCheck'

This seems to be a Mircosoft security mechanism to protect from exploits thru buffer overflows and specific to MS Visual Studio (Compiler switch /GS). Am I mixing things here which can't be mixed or is there a work around?

Did somebody experience this before or could somebody help me to overcome this issue?

Many thanks in advance

Eclipse Console output below:



C:\\mingw64\\bin\\ar.exe cr CMakeFiles\\opencv_core.dir/objects.a @CMakeFiles\\opencv_core.dir\\objects1.rsp
C:\\mingw64\\bin\\g++.exe -shared -o ..\\..\\bin\\libopencv_core230.dll -Wl,--out-implib,..\\..\\lib\\libopencv_core230.dll.a -Wl,--major-image-version,2,--minor-image-version,3 -Wl,--whole-archive CMakeFiles\\opencv_core.dir/objects.a -Wl,--no-whole-archive -LD:\\Development\\Intel\\ipp\\lib\\intel64 -Wl,-Bstatic -lippvm_l -lippcc_l -lippcv_l -lippi_l -lipps_l -lippcore_l ..\\..\\3rdparty\\lib\\libzlib.a -Wl,-Bdynamic -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(m7/picopyca/picopyca_split_m7_ippiSet_8u_C1R.obj):(.text[m7_ippiSet_8u_C1R]+0xf5): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(m7/picopyca/picopyca_split_m7_ippiSet_8u_C1R.obj):(.text[m7_ippiSet_8u_C1R]+0x115): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(m7/picopyca/picopyca_split_m7_ippiSet_8u_C1R.obj):(.text[m7_ippiSet_8u_C1R]+0x138): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(m7/picopyca/picopyca_split_m7_ippiSet_8u_C1R.obj):(.xdata+0x18): undefined reference to `__GSHandlerCheck'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(u8/picopyca/picopyca_split_u8_ippiSet_8u_C1R.obj):(.text[u8_ippiSet_8u_C1R]+0xf5): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(u8/picopyca/picopyca_split_u8_ippiSet_8u_C1R.obj):(.text[u8_ippiSet_8u_C1R]+0x115): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(u8/picopyca/picopyca_split_u8_ippiSet_8u_C1R.obj):(.text[u8_ippiSet_8u_C1R]+0x138): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(u8/picopyca/picopyca_split_u8_ippiSet_8u_C1R.obj):(.xdata+0x18): undefined reference to `__GSHandlerCheck'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(y8/picopyca/picopyca_split_y8_ippiSet_8u_C1R.obj):(.text[y8_ippiSet_8u_C1R]+0xf5): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(y8/picopyca/picopyca_split_y8_ippiSet_8u_C1R.obj):(.text[y8_ippiSet_8u_C1R]+0x115): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(y8/picopyca/picopyca_split_y8_ippiSet_8u_C1R.obj):(.text[y8_ippiSet_8u_C1R]+0x138): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(y8/picopyca/picopyca_split_y8_ippiSet_8u_C1R.obj):(.xdata+0x18): undefined reference to `__GSHandlerCheck'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(e9/picopyca/picopyca_split_e9_ippiSet_8u_C1R.obj):(.text[e9_ippiSet_8u_C1R]+0xf5): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(e9/picopyca/picopyca_split_e9_ippiSet_8u_C1R.obj):(.text[e9_ippiSet_8u_C1R]+0x115): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(e9/picopyca/picopyca_split_e9_ippiSet_8u_C1R.obj):(.text[e9_ippiSet_8u_C1R]+0x138): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(e9/picopyca/picopyca_split_e9_ippiSet_8u_C1R.obj):(.xdata+0x18): undefined reference to `__GSHandlerCheck'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(m7/picopyca/picopyca_split_m7_ippiSet_16s_C1R.obj):(.text[m7_ippiSet_16s_C1R]+0xce): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(m7/picopyca/picopyca_split_m7_ippiSet_16s_C1R.obj):(.text[m7_ippiSet_16s_C1R]+0xea): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(m7/picopyca/picopyca_split_m7_ippiSet_16s_C1R.obj):(.text[m7_ippiSet_16s_C1R]+0x109): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(m7/picopyca/picopyca_split_m7_ippiSet_16s_C1R.obj):(.xdata+0x10): undefined reference to `__GSHandlerCheck'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(u8/picopyca/picopyca_split_u8_ippiSet_16s_C1R.obj):(.text[u8_ippiSet_16s_C1R]+0xce): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(u8/picopyca/picopyca_split_u8_ippiSet_16s_C1R.obj):(.text[u8_ippiSet_16s_C1R]+0xea): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(u8/picopyca/picopyca_split_u8_ippiSet_16s_C1R.obj):(.text[u8_ippiSet_16s_C1R]+0x109): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(u8/picopyca/picopyca_split_u8_ippiSet_16s_C1R.obj):(.xdata+0x10): undefined reference to `__GSHandlerCheck'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(y8/picopyca/picopyca_split_y8_ippiSet_16s_C1R.obj):(.text[y8_ippiSet_16s_C1R]+0xce): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(y8/picopyca/picopyca_split_y8_ippiSet_16s_C1R.obj):(.text[y8_ippiSet_16s_C1R]+0xea): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(y8/picopyca/picopyca_split_y8_ippiSet_16s_C1R.obj):(.text[y8_ippiSet_16s_C1R]+0x109): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(y8/picopyca/picopyca_split_y8_ippiSet_16s_C1R.obj):(.xdata+0x10): undefined reference to `__GSHandlerCheck'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(e9/picopyca/picopyca_split_e9_ippiSet_16s_C1R.obj):(.text[e9_ippiSet_16s_C1R]+0xcd): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(e9/picopyca/picopyca_split_e9_ippiSet_16s_C1R.obj):(.text[e9_ippiSet_16s_C1R]+0xe8): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(e9/picopyca/picopyca_split_e9_ippiSet_16s_C1R.obj):(.text[e9_ippiSet_16s_C1R]+0x106): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(e9/picopyca/picopyca_split_e9_ippiSet_16s_C1R.obj):(.xdata+0x10): undefined reference to `__GSHandlerCheck'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(n8/picopyca/picopyca_split_n8_ippiSet_16s_C1R.obj):(.text[n8_ippiSet_16s_C1R]+0xcf): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(n8/picopyca/picopyca_split_n8_ippiSet_16s_C1R.obj):(.text[n8_ippiSet_16s_C1R]+0xec): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(n8/picopyca/picopyca_split_n8_ippiSet_16s_C1R.obj):(.text[n8_ippiSet_16s_C1R]+0x10c): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(n8/picopyca/picopyca_split_n8_ippiSet_16s_C1R.obj):(.xdata+0x10): undefined reference to `__GSHandlerCheck'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(n8/picopyca/picopyca_split_n8_ippiSet_8u_C1R.obj):(.text[n8_ippiSet_8u_C1R]+0xf6): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(n8/picopyca/picopyca_split_n8_ippiSet_8u_C1R.obj):(.text[n8_ippiSet_8u_C1R]+0x117): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(n8/picopyca/picopyca_split_n8_ippiSet_8u_C1R.obj):(.text[n8_ippiSet_8u_C1R]+0x13b): undefined reference to `__security_check_cookie'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ippi_l.lib(n8/picopyca/picopyca_split_n8_ippiSet_8u_C1R.obj):(.xdata+0x18): undefined reference to `__GSHandlerCheck'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ipps_l.lib(e9/psdftdfactg9e9cn/psdftdfactg9e9cn_split_e9_ipps_cDftFwd_Fact13_64fc.obj):(.text[e9_ipps_cDftFwd_Fact13_64fc]+0x7): undefined reference to `__chkstk'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ipps_l.lib(e9/psdftdfactg9e9cn/psdftdfactg9e9cn_split_e9_ipps_cDftFwd_Fact11_64fc.obj):(.text[e9_ipps_cDftFwd_Fact11_64fc]+0x7): undefined reference to `__chkstk'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ipps_l.lib(e9/psdftdfactg9e9cn/psdftdfactg9e9cn_split_e9_ipps_cDftInv_Fact13_64fc.obj):(.text[e9_ipps_cDftInv_Fact13_64fc]+0x7): undefined reference to `__chkstk'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ipps_l.lib(e9/psdftdfactg9e9cn/psdftdfactg9e9cn_split_e9_ipps_cDftInv_Fact11_64fc.obj):(.text[e9_ipps_cDftInv_Fact11_64fc]+0x7): undefined reference to `__chkstk'
Creating library file: ..\\..\\lib\\libopencv_core230.dll.a
D:\\Development\\Intel\\ipp\\lib\\intel64\\ipps_l.lib(e9/psdftsfactg9e9cn/psdftsfactg9e9cn_split_e9_ipps_cDftFwd_Fact13_32fc.obj):(.text[e9_ipps_cDftFwd_Fact13_32fc]+0x7): undefined reference to `__chkstk'
mingw32-make[2]: Leaving directory `D:/Development/OpenCV2.3/NativeBuild'
D:\\Development\\Intel\\ipp\\lib\\intel64\\ipps_l.lib(e9/psdftsfactg9e9cn/psdftsfactg9e9cn_split_e9_ipps_cDftFwd_Fact11_32fc.obj):(.text[e9_ipps_cDftFwd_Fact11_32fc]+0x7): more undefined references to `__chkstk' follow
collect2: ld returned 1 exit status
mingw32-make[1]: Leaving directory `D:/Development/OpenCV2.3/NativeBuild'
mingw32-make[2]: *** [bin/libopencv_core230.dll] Error 1
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
mingw32-make: *** [all] Error 2


0 Kudos
1 Reply
Ying_H_Intel
Employee
503 Views
Hi Thomas,

Considering the original problem, it may be the problem ofcomplex build environment.
for example, Cmake, Eclipse CDT4/MinGW, gcc++ and IPP for windows. As i recalled, therewas some problems to use IPP library for windows in MinGW/g++ in forum.
and IPP library for windows actually claims the supported compilers in system requirements. http://software.intel.com/en-us/articles/intel-ipp-70-library-system-requirements/

Intel64 for Microsoft* Windows* Compiler Compatibility

  • Intel Parallel Composer 2009 and 2011
  • Intel C++ Compiler for Windows* versions 11.1 and 12.0
  • Microsoft Visual Studio* 2010
  • Microsoft Visual Studio* 2008
  • Microsoft Visual Studio* 2005
  • Microsoft Windows Software Development Kit for Microsoft* Windows Vista
  • Microsoft Windows Software Development Kit for Microsoft* Windows 7

Soa good solution may be to use the compilers above.

But right, this seems to be a Mircosoft security mechanism to protect from exploits thru buffer overflows and specific to MS Visual Studio (Compiler switch /GS). generally, if you have to use g++, you may look into some ways to workaround it for example, find the library or obj file from msvc support library and link them and other ways for the error "undefined reference to".

Regards,
Ying
0 Kudos
Reply