[Xorp-users] BUG: 1.7 build system does not have dependencies against SConscript files

XORP at sipxx.com karl at sipxx.com
Sat Sep 26 16:44:23 PDT 2009


Yes, you would think it should just work.
And yes, if you add a subdirectory, or a source file, it indeed does. 
But if you just edit
a script file and change the configuration, for example, add a directory 
to a LIBPATH array,
it won't detect it. Easy to demonstrate, just edit a script file and 
make some simple modifications.

SCons (1.2) is compiled from latest release sources  and Python is up to 
date on Linux and FreeBSD
systems. System type doesn't matter, in fact.

For example,
build a complete tree and add the following patch in ospf directory:

Index: SConscript
===================================================================
--- SConscript  (revision 11556)
+++ SConscript  (working copy)
@@ -35,7 +35,8 @@
     '$BUILDDIR',
     ])
 
-env.AppendUnique(LIBPATH = [
+env.PrependUnique(LIBPATH = [
+       '.',
     '../libxorp',
     '../libcomm',
     '../libxipc',

The patch simply changes Append to Prepend and adds the current 
directory '.' to the LIBPATH
(for no particular reason, just to demonstrate the ineffectiveness)

Then rerunning scons from the top of the tree will tell you that 
everything is 'up to date', e.g.:
scons: `obj/x86_64-linux-public17/ospf/tools/clear_database' is up to date.
scons: `obj/x86_64-linux-public17/ospf/tools/print_lsas' is up to date.
scons: `obj/x86_64-linux-public17/ospf/tools/print_neighbours' is up to 
date.
scons: `obj/x86_64-linux-public17/ospf/xorp_ospfv2' is up to date.
scons: `obj/x86_64-linux-public17/ospf/xorp_ospfv3' is up to date.




J.T. Conklin wrote:
> "XORP at sipxx.com" <karl at sipxx.com> writes:
>   
>> The new build system does not implement any dependency checking on 
>> SConscript files.
>>
>> For example, when applying a patch to SConscript files for fixing the 
>> library path problem addressed in another thread, the system should 
>> detect that SConscript files have changed and should relink the 
>> executables, or whatever is necessary to build a subsystem correctly. 
>> Ideally this should only do the absolutely minimum work, like just 
>> relinking the executables, but may involve recompilations, since some 
>> compiler flags may have been changed.
>>     
>
> This is supposed to "just work".  Scons builds a dependency graph from
> the declarations in the SConscript files, and then checks to see if
> each node in the DAG is up to date.  If a new file or library is added,
> the DAG will be out of date, and the executable should be rebuilt.
>
> If this is not happening, a fully worked example needs to be filed as a
> bug.  Include the version of SCons and Python as well.
>
>    --jtc
>
>   



More information about the Xorp-users mailing list