From owner-freebsd-ports@freebsd.org Tue Apr 11 01:33:43 2017 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 9144AD3804D for ; Tue, 11 Apr 2017 01:33:43 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-10.reflexion.net [208.70.210.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 541BBB6C for ; Tue, 11 Apr 2017 01:33:42 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 1572 invoked from network); 11 Apr 2017 01:36:36 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 11 Apr 2017 01:36:36 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.0) with SMTP; Mon, 10 Apr 2017 21:33:41 -0400 (EDT) Received: (qmail 14711 invoked from network); 11 Apr 2017 01:33:41 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 11 Apr 2017 01:33:41 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 7FD8AEC91AC; Mon, 10 Apr 2017 18:33:40 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: lang/gcc6-aux build error due to internal Makefile/sh syntax: $${PWDCMD-pwd} is missing a ":" [misidentified problem] Date: Mon, 10 Apr 2017 18:33:40 -0700 References: <1626B3C1-0B4E-4070-A830-0EEEF38E0F87@dsl-only.net> To: John Marino , FreeBSD Ports In-Reply-To: Message-Id: <0C468C62-0DC6-4ECD-951E-D809DB8D48FF@dsl-only.net> X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 01:33:43 -0000 On 2017-Apr-10, at 5:52 PM, Mark Millard wrote: > On 2017-Apr-10, at 1:21 PM, John Marino = wrote: >=20 >> On 4/10/2017 15:12, Mark Millard wrote: >>> On 2017-Apr-10, at 12:12 PM, Mark Millard = wrote: >>>> with line 875 being the one with: @r=3D`${PWD_COMMAND}` >>>>=20 >>>> It appears to me that the notation $${PWDCMD-pwd} is not >>>> what was intended. My guess is that a ":" is missing: >>>>=20 >>>> PWD_COMMAND =3D $${PWDCMD:-pwd} >>=20 >> I grepped gcc source and ${PWDCMD-pwd} shows up everywhere. I assume = it is valid for GNU make. >=20 > My guess about the issue was definitely wrong: simple tests > show that gmake and /bin/sh handle the notation that I > pointed at. >=20 >> I don't know what's going on in your particular case. >> I also don't have access to the reference aarch64 machine anymore. >=20 >=20 > Looking at the log again: Further back there is a message > that I missed: >=20 > checking size of long long... checking for geteuid... checking for = getc_unlocked... configure: error: in = `/usr/obj/portswork/usr/ports/lang/gcc6-aux/work/build/libiberty': > configure: error: cannot compute sizeof (long long) > See `config.log' for more details. > yes > checking for putchar_unlocked... yes > gmake[3]: *** [Makefile:7409: configure-libiberty] Error 1 > gmake[3]: *** Waiting for unfinished jobs.... >=20 > Looking around that config.log shows problems like: >=20 > configure:5452: checking size of long long > configure:5457: = /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/bin/gcc -o = conftest -pipe -B/usr/local/aarch64-freebsd/bin/ -mcpu=3Dcortex-a53 = -DLIBICONV_PLUG -g -fno-strict-aliasing -B/usr/l > ocal/aarch64-freebsd/bin/ -mcpu=3Dcortex-a53 -I/usr/local/include = -DLIBICONV_PLUG -static-libstdc++ -static-libgcc -L/usr/local/lib = conftest.c >&5 > In file included from conftest.c:71:0: > = /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-= aux-freebsd12.0/6.3.1/include-fixed/stdlib.h: In function = 'posix_memalign': > = /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-= aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:192:46: error: expected = declaration specifiers before '__nonnull' > int posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */ > ^~~~~~~~~ > = /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-= aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:252:20: error: storage = class specified for parameter 'malloc_conf' > extern const char *malloc_conf; > ^~~~~~~~~~~ > = /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-= aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:253:15: error: storage = class specified for parameter 'malloc_message' > extern void (*malloc_message)(void *, const char *); > ^~~~~~~~~~~~~~ > = /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-= aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:341:14: error: storage = class specified for parameter 'suboptarg' > extern char *suboptarg; /* getsubopt(3) external variable */ > ^~~~~~~~~ > conftest.c:74:1: error: expected '=3D', ',', ';', 'asm' or = '__attribute__' before '{' token > { > ^ > In file included from conftest.c:71:0: > = /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-= aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:192:6: error: old-style = parameter declarations in prototyped function definition > int posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */ > ^~~~~~~~~~~~~~ > = /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-= aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:192:1: error: parameter = name omitted > int posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */ > ^~~ > = /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-= aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:192:1: error: parameter = name omitted > = /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-= aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:192:1: error: parameter = name omitted > conftest.c:99:1: error: expected '{' at end of input > } > ^ >=20 >=20 >=20 > And looking around for __nonnull in include files: >=20 > # grep -R __nonnull /usr/include/ | more > /usr/include/security/openpam_attr.h:# define OPENPAM_NONNULL(params) = __attribute__((__nonnull__ params)) >=20 >=20 > # grep -R __nonnull = /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-= aux-freebsd12.0/6.3.1/include-fixed/ > = /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-= aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:int = posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */ >=20 > So the __nonnull is from the bootstrap gcc 6.3.1 include-fixed area. >=20 > My guess is that __nonnull was intended to be a macro that expanded to = an attribute > specification but the macro definition ended up missing for some = reason. >=20 > The bootstrap gcc command above shows the results of my CFLAGS > and/or CXXFLAGS in case those are a problem (not that I expect > they would contribute to this specific issue). >=20 >=20 >=20 > I've started an update to other ports so even if they work it > will be a while before the Pine64+ 2GB completes that. I found more material about __nonnull use. The overall summary (from -r311012 back on 2017-Jan-1): The __nonnull() attribute will be deprecrated from our headers and replaced with the Clang _Nonnull qualifier in the future. This was done in -r312934 on 2017-Jan-28. Supporting details follow. . . Revision 312934 - (view) (download) (annotate) - [select for diffs]=20 Modified Sat Jan 28 20:54:43 2017 UTC (2 months, 1 week ago) by pfg=20 File length: 10634 byte(s)=20 Diff to previous 311012 Make use of clang nullability attributes. Replace uses of the GCC __nonnull__ attribute with the clang nullability qualifiers. The replacement should be transparent for clang developers = as the new qualifiers will produce the same warnings and will be useful for static checkers but will not cause aggressive optimizations. GCC will not produce such warnings and developers will have to use upgraded GCC ports built with the system headers from=20 r312538. Hinted by: Apple's Libc-1158.20.4, Bionic libc MFC after: 11.1 Release Differential Revision:=09 https://reviews.freebsd.org/D9004 An earlier submittal says . . . Revision 311012 - (view) (download) (annotate) - [select for diffs]=20 Modified Sun Jan 1 17:16:47 2017 UTC (3 months, 1 week ago) by pfg=20 File length: 10500 byte(s)=20 Diff to previous 306651 Remove some uses of the GCC __nonnull() attribute. While the checks are considered useful, the attribute does dangerous optimizations, removing NULL checks where they can be needed. Remove the uses of this attribute introduced in=20 r281130 : the changes were inspired on Google's bionic where this attribute is not used anymore. The __nonnull() attribute will be deprecrated from our headers and replaced with the Clang _Nonnull qualifier in the future. MFC after: 3 days =3D=3D=3D Mark Millard markmi at dsl-only.net