sayo9394
sayo9394

Reputation: 485

scons is not building when using -j option

I really am not sure how to describe this issue. Building with scons -uj4 or scons -u -j4 had always worked, but recently it just stopped working!

running scons -uj4 or scons -u -j4 will return;

scons: Entering directory `/cygdrive/c/somedir'
scons: Reading SConscript files ...
scons: done reading SConscript files.

running scons -u will display;

scons: Entering directory `/cygdrive/c/somedir'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: target

I've spent so much time trying to figure it out, with no success.

Thanks in advance for you help :)

[EDIT]

Added more required info;

scons: script: v2.4.0.rel_2.4.0:3365:9259ea1c13d7, 2015/09/21 14:03:43, by bdbaddog on hpmicrodog
babun version 1.2.0
uname -a -> CYGWIN_NT-6.1-WOW 2.7.0(0.306/5/3) 2017-02-12 13:13 i686 Cygwin
python --version: Python 2.7.12

Some Sconscript optimisation...

....
AddOption('--optimise', dest='optimised', default=False, action='store_true', help='Optimise Win32 Build')
....
env.SetOption('implicit_cache', 1)
env.SetOption('max_drift', 5)
env.Decider('MD5-timestamp')

I Added some breakpoints in scons-2.4.0\SCons\Script\Main.py and found out that scons is crashing here: Job.py(365)init()

self.tp = ThreadPool(num, stack_size, self.interrupted)

Upvotes: 1

Views: 384

Answers (1)

sayo9394
sayo9394

Reputation: 485

Turns out this issue (not being able to parallel build with -j option) has nothing to do with Scons, it was caused by the company's antivirus, Trend Micro.

For some reason, Trend Micro does not allow cygwin's python to create any sub-processes! Currently, since Trend Micro is company policy (not allowed to uninstall) the work around is to use uninstall cygwin python and use Windows Python (or Anaconda). Others opted to use a Virtual Machine...

Thank you all.

Upvotes: 1

Related Questions