[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Having trouble creating a shared library package



On 2018-12-07 17:06 -0800, John Horigan wrote:
> On Fri, Dec 7, 2018 at 8:36 AM Wookey <wookey@wookware.org> wrote:
>     On 2018-12-07 08:27 -0800, John Horigan wrote:
>     Normally the library package
>     libfoo is shared, and the libfoo-dev package contains the static
>     version. You already have the static version in libagg-dev, so why not
>     just add libagg as the shared version, and be like any other library
>     in debian?
> 
> That makes much more sense. I tried it, and the packages all build with no
> lintian errors or warnings. I was able to remove all my lintian overrides too.

Good.
> 
>     Can you explain why you think there should be two -dev packages?
> 
> If I create a new version of libagg-dev package and add shared libraries then
> dependent packages that use the new version will link against the shared
> library instead of the static library. 

Well, it's up to the depending package whether it builds against the
shared or the static library.

> The resulting binaries will then depend
> on the shared libraries being installed. Wouldn't this break things? 

Why should it? This is the normal state of afairs for the vast
majority of libraries in Debian. Any depending package building
against the shared version needs to declare that dependency. But if it
continues to build aginst the static version then it can continue to
not mention such a dependency.

> I created
> libagg2-dev so that libagg-dev users would not get shared libraries that they
> don't expect.

How are the depending packages configuring this library? Are they
using pkg-config, or do they just have fixed makefile configs? Or some
other kind of config-script ?

If that config is coming from the libagg-dev package then you can
(probably) control which is the default. If it's coming from the
depending package then the behaviour should continue as before (unless
it was only falling-back to the static lib after failing to find the
shared lib?)

So I still don't think you need more than the standard:
libaggN (shared library)
libagg-dev (static library, headers, maybe pkgconfig file)

Then check if any depending packages builds break.

We don't normally control dynamic/static linking in debian by having
two alternative libfoo-dev packages. We always provide both and let
packages choose which they want to use. It is probably _possible_ to
do what you suggest, but I don't see any reason to try and do so yet.

Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/

Attachment: signature.asc
Description: PGP signature


Reply to: