Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

Problem building tbb using mingw for windows 7

asanka424
Beginner
573 Views
Hi,
I followed instructrions and built tbb using mingw. But when I try to build opencv with tbb support it failes to build libraries saying undefined reference to some tbb::s.

I tried to build examples which are provided by tbb and that also fails with same undefined reference error.

I have set my PATH variable to path where tbb.dll exist. Could someone point out what am I doing wrong here.

Thanks.
Asanka
0 Kudos
7 Replies
Vladimir_P_1234567890
573 Views
HiAsanka,

did you build tbb by mingw compiler from sources?
if yes which versions and architectures ofTBB andMinGW compilerdo you use?


--Vladimir
0 Kudos
asanka424
Beginner
573 Views
Hi Vladimir,
Thank you for the quick repsponsce. Yes I did build it using mingw from sources.

Versions of TBB I tried was TBB30 and TBB40. Mingw was always 4.5. I tried it in my both laptops which have intel core2duo and intele core i3. Thesea are the commands I used

for core2duo

mingw32-make compiler=gcc arch=ia32 runtime=mingw

for i3

mingw32-make compiler=gcc arch=ia64 runtime=mingw

Do you have TBB for different architectures? Precompiled TBB binaries worked fine when I use visual studio to build opencv.

Thanks

Asanka
0 Kudos
Vladimir_P_1234567890
573 Views
the second command should be
mingw32-make compiler=gcc arch=intel64 runtime=mingw
if you build for intel64 system. and environemnt for gcc 64-bit compiler should be setup.
Does the %PATH% and %LIB% point to mingw folder?
--Vladimir
0 Kudos
asanka424
Beginner
573 Views
So command for my core2duo is correct. right?

I have set my PATH variable to point release folter of TBB. I don't have a LIB variable. Did you mean TBB folder by saying mingw folder?

0 Kudos
asanka424
Beginner
573 Views
Got it working now. Problem was with mingw. The destribution I download and installed didn't work. I used the one comes with the QtSDK and it worked perfectly.

Thanks
Asanka
0 Kudos
Tushar_Kachhadiya
573 Views

Hi Vladimir

I got an issue with Intel's IPP and TBB compilation in my station. I am trying to compile OpenCV 3.0 with Mingw4.8.1 using Cmake GUI 3.1. I have installed Intel's System Studio in my station. Also, I have set that option in Cmake WITH_IPP and WITH_TBB ON while configuring and generating source code of opencv for build but, It was not building successfully. I need your help to sort out this issue.

I used following version of IPP and TBB.

IPP : 8.2.1

TBB : 4.3 interface 8005

Following error I got while building source code.

builderror.jpg

Thank you,

Tushar Kachhadiya

 

0 Kudos
Vladimir_P_1234567890
573 Views

hello,

1. pls first try to build without tbb/ipp. I see that build fails somewhere in opencv internals.

2. if (1) does not help try to use Intel System Studio (create symlink for example). I have doubts that mingw's make work with spaces

--Vladimir

0 Kudos
Reply