Closed GoogleCodeExporter closed 9 years ago
Original comment by andreas.stieger@gmx.de
on 24 Jul 2013 at 10:31
Attachments:
Applying a global linker flag that applies to all platforms is not the right
way to fix this.
Looking through the SCons sources for this flag it appears that you/we should
use the VersionedSharedLibrary, to automatically handle the right flags on all
platforms.
A patch like:
Index: SConstruct
===================================================================
--- SConstruct (revision 2076)
+++ SConstruct (working copy)
@@ -184,6 +184,8 @@ thisdir = os.getcwd()
libdir = '$PREFIX/lib'
incdir = '$PREFIX/include/serf-$MAJOR'
+env['SHLIBVERSION']='0.${MAJOR}.0'
+
LIBNAME = 'libserf-${MAJOR}'
if sys.platform != 'win32':
LIBNAMESTATIC = LIBNAME
----
Should handle this completely platform independent, applying about the same
code as your patch on most posix systems, but something completely different on
'darwin' and
'cygwin'.
Original comment by bhuijben
on 25 Jul 2013 at 8:12
SHLIBVERSION was introduced in scons 2.3.0 releases in March. Would that be
acceptable?
Original comment by andreas.stieger@gmx.de
on 25 Jul 2013 at 5:49
The macport version of scons is 2.3.0. My Ubuntu install only has 2.2.x.
Just adding an envvar won't "require" 2.3.0... it'll just mean the symlinks
won't appear when run with 2.2.x. I think that we could print a warning in that
case.
Original comment by gstein
on 26 Jul 2013 at 6:53
Just to confirm that setting SHLIBVERSION with scons >= 2.3.0 works for me, and
I can work around for previous releases with the previous patch.
Original comment by andreas.stieger@gmx.de
on 28 Jul 2013 at 1:22
Attachments:
Setting SHLIBVERSION is not enough, need to use env.InstallVersionedLib to get
both the shared library without version and the symbolic link. Also, I think we
should have the minor version in the library name.
Attached patch will give this as result on Mac OS X:
/usr/local/lib/libserf-1.3.0.0.dylib
/usr/local/lib/libserf-1.a
/usr/local/lib/libserf-1.dylib -> libserf-1.3.0.0.dylib
and for trunk:
/usr/local/lib/libserf-2.0.0.0.dylib
/usr/local/lib/libserf-2.a
/usr/local/lib/libserf-2.dylib -> libserf-2.0.0.0.dylib
Original comment by lieven.govaerts@gmail.com
on 5 Aug 2013 at 10:06
Attachments:
Original comment by chemodax@gmail.com
on 9 Aug 2013 at 4:53
Fixed in r2124, using SHLIBVERSION and InstallVersionedLib.
Original comment by andreas.stieger@gmx.de
on 10 Aug 2013 at 7:45
Original issue reported on code.google.com by
andreas.stieger@gmx.de
on 24 Jul 2013 at 10:30