[Scons-users] Nuitka and Scons, questions, potential bugs, no Windows parallel build

Kay Hayen kay.hayen at gmail.com
Mon Nov 11 05:49:10 EST 2013


Hello,

I am the author of a Python compiler (see
http://nuitka.net/pages/overview.html in case you are interested) that
is a heavy user of Scons. Basically what i do is to create C++ and other
files, and then ask Scons to translate and do it for all kinds of
platforms and compilers. So far it has served me well.

You can see the scons file I am using here:
http://nuitka.net/gitweb/?p=Nuitka.git;a=blob;f=nuitka/build/SingleExe.scons;h=0707b76bb4c51f6a0c3c528b311c8d4e80acda32;hb=HEAD

Basically, I am doing some strange stuff, and I wanted your input on this.

First of all, for Windows, I am attempting to support MinGW and MSVC
both, which seems to not be allowed in one environment. Therefore I am
creating an environment with default tools, and then with mingw to see
if they work. Is that the best way to do it.

Second, for MSVC, it does outputs that I cannot prevent it seems. I
would appreciate warnings, but it does some information that I cannot
disable. Therefore "setupSpawn", where I basically filter the output myself.

Also there seemed to be problems with arguments that end in a backslash,
which paths frequently do, and in one case at least, MSVC requires it,
or else it won't use it as a directory.

For Linux and shared library creations, I noticed that the created ".so"
file is executable. When people do that, it segfaults of course. So
Nuitka has elsewhere code to remove the "x" bit. That seems like a bug
of scons, isn't it? I am not familar enough with "ld" and stuff, so I
can't tell if it's normal, but I doubt.

And the issue that makes me post here, is that I noticed that
compilation on Windows is not using the available cores. At first I was
considering it being related to batch mode or not, but it seems the same
for MinGW and with and without batch mode for MSVC. Searching I found
older posts, about the same problem.

Is there any limitation to this? I was naively thinking that I might
e.g. fork these processes into pipes, have threads communicate them as
necessary, and wait with "link" execution, until they are all finished,
and that ought to work. But one thing I always came across checking the
documentation is how Scons was supposed to be all about parallel build,
and it feels absurd to do it myself. I must be wrong somehow. Is it not
possible on Windows that easily, or is it me having my own spawn, what
is it :-)

Thanks in advance,
Kay




More information about the Scons-users mailing list