From owner-freebsd-ppc@freebsd.org Wed Jul 5 20:54:28 2017 Return-Path: Delivered-To: freebsd-ppc@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 97E16D919D4; Wed, 5 Jul 2017 20:54:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57BB7705D4; Wed, 5 Jul 2017 20:54:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 689B3130A7; Wed, 5 Jul 2017 20:54:27 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 665205A39; Wed, 5 Jul 2017 20:54:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id fqeIemkLryHy; Wed, 5 Jul 2017 20:54:23 +0000 (UTC) Subject: Re: head -r320458 (e.g.) amd64 -> powerpc64 cross build's install32 during installworld: /usr/src/share/mk/bsd.linker.mk tried to use "head" when PATH provided no access (head is missing) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com CE2735A34 To: Mark Millard Cc: Ed Maste , FreeBSD Toolchain , FreeBSD PowerPC ML References: <0E42D991-D350-4DC1-A683-CEA506167520@dsl-only.net> <8E16AF37-4D8B-4099-B366-2BA95632ECA7@dsl-only.net> From: Bryan Drewery Organization: FreeBSD Message-ID: <3bda313e-aac0-4558-6346-2d95170d2dbc@FreeBSD.org> Date: Wed, 5 Jul 2017 13:54:17 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <8E16AF37-4D8B-4099-B366-2BA95632ECA7@dsl-only.net> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qWI30b2J9VMEGvwhh9RtDMRmndnIiWcrI" X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 20:54:28 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qWI30b2J9VMEGvwhh9RtDMRmndnIiWcrI Content-Type: multipart/mixed; boundary="jelPJTx6o6sONBobjlwg2LkD9EI7QdxGO"; protected-headers="v1" From: Bryan Drewery To: Mark Millard Cc: Ed Maste , FreeBSD Toolchain , FreeBSD PowerPC ML Message-ID: <3bda313e-aac0-4558-6346-2d95170d2dbc@FreeBSD.org> Subject: Re: head -r320458 (e.g.) amd64 -> powerpc64 cross build's install32 during installworld: /usr/src/share/mk/bsd.linker.mk tried to use "head" when PATH provided no access (head is missing) References: <0E42D991-D350-4DC1-A683-CEA506167520@dsl-only.net> <8E16AF37-4D8B-4099-B366-2BA95632ECA7@dsl-only.net> In-Reply-To: <8E16AF37-4D8B-4099-B366-2BA95632ECA7@dsl-only.net> --jelPJTx6o6sONBobjlwg2LkD9EI7QdxGO Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 7/5/17 1:35 PM, Mark Millard wrote: > On 2017-Jul-5, at 12:36 PM, Bryan Drewery wrote:= >=20 >> On 6/29/17 6:21 PM, Mark Millard wrote: >>> [I found where the tools are listed that are copied, >>> the list that is missing head.] >>> >>> . . . >>> In /usr/src/Makefile.inc1 : >>> >>> ITOOLS=3D [ awk cap_mkdb cat chflags chmod chown cmp cp \ >>> date echo egrep find grep id install ${_install-info} \ >>> ln make mkdir mtree mv pwd_mkdb \ >>> rm sed services_mkdb sh strip sysctl test true uname wc ${_zon= einfo} \ >>> ${LOCAL_ITOOLS} >>> >>> does not list "head" as a tool. >>> >>> But I can externally add it via LOCAL_ITOOLS use. >>> >> >> This change should not be needed. We don't want to be running 'ld' >> during installworld. The changes I made around this time should alrea= dy >> cover the problem. Is it still occurring on a more recent >> buildworld+installworld, without the ITOOLS change? >=20 > ld was still in use last I checked. I've been using LOCAL_ITOOLS > to avoid the problem for powerpc64's world32 activity where the > problem was happening for me. >=20 > See Ed Maste's -r320502 check in which I expect is a alternate > workaround for the lack of "head" in that I get the same message > that is being avoided unless I cause "head" to be in the ITOOLS: >=20 >=20 > Author: emaste > Date: Fri Jun 30 16:34:17 2017 > New Revision: 320502 > URL:=20 > https://svnweb.freebsd.org/changeset/base/320502 >=20 >=20 > Log: > bsd.linker.mk: add band-aid for linker invocation failure > =20 > In some cases bsd.linker.mk reports an error like: > =20 > make[4]: ".../share/mk/bsd.linker.mk" line 56: > Unknown linker from LD=3Dld -m elf32ppc_fbsd:" > =20 > For now change this to a .warning, and then assume GNU ld 2.17.50. > At present the linker type detection is used only for enabling build-= id, > and we can carry on without it when type detection fails. > =20 > Also, show errors from ${LD} --version to aid in failure diagnosis. > Successful invocations of ${LD} --version produce no output on stderr= > so this will not create any spam in non-failing builds. > =20 > Tested by: swills > Sponsored by: The FreeBSD Foundation > Differential Revision:=09 > https://reviews.freebsd.org/D11424 >=20 >=20 > Modified: > head/share/mk/bsd.linker.mk >=20 > Modified: head/share/mk/bsd.linker.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/bsd.linker.mk Fri Jun 30 16:16:21 2017 (r320501) > +++ head/share/mk/bsd.linker.mk Fri Jun 30 16:34:17 2017 (r320502) > @@ -47,9 +47,9 @@ ${var}=3D ${${var}.${${X_}_ld_hash}} > =20 > .if ${ld} =3D=3D "LD" || (${ld} =3D=3D "XLD" && ${XLD} !=3D ${LD}) > .if !defined(${X_}LINKER_TYPE) || !defined(${X_}LINKER_VERSION) > -_ld_version!=3D ${${ld}} --version 2>/dev/null | head -n 1 || echo non= e > +_ld_version!=3D (${${ld}} --version || echo none) | head -n 1 > .if ${_ld_version} =3D=3D "none" > -.error Unable to determine linker type from ${ld}=3D${${ld}} > +.warning Unable to determine linker type from ${ld}=3D${${ld}} > .endif > .if ${_ld_version:[1..2]} =3D=3D "GNU ld" > ${X_}LINKER_TYPE=3D bfd > @@ -58,7 +58,9 @@ _v=3D ${_ld_version:M[1-9].[0-9]*:[1]} > ${X_}LINKER_TYPE=3D lld > _v=3D ${_ld_version:[2]} > .else > -.error Unknown linker from ${ld}=3D${${ld}}: ${_ld_version} > +.warning Unknown linker from ${ld}=3D${${ld}}: ${_ld_version}, default= ing to bfd > +${X_}LINKER_TYPE=3D bfd > +_v=3D 2.17.50 > .endif > ${X_}LINKER_VERSION!=3D echo "${_v:M[1-9].[0-9]*}" | \ > awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' >=20 >=20 >=20 > The actual error is from the piping through head > when head is missing, at least in my context. Right, neither that commit nor adding head to [LOCAL_]ITOOLS should be needed. I wasn't able to recreate any of the problems when I tried last. I will look again. --=20 Regards, Bryan Drewery --jelPJTx6o6sONBobjlwg2LkD9EI7QdxGO-- --qWI30b2J9VMEGvwhh9RtDMRmndnIiWcrI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJZXVH6AAoJEDXXcbtuRpfPpOEIAL83WZ4C5xN72VhNhG7iKF9/ mzHHd3WhBd0PGfQS3a1CjttGYb+cFULO9L0ku9yrI90Top9Sq4tBtdqjIqwJNRmz LdWTH5Ks5CoFYRkOXUK1iZd+OYmtmaXC8k/ajzy/M9TRnocB/g9jW2aTeTgXw6lo h40hzvIM7FbHqMQByKX3FmKMMB1IWiqeclVQFNJ7/BF4lCEmez8acVUysfESj9k/ 556zZ9AJEV02ZpwvA6OIB57PQEOq4X+3QJwxOZzU6QhuUyEA9PbVSghKz3vpIQpO QKOZU7tSxfzui4Gp6k4eJFA25xJZxjtxxfocUUBvjsAD3QSP3hsDPf9XnjiZKuU= =3LZh -----END PGP SIGNATURE----- --qWI30b2J9VMEGvwhh9RtDMRmndnIiWcrI--