From owner-svn-ports-head@freebsd.org Wed Sep 16 01:20:10 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AF069C26B3; Wed, 16 Sep 2015 01:20:10 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from vps.amdmi3.ru (vps.amdmi3.ru [109.234.38.216]) by mx1.freebsd.org (Postfix) with ESMTP id 7F0EC11E2; Wed, 16 Sep 2015 01:20:09 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from hive.panopticon (unknown [78.153.152.119]) by vps.amdmi3.ru (Postfix) with ESMTPS id 7D855B064F; Wed, 16 Sep 2015 04:20:01 +0300 (MSK) Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id EC2618B4; Wed, 16 Sep 2015 04:16:35 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id AD10455DD2; Wed, 16 Sep 2015 04:19:14 +0300 (MSK) Date: Wed, 16 Sep 2015 04:19:14 +0300 From: Dmitry Marakasov To: Baptiste Daroussin Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r397026 - head/Mk/Uses Message-ID: <20150916011914.GG3910@hades.panopticon> References: <201509152124.t8FLOgeN003164@repo.freebsd.org> <20150915222216.GA35129@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150915222216.GA35129@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2015 01:20:10 -0000 * Baptiste Daroussin (bapt@FreeBSD.org) wrote: > On Tue, Sep 15, 2015 at 09:24:42PM +0000, Dmitry Marakasov wrote: > > Author: amdmi3 > > Date: Tue Sep 15 21:24:42 2015 > > New Revision: 397026 > > URL: https://svnweb.freebsd.org/changeset/ports/397026 > > > > Log: > > - Use -isystem instead of -I to add ${LOCALBASE}/include to the list of header search paths > > > > First, this prevents ports which use strict -Werror settings from > > build failures in third party headers (real life example is > > devel/pructl which uses -Werror -Weverything and fails in libedit > > header on actually harmless padding warning). > > > > Second, this prevents ports which install headers from picking up > > their own headers from LOCALBASE instead of using ones from WRKDIR, > > which leads to any kind of problems when upgrading via ports. > > > > PR: 203101 > > Approved by: bapt > > Differential Revision: D3618 > > Just to give a bit more information. > Both clang and gcc will lookup for includes (cross building case taken appart) > in that order: > > 1. -Isomthing > 2. -isystem something > 3. /usr/include (plus internal path) > > Meaning some ports were messed up by the fact we used to add -I${LOCALBASE} in > *FLAGS and their build system also providing -I. by having a lookup path that > looks like the following: > > 1. -I${LOCALBASE}/include (first in the CFLAG) > 2. -I. > 3. -isystem > 4. internal > > Meaning if a header is both in the localbase (older version already installed) > and in sources (newer version) the older version will be used which can result > in a lot of different breakage (either silent wrong macros definitions) or > noisy: building errors and other kind of crap. And to clarify even a bit more, if a single directory is specified as both -I and -isystem, e.g. -I/usr/local/include -I. -isystem /usr/local/include -I is actually ignored. That is, this example will leed to the following lookup: 1. -I. 2. -isystem /usr/local/include 3. internal Thus USES=localbase should reliably save us from the case where port build picks up this ports' includes from LOCALBASE instead of WRKDIR. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://amdmi3.ru