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

Re: DEB_BUILD_OPTIONS=nowerror



On Tue, Feb 28, 2023 at 06:05:13PM +0100, Sven Mueller wrote:

> > It isn't clear to me from the discussion history that this is the actual
> > use case at issue.  But supposing it is, that's one use case; and it's a
> > use case that can be addressed without having to make any per-package
> > changes and without having to make any changes to dpkg-buildflags
> > interfaces by exporting

> >   DEB_CFLAGS_APPEND=-Wno-error
> >   DEB_CXXFLAGS_APPEND=-Wno-error

> > as part of the bootstrap build environment, for all packages.

> Now, if all packages would just use the flags from dpkg-buildflags as is,
> or as the final part of CFLAGS/CXXFLAGS, that would be nice. However, IME,
> that is not always the case and some maintainers append -Werror in
> particular.

This situation is not improved by the proposed added flag, because in both
cases all that changes is the output of dpkg-buildflags.  Packages that are
not respecting the dpkg-buildflags interface will be problematic independent
of this proposal.

> Following this discussion, I fear we might not reach consensus. But my ideal
> (strong) suggestion to package maintainers would be:

> 1) Don't use -Werror (or equivalent for your packages language) during
> normal
> builds (i.e. on buildd)

> 2) Do use -Werror via some mechanism (DEB_CFLAGS_APPEND)? during CI builds

> 3) Actually utilize CI builds to detect any breakages early.

This is conceptually interesting to me.  In practice, I don't see us using
this in Ubuntu.  We have per-architecture differences from Debian (ppc64el
building with -O3 by default; riscv64 being a release architecture where it
isn't in Debian) that make it interesting to pick up on per-architecture
build failures caught by -Werror and not without.  But it's not practical to
do CI -Werror builds; when we do out-of-archive rebuilds for all
architectures, it's a significant committment of resources and each rebuild
takes about a month to complete (on the slowest archs).  And to be able to
effectively analyze build results to identify Werror-related failures with
high signal would require two parallel builds, one with and without the
flag, built against the same baseline.  So since this is infeasible, if
Debian decides to pass -Wno-error by default from dpkg-buildflags, we might
find ourselves diverging in Ubuntu.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: PGP signature


Reply to: