diff --git a/admin/scons/LumieraEnvironment.py b/admin/scons/LumieraEnvironment.py index 85d5c5a7b..c004225d0 100644 --- a/admin/scons/LumieraEnvironment.py +++ b/admin/scons/LumieraEnvironment.py @@ -284,10 +284,13 @@ class LumieraModuleBuilder(WrappedStandardExeBuilder): def getCustomEnvironment(self, lumiEnv, target, **kw): """ augments the built-in SharedLibrary() builder to add some tweaks missing in SCons 1.0, - like setting a SONAME proper instead of just passing the relative pathname to the linker + like setting a SONAME proper instead of just passing the relative pathname to the linker. + Besides, we override the library search path to allow for transitive dependencies between + Lumiera modules; modules are assumed to reside in a subdirectory below the executable. """ custEnv = lumiEnv.Clone() custEnv.Append(LINKFLAGS = "-Wl,-soname="+self.defineSoname(target,**kw)) + custEnv.Append( LINKFLAGS = "-Wl,-rpath=\\$$ORIGIN/../modules,--enable-new-dtags" ) if 'addLibs' in kw: custEnv.Append(LIBS = kw['addLibs']) return custEnv