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

Dan McNaul danmcnaul at gmail.com
Mon Jan 18 10:47:04 EST 2016


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'll document the bug anyway in case you want to hear it.

==========================================

I need an Oracle Pro*C builder.  I decided that I should learn how to write 
a proper TOOL, so I copied the example found at

https://bitbucket.org/scons/scons/wiki/ToolsForFools

I modified the code to work for Ora_Pro*C pre-compiler and this is the bug I 
found.

My Builder/Tool code is attached as "__init__.py"

My SConscript is attached as "SConscript".

My build log is attached as "save_this_bld.out".  I edited the log to cut 
through the noise and show the actual bug.

============================================

In the log at lines 3 and 4 we see the TRACE messages of scons instantiating 
my Builder/Tool and calling function 'generator()' which then calls 
'_detect' to detect/find the proc executable.   Good.

We then see lines 6 thru 23 TRACE messages from the 'ProC()' function 
working the list of *.pc files I sent it via my SConscript.  Pay attention 
to the 'lname=xxxxxxx.lis' parameter I'm passing into the Oracle proc 
pre-compiler.  They are $TARGET.dir/<sourcename>.lis.   Good.

But then, and here's the bug, look at the lines that execute the Oracle 
proc.  Line 30, for example.  Notice that lname= magically changed to the 
last file in the list passed to "ProC()", work_by_band.lis.  Line 30 should 
still say 'canadian_cross.lis', but it has changed to the last file in the 
list 'work_by_band.lis'.  This is true all the way down the line.  Lines 44, 
58, 77, 91, and 105.  Except, of course, line 105 is 'work_by_band.pc', so 
it should be 'work_by_band.lis'.

=====================================

As a side note.....  The scons -c works well.  The work_by_band.lis is 
cleaned up.  This bug is not a show stopper for me, because the errors (if 
any) are in the log, so because the "LIS" file gets over-written every time 
is of little consequence to me.  I can use the TOOL the way it works.  For 
the next builder, however, this may not be the case so I wanted to report 
it.


Dan McNaul



-------------- next part --------------
A non-text attachment was scrubbed...
Name: __init__.py
Type: application/octet-stream
Size: 3583 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160118/843e2351/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SConscript
Type: application/octet-stream
Size: 1092 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160118/843e2351/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: save_this_bld.out
Type: application/octet-stream
Size: 30874 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160118/843e2351/attachment-0005.obj>


More information about the Scons-users mailing list