From owner-freebsd-ports@FreeBSD.ORG Sat Dec 28 03:36:51 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD0F625A; Sat, 28 Dec 2013 03:36:51 +0000 (UTC) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A56EA1A59; Sat, 28 Dec 2013 03:36:51 +0000 (UTC) Received: by mail-pa0-f47.google.com with SMTP id kq14so9772920pab.6 for ; Fri, 27 Dec 2013 19:36:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=sgopuXqWQzVkYtHQsSeNFxM/nZd0AFM0YLXs+wIMsls=; b=vy8ncQLLK7oYmT+ayjWc6PXknekt5Rz0MzM+1E4hqiO7hETnx9SG0DyhnEsvV2+9LK HEgR/4OjxnzLWS0C3MhpnFCum5LyYsXc6sawiwoHefW45sbZc1rwp1wjUEFxn41rNI+5 TdAODcqf3lMNSt8AJViMI+BzRp+lN4gBuKpnpeFUmJjW9nvsof85uKGzpnmef4a8dva9 5o7eMzyg6g6UKdkD6hlUG3yckXAvd81B+nq9kZmlNhg4sDXF32vZ5IaZ4Vx5CTYGnMFz P6s8ZgwKGoQsJGCGywV3HUkdRffUY+UarvtIGmna3jfdrh5ajqKuGSgw3CHoJS8zB+lD UkaA== X-Received: by 10.68.219.72 with SMTP id pm8mr13742435pbc.164.1388201811319; Fri, 27 Dec 2013 19:36:51 -0800 (PST) Received: from [192.168.1.7] (ppp59-167-128-11.static.internode.on.net. [59.167.128.11]) by mx.google.com with ESMTPSA id ha10sm65497587pbd.17.2013.12.27.19.36.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Dec 2013 19:36:50 -0800 (PST) Message-ID: <52BE4749.4040703@FreeBSD.org> Date: Sat, 28 Dec 2013 14:36:41 +1100 From: Kubilay Kocak User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Thunderbird/27.0 MIME-Version: 1.0 To: Jakob Breivik Grimstveit , FreeBSD Ports mailing list Subject: Re: postfix-current spewing out warnings while building References: In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: multipart/mixed; boundary="------------070104010503060104030801" Cc: sahil@FreeBSD.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: koobs@FreeBSD.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 03:36:51 -0000 This is a multi-part message in MIME format. --------------070104010503060104030801 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --------------070104010503060104030801 Content-Type: text/plain; charset=windows-1252; name="postfix-also-respect-default-warnings-too.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="postfix-also-respect-default-warnings-too.diff" 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\\\" \ --------------070104010503060104030801--