[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] static builds, static-libs useflag and indirect dependencies
From:       Alexis Ballier <aballier () gentoo ! org>
Date:       2010-04-19 16:19:02
Message-ID: 20100419181902.14775ee7 () capa-portable
[Download RAW message or body]

Hi all,

We used to install both shared and static libraries when both were
available; this was good and working. Now we have the static-libs
useflag to control when static libs are built and installed; this is
better: we save time & space.

The problem I want to raise here is about indirect dependencies with
that new approach; let's take a real life example:
We have xz-utils and libarchive with the static-libs useflag. I want to
build freebsd-rescue statically against libarchive. What should I do?
So far we depend on libarchive[static-libs] because we cannot guess the
deps of libarchive. Thanks to pkg-config --static this is a non issue,
unless xz-utils is built without static-libs and we enabled lzma
support in libarchive! In this case, libarchive's static libs are
useless if I don't have xz-utils' ones because the former requires the
latter.

For me, the current way of adding static-libs to packages only for
controlling whether static libraries are installed is broken.

I'd like to see the following as a guideline/rule for the static-libs
useflag:
1) if a package has a static-libs useflag then its deps must be
  cat/pkg[static-libs?] when applicable.
2) if one wants to add a static-libs useflag to a package then one must
  check the reverse deps and make them happy with 1).

Needless to say I am volunteering to scan & fix the tree to see this
implemented quickly.

Another option would be to make the package manager automagically
handling the propagation of the static-libs useflag but that sounds
more a hack than anything else.

Alexis.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic