MinGW and TBB installation

60 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Quoting Alexey Kukanov (Intel)

Well, I don't know what could be wrong with running mingw32-make on Windows 7. I tried it on my workstation, all went just fine. I don't remember if you tried another make utility - if yes, was it any different?

But anyway you should not be blocked by that, as you don't have to recompile TBB on exactly the same machine where you plan to run your app. Just copy the binaries to that machine, set up the environment properly, and you should be fine.

I tried to make TBB on Windows 7 from package tbb30_20100406oss_src.tgz with mingw32-make (GNU Make 3.81)

with this command:

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

It just hangs and prints nothing. According to Process Explorer the procedure hangs on attempt to execute

c:\Windows\system32\cmd.exe c:/ mkdir .\build\windows_ia32_gcc_mingw_release

It is definitely wrong command because of c:/ parameter. I investigated the issue a bit and it seems to be the problem in $(shell ...) function. It transforms "cmd /c mkdir" to "c:\Windows\system32\cmd.exe c:/ mkdir" by some reason. I tried to remove "cmd /c" from makefile's but got another errors.

Same issue on Windows 2003.

Solved!!! Just remove sh.exe from all paths in %PATH%.

I found this thread as I was searching for the same thing (mingw-w64 support)... Too bad.

Roughly speaking, how big a job is that (assuming strong kung fu)?

Hi, I'm new.

I have compiled the library.
I'm on windows and trying to setup this in eclipse cdt.

how exactly do i set cpath and library_path?(I did it via Properties>Environment>Add (i know this isnt eclipse forum))

visual aid: http://postimage.org/image/gav5aivaz/

Thanks

have you added tbb.dll to your link command line?

--Vladimir

I know this thread is older now but I'm still hoping someone can point me in the right direction. I'm hoping to compile tbb with mingw32 as well. As far as I can tell everything built just fine however I'm not seeing any .a or .so files get generated. Is this expected? For the visual c version there's a .lib file and in linux there is a library as well, but of course I just installed that with the package manager.

hello, for MinGW you need to link with dll:)

--Vladimir

I'm glad this topic was resurrected recently as it saves me apologising for doing so :)

I'm trying to compile the latest stable release (tbb42_20131003oss) under mingw-w64 with MSYS.

My mingw is from here https://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.1/64-bit/threads-win32/seh/ - the rev5 version.

My MSYS is from here https://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/ - the rev13 package.

My build command for TBB is "make arch=ia32 compiler=gcc runtime=mingw SHELL=/bin/sh"

I've run into the exact same issue as others on this thread with the "mkdir" target - where there should be a /c on the resulting cmd command line, this is somehow translated to c:/, causing a hang.

I fixed this by simply removing the mkdir commands and making the directories manually.

Now my error is:

make -C ".\\build\\windows_ia32_gcc_mingw64_debug"  -r -f ../../build/Makefile.t
bb cfg=debug
'\"cscript /nologo /E:jscript ../../build/detect.js /minversion gcc 4.4\""' is not recognized as an internal or external command, operable program or batch file.
make[1]: Entering directory `/c/Users/user/dev/tbb42_20131003oss/build/windows_ia32_gcc_mingw64_debug'
../../build/Makefile.tbb:39: CONFIG: cfg=debug arch=ia32 compiler=gcc target=windows runtime=mingw64
g++ -o concurrent_queue.o -c -MMD -g -O0 -DTBB_USE_DEBUG -DUSE_WINTHREAD -D_WIN32_WINNT=0x0502 -DMINGW_HAS_SECURE_API=1 -D__MSVCRT_VERSION__=0x0700 -msse -mthreads -m32 -march=i686  -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-uninitialized   -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_queue.cpp
'ml' is not recognized as an internal or external command, operable program or batch file.
../../build/common_rules.inc:85: recipe for target `concurrent_queue.o' failed
make[1]: *** [concurrent_queue.o] Error 1
make[1]: Leaving directory `/c/Users/user/dev/tbb42_20131003oss/build/windows_ia32_gcc_mingw64_debug'
Makefile:40: recipe for target `tbb' failed
make: *** [tbb] Error 2

I note the failure to execute detect.js, which is similar to the failure to execute the same thing if you don't disable auto-detection of the runtime by specifying it explicitly.

I also note the user above who said his problem was solved by ensuring sh was not anywhere in %PATH% - I don't believe it is for me.

One other thing, if I run the g++ command in isolation in the appropriate directory, it works fine, so hopefully it's just the detect.js call which needs fixing.

OK I have a successful build. I was taking a slightly wrong approach.

Instead of building under MSYS, I did the following:

1) Ensure c:\mingw-w64 (or whatever) is part of %PATH%

2) Use PowerShell!!!! Not cmd.exe, not sh.exe, not bash.exe. PowerShell. As a primarily Linux developer this was completely non-obvious to me.

3) Run mingw32-make.exe compiler=gcc

I can't find instructions on doing this anywhere - perhaps a good thing to add to the current docs?

I used to build there in this way under cmd.exe. I'm not sure where it still works

mingw32-make.exe compiler=gcc SHELL=cmd.exe

--Vladimir

Pages

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui