[Xorp-hackers] [Xorp-users] Announcement: XORP code repository is now live again

J.T. Conklin jtc at acorntoolworks.com
Tue Aug 25 14:40:12 PDT 2009


Rae Harbird <rae.harbird at gmail.com> writes:
> I am running XORP on Linux Ubuntu 9.04, kernel 2.6.28-13-generic #45-Ubuntu
>
> I have checked out the code from the svn repository and started using
> SCons (which I like). Everything is going well and I can run up
> "xorp_rtrmgr" successfully.
>
> I am having trouble getting scons to install the binaries and
> libraries for olsr.
>
> I have been running scons from the top directory as follows:
>
> scons .
> sudo scons install
>
> I have made minor amendments to some of the scons config files which
> may (or may not) have helped the situation:
>
> 1. SConstruct - modified line:
>
> env['WITH_OLSR'] = ARGUMENTS.get('enable-olsr', False)
>
> to:
>
> env['WITH_OLSR'] = ARGUMENTS.get('enable-olsr', True)

This changes the default for OLSR from False to True. It should have
been possible to specify this option on the command line with "scons
enable-olsr=true ...".  The intent is that all build options are 
available through command line arguments.  

We recently found some issue with the handling of binary valued options.
For example, both enable-olsr=True and enable-olsr=False would actually
enable the option because the argument is a string and in Python non-
zero length strings evaluate as True in boolean contexts.  I've just
checked in a fix for this for the 'shared' and 'strip' options, and
will extend it to all boolean options over time.

> 2. Modified the subdirs variable in the top-level SConscript directory
> to include 'olsr'

I believe this should have been 'contrib/olsr'.

Actually, what's missing is a SConscript within contrib which enables
(adds to subdirs) the various contrib modules based on build options.
But until that's done, you'll want to add 'contrib/olsr' to the top
SConstruct.  One word of warning is that will defeat the build option,
as the olsr SConscript has no conditionals of its own.

> 3. Added or uncommented references to olsr4 in:
>
> xrl/interfaces/SConscript
> xrl/targets/SConscript
> etc/templates/SConscript

Yes, these are needed.

One thing that has been discussed is moving the XLR interface and
target files, router manager template files, etc. out of a common
directory and into each protocol (There are common bits, of course,
that would still have to live in a common directory). The advantage
of this is that all the protocol related code would be in one place,
and if we go further conditionalizing the building of individual 
XORP protocols, all those conditionals will be in the protocol's
SConscript rather than scattered around/across the source tree.

It may not make sense to do this now, especially with the upcoming
plans to update the IPC mechanism, but community feedback on this
idea would be most welcome.

> I get a warning when I run "scons .":
>
> scons: warning: Ignoring missing SConscript
> 'obj/i686-linux-public17/olsr/SConscript'
> File "/data/XORP/XORP_SVN_1.6/xorp/SConscript", line 50, in <module>

I think this will be fixed once you address 2).

> What have I missed?

I don't think you've missed much.  

I'm not sure what the status of OLSR is and how/why it's build was
missed.  Perhaps Bruce will have something to say on that point.

That being said, I'm not suprised by the type of problems you ran
into.  I expect more of a similar nature as more people check out
the new public code and try out the new build system.  But they 
all should be easy to fix, and the faster the problems are reported
the quicker they will be resolved.

    --jtc

-- 
J.T. Conklin



More information about the Xorp-hackers mailing list