bin/127573: [patch] add proper library dependencies to bsdlabel and fdisk

Ruslan Ermilov ru at FreeBSD.org
Tue Sep 23 18:00:28 UTC 2008


On Tue, Sep 23, 2008 at 05:52:27PM +0400, Eygene Ryabinkin wrote:
> Ruslan, good day.
> 
> Tue, Sep 23, 2008 at 01:15:02PM +0000, ru at FreeBSD.org wrote:
> > Synopsis: [patch] add proper library dependencies to bsdlabel and fdisk
> > 
> > State-Changed-From-To: open->closed
> > State-Changed-By: ru
> > State-Changed-When: Tue Sep 23 13:13:41 UTC 2008
> > State-Changed-Why: 
> > Patch applied, thanks.
> 
> Thank you!
> 
> > Tinderboxes don't see it because they have default option set
> > without NO_DYNAMICROOT.
> 
> You mean that dynamic executables are compiled with something like
> '--allow-shlib-undefined'?  Am I right that this is due to the
> complexity of library build ordering, so one relies on the fact that
> after the build all symbols, unresolved at the linkage time, will be
> present?
> 
> Thanks for the enlightenment.
> 
fdisk(8) and bsdlabel(8) only use libgeom API, and don't use libbsdxml
and libsbuf directly.  When compiling them dynamically (i.e., using
the default build configuration), specifying libgeom is enough --
all symbols that they use are present in libgeom.so.  The fact that
libgeom also uses libbsdxml and libsbuf internally is hidden behind
the static linkage.

It could be that these tools only used parts of libgeom API that
don't need libbsdxml nor libsbuf; in that case, even with static
linkage they would be unnecessary.


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer


More information about the freebsd-bugs mailing list