techoe / gflags

Automatically exported from code.google.com/p/gflags
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Add library versioning (soname) #82

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
gflags since 2.x (after migration to cmake) doesn't use shared library 
versioning. Is it possible to add versioning again?

cmake --help-command install:

Either NAMELINK_ONLY or NAMELINK_SKIP may be specified as a LIBRARY
option.  On some platforms a versioned shared library has a symbolic
link such as

lib<name>.so -> lib<name>.so.1

where "lib<name>.so.1" is the soname of the library and "lib<name>.so"
is a "namelink" allowing linkers to find the library when given
"-l<name>".  The NAMELINK_ONLY option causes installation of only the
namelink when a library target is installed.  The NAMELINK_SKIP option
causes installation of library files other than the namelink when a
library target is installed.  When neither option is given both
portions are installed.  On platforms where versioned shared libraries
do not have namelinks or when a library is not versioned the
NAMELINK_SKIP option installs the library and the NAMELINK_ONLY option
installs nothing.  See the VERSION and SOVERSION target properties for
details on creating versioned shared libraries.

Original issue reported on code.google.com by ivaxer on 1 May 2014 at 7:07

GoogleCodeExporter commented 9 years ago
I assume setting the VERSION property to <major>.<minor> should be sufficient 
to add versioning again?

Can you confirm that the change at 
https://code.google.com/p/gflags/source/detail?r=bf889786c2a3a2dab89610d0722634d
2eedfc694&name=bugfix/#82-shared-library-versioning fixes this issue?

Thanks,
Andreas

Original comment by andreas....@gmail.com on 1 May 2014 at 7:19

GoogleCodeExporter commented 9 years ago
Yep! Thank you. Can I apply this patch in Fedora gflags package? Will it be 
included in the next release?

Original comment by ivaxer on 1 May 2014 at 7:37

GoogleCodeExporter commented 9 years ago
Perfect. I merged and it into the master branch. It will thus be part of the 
next release.

Original comment by andreas....@gmail.com on 1 May 2014 at 7:44

GoogleCodeExporter commented 9 years ago

Original comment by andreas....@gmail.com on 1 May 2014 at 7:46

GoogleCodeExporter commented 9 years ago
Andreas, may be it will be better if we remove minor version from soname.  It 
will prevent the need for rebuld all dependencies of gflags on minor upgrades 
(without incompatible ABI changes).

Original comment by ivaxer on 2 May 2014 at 5:36

GoogleCodeExporter commented 9 years ago
Yes, I was thinking the same yesterday.

Made this change in commit cd7aece1 and commit 05b155ff merges it into master.

Original comment by andreas....@gmail.com on 2 May 2014 at 10:15