[Xorp-hackers] Adding support for older scons releases?

Ben Greear greearb at candelatech.com
Mon Sep 28 17:37:10 PDT 2009


On 09/28/2009 05:09 PM, Ben Greear wrote:
> I tried to compile xorp on Fedora 8.  It has scons 0.98 by default (yum install scons).
>
> This fails to compile with:
>
> scons: Reading SConscript files ...
> SCons 1.2 or greater required, but you have SCons 0.98.4
>
>
> Anyone know what part of xorp has the requirements for newer scons?  In order to make
> xorp easier for users to build, I'd like to attempt to fix up xorp to build with older
> scons, as opposed to making people manually find, download, configure and install a
> newer scons...

This patch allows it to compile, but maybe there are subtle issues somewhere?

The -*-python-*- thing makes xemacs properly recognize the file and
do syntax highlighting, by the way.  That token just needs to be somewhere in the first
two lines of the file.



diff --git a/SConstruct b/SConstruct
index 5011ad4..8cbb93a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1,4 +1,4 @@
-#Copyright (c) 2009 XORP, Inc.
+#Copyright (c) 2009 XORP, Inc.   -*-python-*-
  #
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License, Version 2, June
@@ -31,7 +31,6 @@
  # TODO conditionalize new directory layout here

  EnsurePythonVersion(2, 3)
-EnsureSConsVersion(1, 2)

  Help("""
      cross=true if you are doing a cross build. Default is false.
@@ -53,6 +52,13 @@ from SCons.Script.SConscript import SConsEnvironment
  import SCons.Action
  import SCons.Builder

+try:
+    EnsureSConsVersion(1, 2)
+except SystemExit:
+    print "WARNING:  Actually, SCONS version 1.2 or later is _preferred_."
+    print "Attempting to continue with version: " + SCons.__version__ + " but it may not work properly.\n"
+
+
  vars = Variables()

  vars.AddVariables(


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list