[Scons-users] Builder or Action bug Scons v2.3.0

Dan McNaul danmcnaul at gmail.com
Thu Jan 21 09:24:50 EST 2016


Dirk,

Thank you.   Looks like I may need concrete help.

I changed the "TOOL" to use "generator" and got an odd result  (see attached 
'bld_asatool.out')

I thought, "OK.  Maybe it can't be a TOOL".  So I plugged a "Builder" in my 
SConstruct (see attached 'bld_notool.out'), but got the same result ( as the 
"TOOL".  The "Builder" in the SConstruct starts around line 268 of the file.

I cut the source files down to just 1 *.pc to cut out all the noise so we 
can better see what's happening

I don't understand why my "generator" gets called so many times for one 
file, but you can see that the first call gets the FindPathDirs() work 
correctly (lines 7 or 9 of the log files)

The subsequent calls (lines 15 thru 28 notool ---  lines 17 thru 37 asatool) 
get the FindPathDirs() work wrong.  CPPPATH and Repository entries are 
missing.  And Oracle's ProC pre-compiler can't find the headers it needs in 
my repositories so it throws errors.

I do notice that there is a "Found dependency cycle" error at the bottom of 
the 'bld_asatool' run that didn't happen during the 'bld_notool' run.  I'm 
not sure what that is all about.

I appreciate your time.

Dan McNaul



-----Original Message----- 
From: Dirk Bächle
Sent: Monday, January 18, 2016 4:32 PM
To: scons-users at scons.org
Subject: Re: [Scons-users] Builder or Action bug Scons v2.3.0

Hi Dan,

On 18.01.2016 16:47, Dan McNaul wrote:
> I think I found a bug in v2.3.0.  I installed v2.4.1 to test this case, 
> but
> v2.4.1 doesn't like any of my SConscripts and never gets to the build 
> step.
> I have too many SConscripts to investigate v2.4.1's issues, so I wasn't 
> able
> to run a regression test.  All the later 2.3 versions (v2.3.[1-4]) have 
> bugs
> in them that prevent code from building, so I can't regression test those
> versions either.
>

I inspected your setup and there is no bug. The behaviour you see is 
expected and will show up in any SCons version. There is a
fundamental concept for you to understand here. Executing, or calling, a 
Builder *doesn't* immediately execute its Action(s).
That's why the last assignment to your "lname=" wins. It's the value of the 
environment variable *after* parsing all
SConscripts/SConstructs, and while building stuff.

What you're actually looking for is an Action Generator, see the UserGuide 
at http://scons.org/doc/production/HTML/scons-user.html ,
sect. 18.5 "Builders That Create Actions Using a Generator".

If you need concrete help with this, just let us know...

Best regards,

Dirk

_______________________________________________
Scons-users mailing list
Scons-users at scons.org
https://pairlist4.pair.net/mailman/listinfo/scons-users 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: __init__.py
Type: application/octet-stream
Size: 3906 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160121/4add5a90/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bld_asatool.out
Type: application/octet-stream
Size: 14055 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160121/4add5a90/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bld_notool.out
Type: application/octet-stream
Size: 14120 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160121/4add5a90/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SConstruct
Type: application/octet-stream
Size: 17124 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160121/4add5a90/attachment-0007.obj>


More information about the Scons-users mailing list