[Xorp-hackers] Getting XORP svn to compile (and run) on Centos (RHEL) 5 - solution
Eric S. Johnson
esj at cs.fiu.edu
Mon Feb 22 11:37:59 PST 2010
>Can you let us know the version of Python you are using?
[root at test-router router]# scons --version
SCons by Steven Knight et al.:
script: v1.2.0.r3842, 2008/12/20 22:59:52, by scons on scons-dev
engine: v1.2.0.r3842, 2008/12/20 22:59:52, by scons on scons-dev
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
[root at test-router router]# python -V
Python 2.4.3
rpms are
python-2.4.3-27.el5
python-devel-2.4.3-27.el5
scons-1.2.0-1.el5.rf
Based on some input from Bruce, I changed the $SRCTOP/SConstruct to
use python lists for LIBPATH.
Also, after running it I found that there was no "multicast" since mroute.h
didn't compile. Some existing comments clued me in, but I clarified
the problem in BUILD_NOTES in a new section for centos 5.
below are my "centos 5" patches for the latest SVN.
I put these in the sourceforge trac system too..
>Any luck reproducing the PIM and VRRPD issues you reported
>in the svn tree code?
PIM/IGMPv2 is working great for me with the svn code. Have not yet played
with VRRPD.
E
diff -r -U5 xorp-svn-20100217.orig/BUILD_NOTES xorp-svn-20100217/BUILD_NOTES
--- xorp-svn-20100217.orig/BUILD_NOTES 2010-02-17 10:26:48.000000000 -0500
+++ xorp-svn-20100217/BUILD_NOTES 2010-02-17 10:48:54.000000000 -0500
@@ -384,10 +384,25 @@
- libpcap-devel
This package is needed for sending/receiving link layer data frames.
- The code compiles, and the internal tests appear to succeed.
- gcc (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)
+ * Linux CentOS 5.4 (2.6.18-164.6.1.el5)
+ - You must install the following packages:
+ - gcc
+ - gcc-c++
+ - openssl-devel
+ - scons-1.2.0-1.el5.rf
+ - Optionally install the following packages:
+ - libpcap-devel
+ This package is needed for sending/receiving link layer data frames.
+ - gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)
+ - must comment out: if has_netinet_in_h:
+ prereq_linux_mroute_h.append('netinet/in.h')
+ around line 550 of site_scons/config/allconfig.py
+
+
* Linux Debian-3.1 (sarge) (2.4.27-3-386):
- You must install the following packages:
- libssl (e.g., libssl0.9.7)
- libssl-dev
- gcc (e.g., gcc-3.3)
diff -r -U5 xorp-svn-20100217.orig/SConstruct xorp-svn-20100217/SConstruct
--- xorp-svn-20100217.orig/SConstruct 2010-02-17 10:26:48.000000000 -0500
+++ xorp-svn-20100217/SConstruct 2010-02-21 15:04:25.000000000 -0500
@@ -134,11 +134,11 @@
TOOLS = ['default', 'autotest', 'clntgen', 'tgtgen',
'TOOL_SUBST'],
ENV = os.environ,
BUILDDIR = builddir,
CPPPATH=['/usr/local/include', '$BUILDDIR'],
- LIBPATH=['/usr/local/lib'],
+ LIBPATH=['/usr/lib', '/usr/local/lib'],
variables = vars)
prefix = env['prefix']
print 'Build System Type: ', build
@@ -475,18 +475,19 @@
print """
WARNING: You have requested GNU gprof style profiling
and shared libraries. This is UNSUPPORTED, and probably will not link.
"""
strip_pg_flags = [ '-pg', '-finstrument-functions', '-fno-omit-frame-pointer', '-fno-optimize-sibling-calls' ]
- env.Replace( CFLAGS = filter(
- lambda s: not s.startswith(tuple(strip_pg_flags)),
- Split(env['CFLAGS']))
- )
- env.Replace( CXXFLAGS = filter(
- lambda s: not s.startswith(tuple(strip_pg_flags)),
- Split(env['CXXFLAGS']))
- )
+#ESJ
+# env.Replace( CFLAGS = filter(
+# lambda s: not s.startswith(tuple(strip_pg_flags)),
+# Split(env['CFLAGS']))
+# )
+# env.Replace( CXXFLAGS = filter(
+# lambda s: not s.startswith(tuple(strip_pg_flags)),
+# Split(env['CXXFLAGS']))
+# )
# Full use of profiling may require more than one flag, so Split() them.
pgdict = {'no': '',
'gprof': '-pg',
'pprof': '',
}
diff -r -U5 xorp-svn-20100217.orig/site_scons/config/allconfig.py xorp-svn-20100217/site_scons/config/allconfig.py
--- xorp-svn-20100217.orig/site_scons/config/allconfig.py 2010-02-17 10:26:14.000000000 -0500
+++ xorp-svn-20100217/site_scons/config/allconfig.py 2010-02-17 10:48:54.000000000 -0500
@@ -541,17 +541,20 @@
# TODO: The autoconf feature test for this contained a hack to exclude
# <linux/in.h> that might be included by <linux/mroute.h>, because
# <linux/in.h> might conflict with <netinet/in.h> that was included
# earlier. This is currently difficult to replicate in SCons, as
# you can't pass arbitrary code that is prepended to the test.
+ #
+ # for Centos5 at least, netinet/in.h is not needed and breaks things
+ #
prereq_linux_mroute_h = []
if has_sys_types_h:
prereq_linux_mroute_h.append('sys/types.h')
if has_sys_socket_h:
prereq_linux_mroute_h.append('sys/socket.h')
- if has_netinet_in_h:
- prereq_linux_mroute_h.append('netinet/in.h')
+ #if has_netinet_in_h:
+ # prereq_linux_mroute_h.append('netinet/in.h')
if has_linux_types_h:
prereq_linux_mroute_h.append('linux/types.h')
linux_mroute_h = 'linux/mroute.h'
has_linux_mroute_h = conf.CheckHeader(prereq_linux_mroute_h + [ linux_mroute_h ])
if has_linux_mroute_h:
More information about the Xorp-hackers
mailing list