From owner-freebsd-ports@freebsd.org Fri Nov 27 13:42:10 2015 Return-Path: Delivered-To: freebsd-ports@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 EB75DA39489 for ; Fri, 27 Nov 2015 13:42:10 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DB52163D; Fri, 27 Nov 2015 13:42:10 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wmww144 with SMTP id w144so56091130wmw.1; Fri, 27 Nov 2015 05:42:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Fkf3jsTNhrTtnbU6qK3jdly5UrUKnicbXj99Uh024Do=; b=pvYOGdyXjQb5t/vNbW89wd0nzJkaTi7R4KJHvZUwpqqQ+8ZvVzPloT4sMnrtYrEySv H390LPkuGmnuqtE1AZxQ1nbOkXBAjzqC75isZN+v4Mg448IAKZ83YUf/89Px7uEb76OL wFon99uk2v8Aa6jHpueMGM0Ij+aaJT66tN7bZMTCZ5kiewW65s79oE/0RbyxU8vSS3U+ XsCtPUQpqfc8upztybjzNH/dzIXy7y25bkczaZc/YeqU2FOsU5A6u09Grfth1Wk6tDjM rH7m9hGXipZBzPiw/ah9tanciyOe/OxKJSjh8fClw8Q0Aw7zW0n3P2gKSsH+je/Pk/oe Fd4g== X-Received: by 10.194.189.68 with SMTP id gg4mr63893544wjc.146.1448631728735; Fri, 27 Nov 2015 05:42:08 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id q77sm7506937wmd.22.2015.11.27.05.42.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Nov 2015 05:42:07 -0800 (PST) Sender: Baptiste Daroussin Date: Fri, 27 Nov 2015 14:42:06 +0100 From: Baptiste Daroussin To: Tijl Coosemans Cc: Rainer Hurling , Gerald Pfeifer , freebsd-ports@freebsd.org Subject: Re: lang/gcc48 fails to build [on HEAD] Message-ID: <20151127134205.GB17547@ivaldir.etoilebsd.net> References: <564040EE.6090504@gwdg.de> <5642362C.7000609@gwdg.de> <20151127125954.GA17547@ivaldir.etoilebsd.net> <20151127142405.20af4925@kalimero.tijl.coosemans.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZoaI/ZTpAVc4A5k6" Content-Disposition: inline In-Reply-To: <20151127142405.20af4925@kalimero.tijl.coosemans.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 13:42:11 -0000 --ZoaI/ZTpAVc4A5k6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 27, 2015 at 02:24:05PM +0100, Tijl Coosemans wrote: > On Fri, 27 Nov 2015 13:59:54 +0100 Baptiste Daroussin = wrote: > > On Tue, Nov 10, 2015 at 07:23:40PM +0100, Rainer Hurling wrote: > >> I think I found the problem. > >>=20 > >> In my initial mail of this thread, I reported, that after upgrading > >> Freebsd 11.0-CURRENT to r290538 (including locale and localedef update= s) > >> I am not able to build lang/gccXX any more. All I get are errors like > >> that in usr/ports/lang/gccXX/work/build/gcc: > >>=20 > >> ---- > >> In file included from .././../gcc-4.8.5/gcc/genflags.c:26: > >> In file included from ./tm.h:16: > >> ./options.h:4293:3: error: redefinition of enumerator 'OPT_C' > >> OPT_C =3D 129, /* -C */ > >> ^ > >> ---- > >>=20 > >> After more than 20 of them the build stops with > >> fatal error: too many errors emitted, stopping now [-ferror-limit=3D] > >> 20 errors generated. > >>=20 > >>=20 > >> This is with locale for Germany: > >> LANG=3Dde_DE.UTF-8 > >> LC_CTYPE=3D"de_DE.UTF-8" > >> LC_COLLATE=3D"de_DE.UTF-8" > >> LC_TIME=3D"de_DE.UTF-8" > >> LC_NUMERIC=3D"de_DE.UTF-8" > >> LC_MONETARY=3D"de_DE.UTF-8" > >> LC_MESSAGES=3D"de_DE.UTF-8" > >> LC_ALL=3D > >>=20 > >>=20 > >> If I use 'LC_COLLATE=3D"C"' for the build, the build works fine again: > >>=20 > >> cd /usr/ports/lang/gcc48 > >> env LC_COLLATE=3D"C" make > >> ... > >>=20 > >>=20 > >> So it seems, that something with the new 'locale' code in base of HEAD > >> is not working as expected here? (At least for other locales than US?) > >>=20 > >> I added bapt@, because he is the author introducing the new code into = HEAD. > >>=20 > >> Hope, my explanations are clear enough to get the problem. Please feel > >> free to ask for more information, if needed. > >=20 > > Your explanations are good, sorry for the delay for my reply I will look > > into it. >=20 > I ran into this with lang/sdcc* which includes cpp from gcc. At some > point the build runs an awk script (opt-gather.awk) that collects command > line options defined in *.opt files, sorts them and then puts them into > a C array. The problem seems to be that FreeBSD awk takes collation into > account when sorting strings while GNU awk doesn't. POSIX says that > FreeBSD is correct, so I was thinking of adding something like this to > bsd.port.mk: >=20 > USE_LOCALE?=3D C > LANG=3D ${USE_LOCALE} > LC_ALL=3D ${USE_LOCALE} > .export LANG LC_ALL >=20 > This gives a consistent locale environment for port builds. Some ports > already set LANG or LC_ALL. That would have to be reviewed and I haven't > had time for that yet. yeah we should imho to that. The same issue appears with GNU tr which also do not take in account collation (IIRC) while ours do. Best regards, Bapt --ZoaI/ZTpAVc4A5k6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlZYXa0ACgkQ8kTtMUmk6ExonACfXl/ZaXS+ACv/PL1sanawZ27y eK8An2mMFSTVO2k8hPxLLjXJ5GOBrDAJ =X2dD -----END PGP SIGNATURE----- --ZoaI/ZTpAVc4A5k6--