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

Re: Does dpkg-cross need to support static linking?



On Sun, 2 May 2010 15:14:05 +0200
Simon Richter <sjr@debian.org> wrote:

> Hi,
> 
> On Sun, May 02, 2010 at 11:45:20AM +0100, Neil Williams wrote:
> 
> > 2. If so, there is no point in dpkg-cross preserving the .a files
> > either, presumably.
> 
> Missing .la files makes static linking somewhat more difficult, but it
> was never guaranteed that -dev packages pull in the -dev packages for
> all libraries used by them (ideally, they'd not reexport others'
> ABI/API and thus not require a dependency at all)

Several of my own upstream packages explicitly need to export symbols
from another API within their own - otherwise it means suspect pointer
casts, unreliable and buggy API's and pointless code churn. e.g. if
libfoo uses libglib2.0 to provide hash table support, it is pointless
telling libfoo maintainers that the API cannot return a pointer to a
particular GHashTable but should cast it to a void pointer instead. Or
if libfoo manages incoming data into a GList, there's no point requiring
a callback API when what is needed is the GList. That way lies madness.

GList *sql_statement_get_fields (sql_statement * statement);
GList *qof_sql_query_run (QofSqlQuery * query, const gchar * str);

>, so when linking
> statically, I need to be aware of the full dependency chain either
> way.

Keeping the .a isn't a problem because it only needs to be moved, not
modified. If `pkg-config --static` is enough to make .a files useful,
let's keep them.
 
> > 3. Is static linking (outside of bespoke kernel / busybox micro
> > systems) of any benefit in the typical cross-build environment?
> 
> I use it regularly, but generally only with packages where I took the
> liberty of removing the .la file already, so I'd not miss much if .la
> files were gone (also, pkg-config can replace their functionality).

So if even people who do want statically linked cross-built packages
don't want the .la files, I'm thinking that dpkg-cross should simply
drop them.

However, I'm not sure if dpkg-cross can prejudge the removal of the .la
files in Debian - or whether we simply need to be aware that .la files
are disappearing in due course.

What I'll do in the meantime is modify the Crush packages to not
include the .la.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.linux.codehelp.co.uk/
http://e-mail.is-not-s.ms/

Attachment: pgpnsmscakJUr.pgp
Description: PGP signature


Reply to: