Re: [Scons-dev] Subprocess issue on Linux?

2014-04-06 Thread Dirk Bächle

Hi Jason,

On 05.04.2014 00:17, Kenny, Jason L wrote:


I think yes, in that it does what should be done by the system under 
posix_spawn.. ie call vfork and execve.


Here is the last version of the monkey patch I have from the people 
working on it. It has a fallback to the classic fork exec if the API's 
don't exists. It seems to solve the main speed problem for us at the 
moment. I believe it still being tested to find possible issues.




I tried to let SCons run with this patch, but I'm not able to integrate 
the patching of subprocess.Popen() successfully. I always get an import 
error for SCons.Util, and fail to see where this is actually coming from:


scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o d1_0/f0_sconsbld_d1_0.o -c -Id1_0/lup000_sconsbld_d1_0 
-Id1_0/lup001_sconsbld_d1_0 d1_0/f0_sconsbld_d1_0.c

Traceback (most recent call last):
  File 
/home/dirk/workspace/scons_dirkbaechle/src/engine/SCons/Platform/posix.py, 
line 42, in module

import SCons.Util
ImportError: No module named SCons.Util
scons: *** [d1_0/f0_sconsbld_d1_0.o] Error 1
scons: building terminated because of errors.

Does anybody have a clue and can give me a pointer? I'd like to compare 
the times for a clean build against the default sources.


Regards,

Dirk

___
Scons-dev mailing list
Scons-dev@scons.org
http://two.pairlist.net/mailman/listinfo/scons-dev


Re: [Scons-dev] Subprocess issue on Linux?

2014-04-06 Thread Leskinen, Eugene
Hi Dirk,

I am Eugene Leskinen and I am the stubprocess.py module author.
How do you import it?

From: scons-dev-boun...@scons.org [mailto:scons-dev-boun...@scons.org] On 
Behalf Of Dirk Bachle
Sent: Sunday, April 06, 2014 4:59 PM
To: scons-dev@scons.org
Subject: Re: [Scons-dev] Subprocess issue on Linux?

Hi Jason,

On 05.04.2014 00:17, Kenny, Jason L wrote:
I think yes, in that it does what should be done by the system under 
posix_spawn.. ie call vfork and execve.

Here is the last version of the monkey patch I have from the people working on 
it. It has a fallback to the classic fork exec if the API's don't exists. It 
seems to solve the main speed problem for us at the moment. I believe it still 
being tested to find possible issues.


I tried to let SCons run with this patch, but I'm not able to integrate the 
patching of subprocess.Popen() successfully. I always get an import error for 
SCons.Util, and fail to see where this is actually coming from:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o d1_0/f0_sconsbld_d1_0.o -c -Id1_0/lup000_sconsbld_d1_0 
-Id1_0/lup001_sconsbld_d1_0 d1_0/f0_sconsbld_d1_0.c
Traceback (most recent call last):
  File 
/home/dirk/workspace/scons_dirkbaechle/src/engine/SCons/Platform/posix.py, 
line 42, in module
import SCons.Util
ImportError: No module named SCons.Util
scons: *** [d1_0/f0_sconsbld_d1_0.o] Error 1
scons: building terminated because of errors.

Does anybody have a clue and can give me a pointer? I'd like to compare the 
times for a clean build against the default sources.

Regards,

Dirk


Closed Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park, 
17 Krylatskaya Str., Bldg 4, Moscow 121614, 
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
___
Scons-dev mailing list
Scons-dev@scons.org
http://two.pairlist.net/mailman/listinfo/scons-dev


Re: [Scons-dev] Subprocess issue on Linux?

