[Scons-dev] Issue 2869 - Versioned shared libraries

Managan, Rob managan1 at llnl.gov
Thu Oct 25 00:09:13 EDT 2012


I want to get some input on this issue. I created a fork for this at https://bitbucket.org/managan/scons_soname and put Eric Raymond's code into Environment.py that added the methods VersionedSharedLibrary and VersionedSharedLibraryInstall.



Then I worked on putting this functionality into the SharedLibrary method. I did that by using a new environment variable env['SHLIBVERSION']. When it is set I add the sym link names as side effects into the emitter in Tool/link.py and modified the builder to change the target name to include the version number and then create the sym links.



The real question is what to do with the Install method. If you define SHLIBVERSION in the main environment you could check for it inside the Install method. OTOH, if you do it this way:



env = Environment(ENV=os.environ)

objs = env.SharedObject('test.c')

myLib = env.SharedLibrary('test', objs, SHLIBVERSION = '2.5.4')

instnode = env.Install("/home/rob/develop/scons_soname/installtest",myLib)



then Install won't know about SHLIBVERSION.



We could just create the sym links for any library whose name includes a

3 digit version number like libtest.2.5.4.so or libtest.dylib.2.5.4. Is that rare enough that it is OK to just do it or what do people think about how to roll this behaviour into the main methods?


Another way to say this is: what should the user interface be??



Rob Managan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20121025/b77cf553/attachment.htm>


More information about the Scons-dev mailing list