From owner-freebsd-arch@freebsd.org Thu Mar 9 12:29:49 2017 Return-Path: Delivered-To: freebsd-arch@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 7A25ECFB90E for ; Thu, 9 Mar 2017 12:29:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 6372E3DA for ; Thu, 9 Mar 2017 12:29:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id 62D85CFB90B; Thu, 9 Mar 2017 12:29:49 +0000 (UTC) Delivered-To: arch@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 62666CFB90A; Thu, 9 Mar 2017 12:29:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6D513D9; Thu, 9 Mar 2017 12:29:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.avinity.tv (unknown [77.95.97.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 6FA4B2ACA3; Thu, 9 Mar 2017 13:29:38 +0100 (CET) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_158C0438-7EB6-4369-B706-5BA4441CF800"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: manpath change for ports ? Date: Thu, 9 Mar 2017 13:29:26 +0100 In-Reply-To: <861su6ont5.fsf@desk.des.no> Cc: Tijl Coosemans , ports@FreeBSD.org, arch@FreeBSD.org, Baptiste Daroussin To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= References: <20170306235610.cmpxk27jhoafel6l@ivaldir.net> <86mvcvojzt.fsf@desk.des.no> <20170308204126.6d152c44@kalimero.tijl.coosemans.org> <861su6ont5.fsf@desk.des.no> X-Mailer: Apple Mail (2.3259) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Mar 2017 12:29:49 -0000 --Apple-Mail=_158C0438-7EB6-4369-B706-5BA4441CF800 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 9 Mar 2017, at 09:29, Dag-Erling Sm=C3=B8rgrav wrote: ... > 1) >=20 > | I discovered that lang/gcc48 (and presumably the other gcc ports as > | well) not only have /usr/local/include in their default include = path, > | but actually place it ahead of /usr/include. This is causing me no = end > | of grief with software that uses iconv, because GNU libiconv's = > | f*s up your namespace so the build fails unless you explicitly link = with > | GNU libiconv instead of using the libc version. [...] >=20 > 2) >=20 > | [...] I realized over the weekend that = the > | situation is even worse than I initially thought. Basically, ports = gcc > | is unusable for any other purpose than to build ports which don't > | support clang. Let me explain with a hypothetical scenario: > | > | You are developing a library which is important enough that you need = to > | have the stable version installed on your development system. It is > | installed in /usr/local as usual. You've been working on fixing a = bug, > | and have written a unit test which exercises the relevant code and > | verified that it can deterministically trigger the bug. You fix the = bug > | and 'make check' again, all green. Then you clean out your working > | copy, re-run configure with CC=3Dgcc and 'make check' again. Your = tests > | fail. > | > | What happened is that when you built your code with gcc, the tests = were > | linked and run with the stable version of the library, where the bug = is > | not fixed. You can build with LDFLAGS=3D-L$(top_builddir)/lib, you = can > | even specify the full path to the library in LDADD for each = individual > | test, it doesn't matter. It will *always* pick the installed = version > | first. The only way to get your tests to pass is to not have the > | library installed. Please pin this email for re-use the next time a discussion is started about adding /usr/local to the default include and library paths for the base system compiler... It's been more than a year now, so I expect it to be regurgitated any time soon. :) -Dimitry --Apple-Mail=_158C0438-7EB6-4369-B706-5BA4441CF800 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAljBSrEACgkQsF6jCi4glqO4TgCdFuLXd4PMTuMXebe5Xsp7kCq+ sM0AnjCCTOAdqi5P9oGEcS8gYOmuxOlC =7qLs -----END PGP SIGNATURE----- --Apple-Mail=_158C0438-7EB6-4369-B706-5BA4441CF800--