postfix-current spewing out warnings while building
Kubilay Kocak
koobs.freebsd at gmail.com
Sat Dec 28 03:36:51 UTC 2013
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
-------------- next part --------------
Index: Makefile
===================================================================
--- Makefile (revision 337172)
+++ Makefile (working copy)
@@ -106,7 +106,8 @@
MAKEFILEFLAGS+= CC="${CC}" OPT="${CFLAGS}"
-POSTFIX_CCARGS+= -DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \
+POSTFIX_CCARGS+= \$$(WARN) \
+ -DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \
-DDEF_DAEMON_DIR=\\\"${DAEMONDIR}\\\" \
-DDEF_COMMAND_DIR=\\\"${PREFIX}/sbin\\\" \
-DDEF_SENDMAIL_PATH=\\\"${PREFIX}/sbin/sendmail\\\" \
More information about the freebsd-ports
mailing list