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

Re: library linking, missing libB.so



Hi

On 3/20/14, Nico Schlömer <nico.schloemer@gmail.com> wrote:
> I'm building a package for a library A that depends on another
> library, libB.so (from its dev-version). When installing library A,
> the package libb is installed, containing libB.so.7.2 and libB.so.7.
> When linking an executable against libA.so, the linker rightfully
> complains about a missing libB.so.

No, the 'linker' does not complain.

> What is the correct fix here?

You should check your build system. It seems to be broken. libB is an
implementation details of libA. Application programmer linking to libA
should *not* know about those low level technical details. Unless of
course explicitely stated in the documentation and/or provided in the
*.pc file (or cmake exported file). So unless you know what you are
doing libB should not appear on the link line.

In any case if you have an application using libA API, but complains
about missing libB symbols, you have a case where libA is underlinked
which is a serious issue and should not happen in debian package.


Reply to: