[Scons-users] version 2.5.0 and SHLIBVERSIONFLAGS

William Blevins wblevins001 at gmail.com
Tue May 10 20:11:30 EDT 2016


Bill,

The changes related to library mechanics were from 2.4.1 correct?

Consider consulting the pull request
https://bitbucket.org/scons/scons/pull-requests/247/new-versioned-libraries-gnulink-cyglink/diff
to see if that will cause other weird side-effects.

V/R,
William

On Wed, May 11, 2016 at 12:47 AM, 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160511/a78df803/attachment-0001.html>


More information about the Scons-users mailing list