[SERVER-17694] support RPATH=value in top-level SConstruct Created: 23/Mar/15  Updated: 19/Sep/15  Resolved: 23/Mar/15

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 3.0.3, 3.1.1

Type: Improvement Priority: Major - P3
Reporter: Mark Callaghan Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Backport Completed:
Sprint: Platform 1 04/03/15
Participants:

 Description   

Please add support for scons RPATH="...." to the top-level SConstruct

This is a follow up to https://jira.mongodb.org/browse/SERVER-16663. With this change I will be able to build for production using special (non-default) compiler toolchains without having to first edit SConstruct.



 Comments   
Comment by Githook User [ 25/Apr/15 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-17694 Add support to set the SCons RPATH from Variables

(cherry picked from commit bd6d3e7691ec0f3bee7520f36673a2f30b9f63ac)

Conflicts:
SConstruct
Branch: v3.0
https://github.com/mongodb/mongo/commit/867aeb4e45bcc6a37debeb4213598e810bd91bb2

Comment by Githook User [ 23/Mar/15 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-17694 Add support to set the SCons RPATH from Variables
Branch: master
https://github.com/mongodb/mongo/commit/bd6d3e7691ec0f3bee7520f36673a2f30b9f63ac

Comment by Mark Callaghan [ 23/Mar/15 ]

Yes, that works for me

Comment by Andrew Morrow (Inactive) [ 23/Mar/15 ]

Hi mcallaghan@fb.com -

Can you see if the following patch works for you? I've just tested it out on my local linux machine and SCons seems to do the right thing with it:

diff --git a/SConstruct b/SConstruct
index 5e07505..a45d236 100644
--- a/SConstruct
+++ b/SConstruct
@@ -429,6 +429,10 @@ env_vars.Add('MSVC_USE_SCRIPT',
 env_vars.Add('MSVC_VERSION',
     help='Sets the version of Visual Studio to use (e.g.  12.0, 11.0, 10.0)')
 
+env_vars.Add('RPATH',
+    help='Set the RPATH for dynamic libraries and executables',
+    converter=variable_shlex_converter)
+
 env_vars.Add('SHCCFLAGS',
     help='Sets flags for the C and C++ compiler when building shared libraries',
     converter=variable_shlex_converter)

If you have multiple runpath entries to set they should be space delimited:

scons RPATH='/some/where/lib /else/where/lib' ...

Generated at Thu Feb 08 03:45:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.