Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-5614

scons compilation with multiple includes and library pathes

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.2
    • Component/s: Build
    • Environment:
      Linux
    • Linux

      I am compiling mongodb in an environment where I have multiple includes and library pathes.
      I had to modify SConstruct to pass these pathes :

      before( SConstruct line 253):

      if has_option( "libpath" ):
      env["LIBPATH"] = [get_option( "cpath" )]

      if has_option( "cpppath" ):
      env["CPPPATH"] = [get_option( "cpath" )]

      after:

      if has_option( "cpppath" ):
      for x in GetOption( "cpppath" ).split( ":" ):
      env.Append( CPPPATH=[ x ] )

      if has_option( "libpath" ):
      for x in GetOption( "libpath" ).split( ":" ):
      env.Append( LIBPATH=[ x ] )

      that's all.
      It's compiling now with
      scons all \
      --cpppath=$(echo $CPPFLAGS|sed -e 's/ -I/:/g;s/-I//') \
      --libpath=$(echo $LDFLAGS|sed -e 's/ -L/:/g;s/-L//') \

      Glad to contribute
      Guy

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            guy.kastenbaum Guy Kastenbaum
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: