1

I want to use MINGW +tbb + opencv When I tried. The problem is I get error while running opencv test or some program. for example

test_job_automaton.exe - Entry Point Not Found

The procedure entry point __gxx_personality_v0 could not be located in the dynamic link library c:\tbb\build\windows_ia32_gcc_mingw4.9.1_debug\test_job_automaton.exe.

or

LIBFR.exe - Entry Point Not Found

The procedure entry point __gxx_personality_v0 could not be located in the dynamic link library D:\Dropbox\face sdks\QTprojects\build-libfr-Desktop_Qt_5_4_0_MinGW_32bit-Release\release\tbb.dll.

I run this command in tbb dir to build it

mingw32-make arch=ai32 compiler=gcc -j4

it builds 3 dlls ok, also building opencv with these dlls is ok, but running is not

I tried Mingw 4.9.1 and also 4.8.2

I found out that i should try to use g++ instead but for windows it is not supported when I tried it

I also tried to use mingw32 and mingw32-w64

The same error I get when I also try to build rml within tbb, so you do not have to try to install opencv to find out the problem.

To build rml I use this command

mingw32-make arch=ai32 compiler=gcc -j4 rml

I also tried 4 different version of tbb

Any ideas anybody?

Community
  • 1
  • 1

2 Answers2

0

The absence of __gxx_personality_v0 suggests that (as you mentioned) the program must be linked differently, e.g. via g++ which enables C++ exception handling and links C++ runtime. So the real problem is not with TBB but rather with your inability to use g++. With my installation of MinGW, it works fine. And if you are able to build TBB, it also supposes that g++ works since it is used to build TBB.

For example, you can see how g++ is used when TBB and a test are compiled:

mingw32-make -rj compiler=gcc tbb test_task -C src

Also, I doubt you will ever need RML.

In the case when you really cannot enable RTTI and exception handling, you might experiment with building TBB without exceptions support:

mingw32-make -rj compiler=gcc clean tbb CXXFLAGS=-DTBB_USE_EXCEPTIONS=0
Community
  • 1
  • 1
Anton
  • 6,349
  • 1
  • 25
  • 53
  • yes I do not need RML, but the same error is there, so for debugging purpose, to help to find out where my error is. when I run g++ -v the gcc version shows up, also both times when I run it in standalone edition mingw32-w64 or the one downloaded with QT creator. Which version do you use? I will try that test – Andrej Fogelton Dec 27 '14 at 07:12
  • G++ is gcc, it's ok to see it says it is gcc. Just try replace gcc by g++ in your build commands – Anton Dec 27 '14 at 10:15
  • when I tried your proposal no rule to make test_task showed up – Andrej Fogelton Dec 27 '14 at 11:11
  • while trying to change gcc to g++ the following error shows up c:\tbb>mingw32-make -rj compiler=g++ rml mingw32-make -C ".\\build\\windows_unknown_g++_unknown_debug" -r -f ../../build /Makefile.rml cfg=debug mingw32-make[1]: Entering directory 'c:/tbb/build/windows_unknown_g++_unknown_de bug' ../../build/common.inc:95: *** "g++" is not supported on windows. Add build/wind ows.g++.inc file with compiler-specific settings. . Stop. mingw32-make[1]: Leaving directory 'c:/tbb/build/windows_unknown_g++_unknown_deb ug' makefile:50: recipe for target 'rml' failed mingw32-make: *** [rml] Error 2 – Andrej Fogelton Dec 27 '14 at 11:12
  • I forgot to add '-Csrc' to the command since individual tests are run from src/ folder – Anton Dec 27 '14 at 12:37
  • There is nothing wrong with original TBB build. `compiler=g++` is incorrect option for TBB makefile, it is not what I said. Build *your* app using g++, not TBB – Anton Dec 27 '14 at 12:41
  • thank you for your time, I run the test with the command, but I ended up with the same error --------------------------- test_task.exe - Entry Point Not Found --------------------------- The procedure entry point __gxx_personality_v0 could not be located in the dynamic link library c:\tbb\build\windows_ia32_gcc_mingw4.9.1_release\tbb.dll. --------------------------- OK --------------------------- – Andrej Fogelton Dec 27 '14 at 19:33
  • I use tbb with opencv, which I build using cmake, which detects correctly both gcc and g++, I do not think there is a mistake in that building process, Opencv library test throw that same error – Andrej Fogelton Dec 27 '14 at 19:38
  • Test failure is suspicious and it is the root of the problem. I'll think more about it. Try reinstalling mingw meanwhile and build and run the test – Anton Dec 27 '14 at 19:43
0

The problem was that the installation of GnuPG has also libstdc++-6.dll from different version of mingw, it was automatically added to my path, and make was using this dll instead of the one in the gcc directory, removing it from path made it all work, thank you for help