4

While porting a build script to Windows I noticed that I can not call make with the parallel build option -j from within python:

subprocess.call("make -j4 -f Makefile.win32 target".split())

This is on a Windows 7 (in a VM), with Python 3.4.2 (or 2.7.8), GNU Make 3.81 from MinGW. Make itself calls cl.exe to compile about 40 C-files. When killing the offending make.exe in the Taskmanager, this is the output:

make: *** [target] Error 1
make: INTERNAL: Exiting with 1 jobserver tokens available; should be 4!
4ae1e1
  • 7,228
  • 8
  • 44
  • 77
toting
  • 629
  • 3
  • 14
  • I don't know the answer, but I've had similar problems: http://stackoverflow.com/questions/27687479/paralellizing-svn-up-causing-client-freeze – thebjorn Jan 20 '15 at 09:12
  • "Further testing showed that the shell does not make a difference at all." Okay, then don't talk about all those confusing stuff that seem to imply that shell is the culprit. Get to the core of the question immediately. – 4ae1e1 Feb 17 '15 at 05:05
  • Does it work if you call it from the command line rather than from with Python? – theherk Apr 30 '15 at 00:38
  • @TheHerk: running it via a cmd.exe shell works (IIRC) – toting May 21 '15 at 12:30
  • On an off-chance: try passing close_fds=True to subprocess.call() – user2722968 Dec 23 '16 at 17:22

0 Answers0