[Xorp-hackers] Getting XORP svn to compile (and run) on Centos (RHEL) 5 - solution

Eric S. Johnson esj at cs.fiu.edu
Mon Feb 15 16:01:00 PST 2010


Below is a diff of $SRCTOP/SConstruct that allows the SVN xorp 
to compile on Centos5 (and I assume would work for RHEL 5 too)

The first part allowed it to find libcrypto in /usr/lib. 

The second part gets rid of the

.....
TypeError: expected a character buffer object:
  File "/opt/router/src/xorp-svn-20100211/SConstruct", line 482:
    Split(env['CFLAGS']))
  File "/opt/router/src/xorp-svn-20100211/SConstruct", line 481:
    lambda s: not s.startswith(tuple(strip_pg_flags)),

error from scons. But it is a brute force with massive ignorance solution.
I am not much of a python/scons hacker.


It builds and so far runs fine (with a simple interface/ospf config). 
I have not attacked the PIM and VRRPD issues I saw with 1.6 yet. 
Seeing if those problems still exist will be fun for tomorrow :)

E

-------



[root at test-router xorp-svn-20100211]# diff -c SConstruct.orig SConstruct
*** SConstruct.orig     2010-02-11 16:09:04.000000000 -0500
--- SConstruct  2010-02-15 13:39:10.000000000 -0500
***************
*** 136,142 ****
                  ENV = os.environ,
                  BUILDDIR = builddir,
                  CPPPATH=['/usr/local/include', '$BUILDDIR'],
!                 LIBPATH=['/usr/local/lib'],
                  variables = vars)
  
  prefix = env['prefix']
--- 136,142 ----
                  ENV = os.environ,
                  BUILDDIR = builddir,
                  CPPPATH=['/usr/local/include', '$BUILDDIR'],
!                 LIBPATH=['/usr/lib:/usr/local/lib'],
                  variables = vars)
  
  prefix = env['prefix']
***************
*** 477,490 ****
  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']))
!     )
      # Full use of profiling may require more than one flag, so Split() them.
      pgdict = {'no': '',
                'gprof': '-pg',
--- 477,491 ----
  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' ]
! #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',



More information about the Xorp-hackers mailing list