Re: [PATCH] libfdt: include version number in soname

2 messages, 2 authors, 2011-04-25 · open the first message on its own page

Re: [PATCH] libfdt: include version number in soname

From: David Gibson <hidden>
Date: 2011-04-25 03:07:33

On Thu, Apr 21, 2011 at 12:13:49PM +0200, Paolo Bonzini wrote:
The libfdt shared library is only installed by its unversioned name.
Including it properly in a distribution requires installation of both
the versioned name (used in the binary-only package) and the unversioned
name (used in the development package).  The latter is just a symbolic
link, so you need to change the soname in turn to include the version.

While at it, use Makefile variables to shorten some lines and avoid
cut-and-paste typos; and clean up remnants of when shared libraries were
not supported on Darwin.
So, as it happens, I was attempting to package libfdt just a few days
ago and also hit problems because the shared library was not properly
versioned.  That was more due to the lack of SONAME entry in the ELF
itself, rather than the missing installed filename.

However this patch isn't quite right - it sets the SONAME containing
the whole of the dtc version, which means even minor version updates
will cause a change of soname and will therefore be seen as
incompatible changes.

I'll revise and send out a version with both sign-offs in a moment.
Jon, it would be really good to squeeze this one into the mooted
upcoming official release - it would then be a good base for the
distros to build proper libfdt packages from.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Re: [PATCH] libfdt: include version number in soname

From: Paolo Bonzini <hidden>
Date: 2011-04-25 18:09:20

On 04/25/2011 05:07 AM, David Gibson wrote:
it sets the SONAME containing the whole of the dtc version, which
means even minor version updates will cause a change of soname and
will therefore be seen as incompatible changes.
Squashing this in should be enough:
diff --git a/Makefile b/Makefile
index 1db9f30..e29cd25 100644
--- a/Makefile
+++ b/Makefile
@@ -131,7 +131,7 @@ LIBFDT_objdir = libfdt
 LIBFDT_srcdir = libfdt
 LIBFDT_archive = $(LIBFDT_objdir)/libfdt.a
 LIBFDT_lib = $(LIBFDT_objdir)/libfdt.$(SHAREDLIB_EXT)
-LIBFDT_lib_VERSIONED = $(subst .$(SHAREDLIB_EXT),-$(DTC_VERSION).$(SHAREDLIB_EXT),$(LIBFDT_lib))
+LIBFDT_lib_VERSIONED = $(subst .$(SHAREDLIB_EXT),.$(SHAREDLIB_EXT).$(VERSION),$(LIBFDT_lib))
 LIBFDT_lib_SONAME = $(notdir $(LIBFDT_lib_VERSIONED)) 
 LIBFDT_include = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_INCLUDES))
 LIBFDT_version = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_VERSION))
Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help