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

Re: static linking and opportunistic dynamic linking problem

Le jeudi 14 décembre 2006 à 11:56 +0000, Alastair McKinstry a écrit :
> partimage depends on libnewt, which I maintain. libnewt-dev ships libnewt.a.
> libnewt opportunistically links to libfribidi if it is present; it uses
> dlopen() to do so.
> However the partimage build fails when done with './configure
> --enable-all-static', as it
> (reasonably) does not link against libdl.

If it needs symbols from libdl, that's not "reasonable".

> So where do people think the bug lies?
>  - Should libdl be compiled into libnewt.a ?

No. It should be added to the .la so that applications linking to
libnewt.a also get libdl.

>  - Should the static version of libnewt be built differently so as to
> not call dlopen()?

That's another option.

>     - if so, any recommendations on how?

You can either link it statically with libfribidi, or remove the

>  - Is the bug in partimage?

The bug is trying to use static linking, which is anyway fundamentally
broken on glibc-based systems.
Josselin Mouette                  /\./\
« Sans puissance, la maîtrise n'est rien. »

Reply to: