Hi,
Patch inlined for easier review:
> --- SConstruct~ 2013-08-15 11:13:20.000000000 +0200
> +++ SConstruct 2013-08-27 20:35:28.000000000 +0200
> @@ -220,8 +220,7 @@
> env.Append(LINKFLAGS='-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,))
> # 'man ld' says positive non-zero for the first number, so we add one.
> # Mac's interpretation of compatibility is the same as our MINOR version.
> - env.Append(LINKFLAGS='-Wl,-compatibility_version,%d' % (MINOR+1,))
> - env.Append(LINKFLAGS='-Wl,-current_version,%d.%d' % (MINOR+1, PATCH,))
> + env['SHLIBVERSION']='${%d}.0.0' % (MINOR+1,)
>
> if sys.platform != 'win32':
> ### gcc only. figure out appropriate test / better way to check these
Two disadvantages of this patch:
1. we loose the patch level in '-current_version'.
2. the version number is different on Mac OS X compared to other platforms.
I don't think the first is much of a problem, except for making
trouble shooting shared lib problems a bit more difficult. I do think
we need to align version numbers on all platforms, even if that means
that serf 2.0.0 will be labelled as 2.1.0 in the .so. We can do this
in 1.4.0.
The fact remains that this is a workaround for one of the issues in
the shared library support in scons 2.3.0. I've identified so far:
1. the shared library version has to consist of 3 components. As serf
adds the major version in the library name, 2 components would have
been sufficient.
2. creating of the .so/.dylib symlinks fails when these were already
installed, breaking of the installation
3. on Mac OS X, no way to differentiate between compatibility_version
and current_version
4. on Mac OS X, no support for setting install_name
5. mandatory upgrade to scons 2.3.0, which is not available yet in
most Linux distributions (but is very easy to install)
We've worked around issues 1, 3 (but the workound will be reverted by
this patch) and 4. Issue 2 remains open and there is no entry point in
scons to solve this easily, so will require a hack.
I'll apply this patch with some added comments.
> Blair
>
Thanks!
Lieven