Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jul 2017 13:54:17 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Mark Millard <markmi@dsl-only.net>
Cc:        Ed Maste <emaste@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@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)
Message-ID:  <3bda313e-aac0-4558-6346-2d95170d2dbc@FreeBSD.org>
In-Reply-To: <8E16AF37-4D8B-4099-B366-2BA95632ECA7@dsl-only.net>
References:  <0E42D991-D350-4DC1-A683-CEA506167520@dsl-only.net> <AF2592BC-2409-4B73-A8A8-50C999957231@dsl-only.net> <d6971b8c-06a3-afdc-a6b0-788dbe0890f2@FreeBSD.org> <8E16AF37-4D8B-4099-B366-2BA95632ECA7@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--qWI30b2J9VMEGvwhh9RtDMRmndnIiWcrI
Content-Type: multipart/mixed; boundary="jelPJTx6o6sONBobjlwg2LkD9EI7QdxGO";
 protected-headers="v1"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: Mark Millard <markmi@dsl-only.net>
Cc: Ed Maste <emaste@freebsd.org>,
 FreeBSD Toolchain <freebsd-toolchain@freebsd.org>,
 FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
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>
 <AF2592BC-2409-4B73-A8A8-50C999957231@dsl-only.net>
 <d6971b8c-06a3-afdc-a6b0-788dbe0890f2@FreeBSD.org>
 <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 <bdrewery@FreeBSD.org> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bda313e-aac0-4558-6346-2d95170d2dbc>