Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Jan 2014 10:47:39 +0100
From:      Jakob Breivik Grimstveit <jakob@grimstveit.no>
To:        koobs@freebsd.org
Cc:        FreeBSD Ports mailing list <freebsd-ports@freebsd.org>, sahil@freebsd.org
Subject:   Re: postfix-current spewing out warnings while building
Message-ID:  <CAFVH1KWzS-QqsZ6sKQPGf597FD4PhPevzDNrpqVhyGjYsoL%2BdA@mail.gmail.com>
In-Reply-To: <52BE4749.4040703@FreeBSD.org>
References:  <CAFVH1KWRO38cxwHLHni1t4hLjUiV19S6uKNGqKhDNfJ363spxQ@mail.gmail.com> <52BE4749.4040703@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Thank you for the explanatory reply. Much appreciated. I've tried, however,
patching mail/postfix (not lang/postfix), but I get the following erroneous
output:

# pwd
/usr/ports/mail/postfix
# patch < postfix-also-respect-default-warnings-too.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: Makefile
|===================================================================
|--- Makefile    (revision 337172)
|+++ Makefile    (working copy)
--------------------------
Patching file Makefile using Plan A...
patch: **** malformed patch at line 7: MAKEFILEFLAGS+= CC="${CC}"
OPT="${CFLAGS}"


FYI. I assume you and maintainer are much better at this than I am :-).


-- 
Vyrdsamt,
    Jakob Breivik Grimstveit | +47 4829 8152
    http://grimstveit.no/jakob



On Sat, Dec 28, 2013 at 4:36 AM, Kubilay Kocak <koobs.freebsd@gmail.com>wrote:

> On 27/12/2013 6:59 PM, Jakob Breivik Grimstveit wrote:
> > mail/postfix-current behaves somewhat strange while building, is it
> > anything I should correct?
> >
> >
> > $ sudo make clean
> > make: "/usr/ports/mail/postfix-current/Makefile" line 92: warning:
> Couldn't
> > read shell's output for "/usr/bin/grep -m 1 '^purgestat'
> > /etc/mail/mailer.conf || true"
> > make[1]: "/usr/ports/mail/postfix-current/Makefile" line 92: warning:
> > Couldn't read shell's output for "/usr/bin/grep -m 1 '^purgestat'
> > /etc/mail/mailer.conf || true"
> > ===>  Cleaning for postfix-current-base-2.11.20131001,4
> > make[1]: "/usr/ports/mail/postfix-current/Makefile" line 92: warning:
> > Couldn't read shell's output for "/usr/bin/grep -m 1 '^purgestat'
> > /etc/mail/mailer.conf || true"
> >
> > [...]
> >
> > And while building, I get a bunch (probably thousands) of these:
> >
> > duplex_pipe.c:8:1: warning: '/*' within block comment [-Wcomment]
> > /*
> > ^
> > duplex_pipe.c:9:1: warning: '/*' within block comment [-Wcomment]
> > /*      int     duplex_pipe(fds)
> > ^
> > duplex_pipe.c:10:1: warning: '/*' within block comment [-Wcomment]
> > /*      int     *fds;
> > ^
> >
> > [...]
> >
> > ../../include/argv.h:6:1: warning: '/*' within block comment [-Wcomment]
> > /*      argv 3h
> > ^
> > ../../include/argv.h:7:1: warning: '/*' within block comment [-Wcomment]
> > /* SUMMARY
> > ^
> > ../../include/argv.h:8:1: warning: '/*' within block comment [-Wcomment]
> > /*      string array utilities
> > ^
> > ../../include/argv.h:9:1: warning: '/*' within block comment [-Wcomment]
> > /* SYNOPSIS
> > ^
> >
> > Thank you in advance.
> >
>
> Hi Jakob,
>
> These comment warnings have been observable for as long as I can
> remember, though only with postfix ports (not upstream) when also built
> with clang.
>
> This is caused by the override of CC and CCARGS, which clobbers the
> warnings postfix configures by default. Another instance of these
> symptoms, albeit with a slightly different root cause can be seen here:
>
> http://marc.info/?l=postfix-users&m=134260003817238&w=2
>
> The reason behind the override is a policy in the porters handbook that
> recommends respecting user-supplied CC, CXX and CFLAGS, which the
> postfix ports follow:
>
>
> http://www.au.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#dads-cc
>
>
> http://www.au.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#dads-cflags
>
> While the recommendations above are well-intentioned and grounded
> (respect user choice & consistent builds), this is one example of where
> doing so is at least a POLA violation, but ultimately harmless.
>
> At worst, for other software in the ports tree where upstream authors
> customise flags for very good reasons, the results could be functionally
> pathological. This is fortunately not the case here, but worth us
> considering more broadly.
>
> Attached is a patch (to lang/postfix) which restores the default warning
> flags while continuing to respect user-supplied flags. This can likely
> be applied to all postfix ports. Maintainer is CC'd.
>
> I've tested it quickly here with the expected results, if you could do
> the same and let us know how it goes, that would be great.
>
> Thanks :)
>
> --
> koobs
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFVH1KWzS-QqsZ6sKQPGf597FD4PhPevzDNrpqVhyGjYsoL%2BdA>