2014-04-06 Thread Leskinen, Eugene
I have just place the stubprocess.py to 
/opt/python27/lib/scons-2.1.0/SCons/Platform/ directory and added 'import 
stubprocess' statement to SCons.Platfrom.posix module just after import 
subprocess:
--- /opt/python27/lib/scons-2.1.0/SCons/Platform/posix.py   2014-04-06 
17:17:30.0 +0400
+++ /opt/python27/lib/scons-2.1.0/SCons/Platform/posix.py.new   2014-04-06 
17:17:07.0 +0400
@@ -36,6 +36,7 @@
import os
import os.path
import subprocess
+import stubprocess
import sys
import select

This what worked for me.

From: scons-dev-boun...@scons.org [mailto:scons-dev-boun...@scons.org] On 
Behalf Of Leskinen, Eugene
Sent: Sunday, April 06, 2014 5:05 PM
To: dl9...@darc.de; SCons developer list
Subject: Re: [Scons-dev] Subprocess issue on Linux?

Hi Dirk,

I am Eugene Leskinen and I am the stubprocess.py module author.
How do you import it?

From: scons-dev-boun...@scons.orgmailto:scons-dev-boun...@scons.org 
[mailto:scons-dev-boun...@scons.org] On Behalf Of Dirk Bachle
Sent: Sunday, April 06, 2014 4:59 PM
To: scons-dev@scons.orgmailto:scons-dev@scons.org
Subject: Re: [Scons-dev] Subprocess issue on Linux?

Hi Jason,

On 05.04.2014 00:17, Kenny, Jason L wrote:
I think yes, in that it does what should be done by the system under 
posix_spawn.. ie call vfork and execve.

Here is the last version of the monkey patch I have from the people working on 
it. It has a fallback to the classic fork exec if the API's don't exists. It 
seems to solve the main speed problem for us at the moment. I believe it still 
being tested to find possible issues.


I tried to let SCons run with this patch, but I'm not able to integrate the 
patching of subprocess.Popen() successfully. I always get an import error for 
SCons.Util, and fail to see where this is actually coming from:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o d1_0/f0_sconsbld_d1_0.o -c -Id1_0/lup000_sconsbld_d1_0 
-Id1_0/lup001_sconsbld_d1_0 d1_0/f0_sconsbld_d1_0.c
Traceback (most recent call last):
  File 
/home/dirk/workspace/scons_dirkbaechle/src/engine/SCons/Platform/posix.py, 
line 42, in module
import SCons.Util
ImportError: No module named SCons.Util
scons: *** [d1_0/f0_sconsbld_d1_0.o] Error 1
scons: building terminated because of errors.

Does anybody have a clue and can give me a pointer? I'd like to compare the 
times for a clean build against the default sources.

Regards,

Dirk


Closed Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


Closed Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park, 
17 Krylatskaya Str., Bldg 4, Moscow 121614, 
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
___
Scons-dev mailing list
Scons-dev@scons.org
http://two.pairlist.net/mailman/listinfo/scons-dev


Re: [Scons-dev] Subprocess issue on Linux?

2014-04-06 Thread Dirk Bächle

Hi Eugene,

thanks a lot for your quick answer and very helpful advice.

On 06.04.2014 15:21, Leskinen, Eugene wrote:


I have just place the stubprocess.py to 
/opt/python27/lib/scons-2.1.0/SCons/Platform/ directory and added 
'import stubprocess' statement to SCons.Platfrom.posix module just 
after import subprocess:


--- /opt/python27/lib/scons-2.1.0/SCons/Platform/posix.py 2014-04-06 
17:17:30.0 +0400


+++ /opt/python27/lib/scons-2.1.0/SCons/Platform/posix.py.new 
2014-04-06 17:17:07.0 +0400


@@ -36,6 +36,7 @@

import os

import os.path

import subprocess

+import stubprocess

import sys

import select

This what worked for me.



This approach works on my side too. I had tried to copy-paste part of 
the source code directly to the top of SCons/Platform/posix.py, which 
gave me the reported errors.


Best regards,

Dirk

___
Scons-dev mailing list
Scons-dev@scons.org
http://two.pairlist.net/mailman/listinfo/scons-dev