Stuart Henderson wrote:
> On 2021/12/12 14:16, Stefan Hagen wrote:
> > Stuart Henderson wrote:
> > > On 2021/12/12 12:10, Stefan Hagen wrote:
> > > > Anthony J. Bentley wrote:
> > > > > Stuart Henderson writes:
> > > > > > Please put them in LIB_DEPENDS/WANTLIB with the annotation in the 
> > > > > > comment. 
> > > > > > What they're doing is not safe/reliable because it relies on the 
> > > > > > library 
> > > > > > ABI not changing. Adding as a LIB_DEPENDS ensures that yquake is 
> > > > > > updated 
> > > > > > when required due to any incompatible changes to the libraries.
> > > > > 
> > > > > This needs to be documented somewhere. bsd.port.mk(5) implies that
> > > > > LIB_DEPENDS is not necessary for dlopen'd libraries:
> > > > > 
> > > > >   LIB_DEPENDS <spec> not needed for <FULLPKGPATH>  There doesn't seem 
> > > > > to be
> > > > >   any WANTLIB to match the given LIB_DEPENDS.  Thus, the LIB_DEPENDS 
> > > > > won't
> > > > >   turn into a @depends line in the created package.  This is often 
> > > > > because
> > > > >   of confusion between LIB_DEPENDS and RUN_DEPENDS: RUN_DEPENDS is 
> > > > > needed
> > > > >   for dlopen'd libraries.
> > > > 
> > > > I thought so too. What about this?
> > > 
> > > 
> > > But I think maybe we should just stop suggesting that completely (I
> > > think it relates to a shortcut of just listing libraries for _all_
> > > subpackages in LIB_DEPENDS so they end up in every LIB_DEPENDS-subpkg
> > > and relying on tools to prune the ones which aren't needed; in practice
> > > afaik no port does that intentionally).
> > > 
> > > Secondly "is safer" isn't really informative. Safer why? Unless it's
> > > going to explain in more detail then something like "should be added"
> > > would be better than "is safer".
> > > 
> > > (also a nit: for manpages the standard is "new sentence -> new line").
> > 
> > I started to rewrite the paragraph and add more information about how 
> > dlopen is used and why rebuilds are necessary.
> > 
> > But that made me think about how those reasons do not matter at all. We
> > have libraries ports depend on. Ports should be updated when the library
> > changes. No matter how the library is used. I think it's as simple as
> > that.
> 
> Not quite - ports using a shared library only need to be updated if the
> ABI changes (library version number changes) - ports using a static library
> need to be updated every time the library changes.

As far as I understood, the static library case is not handled 
automatically. So the port compiling in the library statically needs a 
manual REVISION bump.

So from a port perspective, the next best automatic case is to handle 
them the same way.

At least as long as we don't introduce LIB_STATIC which could lead to a 
tighter coupling of ports.

But I see that "when the library changes" is not precise enough for 
either case.

Best Regards,
Stefan

Reply via email to