[Scons-users] version 2.5.0 and SHLIBVERSIONFLAGS

Paweł Tomulik ptomulik at meil.pw.edu.pl
Tue May 10 20:15:43 EDT 2016


You may also unset LDMODULEVERSION, e.g.

env['LDMODULEVERSION'] = None

or

del env['LDMODULEVERSION']


W dniu 11.05.2016 o 02:11, Tim Jenness pisze:
> Thank you! I was just about to sit down and disentangle our system.
> 
> I am working around the problem for now by just forcing SHLIBVERSIONFLAGS to “”.
> 
>> Tim Jenness
> 
> 
>> On May 10, 2016, at 16:47 , Paweł Tomulik <ptomulik at meil.pw.edu.pl> wrote:
>>
>> W dniu 10.05.2016 o 23:30, Tim Jenness pisze:
>>> I have a scons package that breaks badly in v2.5.0 on Linux because scons started adding $SHLIBVERSIONFLAGS (which really means “-Wl,Bsymbolic” is added to the g++ link line) to my LoadableModule targets (which happen to be SWIG generated files). I’m definitely not setting SHLIBVERSION and SharedLibraryModule doesn’t have the problem. Is it possible that there is a problem with LoadableModule not correctly working out that there is no shared library version defined? If I clear SHLIBVERSIONFLAGS in my SConstruct file the build works as before.
>>>
>>> Should I file a ticket on this? Am I setting a SHLIBVERSION specifically for LoadableModule without realising it?
>>>
>>>>>> Tim Jenness
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-users at scons.org
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>>
>> I can confirm, it's the case :(
>>
>> The minimal example:
>>
>> # Sconstruct
>> env = Environment()
>> env.LoadableModule('foo', 'foo.c')
>>
>>
>> The issue exists because env['LDMODULEVERSION'] is initially set to
>> "$SHLIBVERSION" (non-empty string), but this (non empty string
>> '$SHLIBVERSION') is not correctly handled by a function called
>> __libversionflags in SCons/Defaults.py (the variable is not
>> substituted). This is a bug, but fixing it shouldn't be hard.
>>
>>
>> A quick workaround may consist of overwritting env['__libversionflags']
>> as follows:
>>
>>
>> def __libversionflags(env, version_var, flags_var):
>>  try:
>>    if env.subst('$'+version_var):
>>      return env[flags_var]
>>  except KeyError:
>>    pass
>>  return None
>>
>> env = Environment(__libversionflags = __libversionflags)
>> env.LoadableModule('foo', 'foo.c')
>>
>>
>> Similar fixed implementation of __libversionflags should go to
>> Defaults.py to fix the bug.
>>
>> Best regards!
>> -- 
>> Pawel Tomulik
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> 


-- 
Pawel Tomulik


More information about the Scons-users mailing list