[PATCH v3] build: select optional libraries

Bruce Richardson bruce.richardson at intel.com
Tue Jun 20 17:01:25 CEST 2023


On Tue, Jun 20, 2023 at 04:33:15PM +0200, Thomas Monjalon wrote:
> 20/06/2023 11:03, Bruce Richardson:
> > On Tue, Jun 20, 2023 at 10:48:50AM +0200, David Marchand wrote:
> > > On Tue, Jun 20, 2023 at 10:45 AM Bruce Richardson
> > > <bruce.richardson at intel.com> wrote:
> > > > > > > > I notice the change in behaviour for enabling the deprecated libs. Is there
> > > > > > > > any other change in behaviour for current users?
> > > > > > >
> > > > > > > The only change I see, is that this implementation breaks enabling
> > > > > > > deprecated libs via disable_libs.
> > > > > > > It may break existing developer build directory and maybe some
> > > > > > > packaging scripts, this is why I am a bit puzzled.
> > > > > > >
> > > > > > > Relooking at the disable_libs option current implementation, it seems
> > > > > > > backward to pass a disable_libs option when you want to build some
> > > > > > > deprecated library.
> > > > > > > It is more straightforward to request building libraries via
> > > > > > > -Denable_libs=<deprecated_lib> explicitly or -Denable_libs=*
> > > > > > > implicitly.
> > > > > > >
> > > > > > > But again, we may be breaking something for people who relied on this behavior.
> > > > > > >
> > > > > >
> > > > > > That's what I expected, and I think that is ok. I just wanted to check that
> > > > > > the change in behaviour was only for the deprecated libs case.
> > > > >
> > > > > Thomas, wdyt?
> > > > > It requires some release note, at least.
> > > > >
> > > > I am assuming this is not targetting this release though, right? Assuming
> > > > 23.11, we can put in a deprecation note informing of the change ahead of
> > > > time too.
> > > 
> > > I was hoping to get it in this release.
> > > But I am fine with postponing and announcing the change beforehand.
> > > 
> > Given the fact that we are likely changing behaviour, and the fact that the
> > deprecated libs makes it more complicated than the drivers one (since we
> > have always on, default on and default off cases to consider), I think it's
> > best we don't rush this.
> 
> I'm not sure what is the best behaviour.
> I tend to think such options should be simple to understand
> with only 3 cases:
> - no option -> default
> - enable option -> only core mandatory and listed libraries
> - disable option -> all but the listed libraries
> It looks simpler to forbid having both enable and disable libraries.
> 
> Would you be open to change the behaviour of the drivers options?
> 

[reducing CC list a bit]

As a further follow-up, I really think we need to move slowly and more
carefully on this. While I can see the simplicity in disallowing the two
options to be specified, depending on how we go about choosing the
enabling of the deprecated libs, we may want to keep support for allowing
both.

Specifically, my current concern/thinking is:
* David points out that using the "disabled_libs" options may not make the
  most logic sense for *enabling* deprecated libs.
* While that is true, I think the usability of enabling them via
  "enabled_libs" could be pretty terrible - unless we start adding more
  complications. Specifically, if someone wants to just enable KNI in the
  build using "enable_libs", specifying "-Denable_libs=kni" will not do
  what they want - sure it will enable kni, but will disable dozens of
  other parts of DPDK.
* Therefore, I think keeping the disabling of deprecated parts of DPDK via
  disabled_libs is easier on users - though agreed it is slightly less
  logical. However, if we forbid using enabled and disabled options
  together, that would mean that to switch to enabled libs style, the user
  has to set both enabled libs, *and* clear the default disabled libs option
  of the deprecated ones.
* Therefore, right now I'm tending more towards something like the status
  quo - disabling deprecated via disable option, but allowing both enable
  and disable options together. This hasn't caused us issues with drivers
  thus far, so I'd be hopeful for using it for libs.

The other alternative, is we come up with:
* another scheme for managing deprecated libs
* a special keyword for enabled libs to cover the default case, that one
  can use to add on the deprecated libs, without having to call out each
  and every other optional library.


More information about the dev mailing list