Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jun 2018 17:15:17 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Mark Millard <marklmi26-fbsd@yahoo.com>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: Still true at -r333575 : 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:  <fad9dd18-724b-e086-b707-43b287b56c48@FreeBSD.org>
In-Reply-To: <67D92B43-5124-4EDF-BA26-26CE8B082FE7@yahoo.com>
References:  <0E42D991-D350-4DC1-A683-CEA506167520@dsl-only.net> <AF2592BC-2409-4B73-A8A8-50C999957231@dsl-only.net> <d6971b8c-06a3-afdc-a6b0-788dbe0890f2@FreeBSD.org> <8F22B659-90DE-42E5-B4C6-75C9B9626462@dsl-only.net> <8EB87EA5-0ED6-4F46-80FC-1A0DB29CF7D6@dsl-only.net> <84A73CB0-CBCB-4EE4-A4B7-B8B2F25EECB5@yahoo.com> <9086ff35-009b-c965-4970-3f8ad4fe6e6b@FreeBSD.org> <67D92B43-5124-4EDF-BA26-26CE8B082FE7@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--s6hop6ffkKeCVuIafkun1PpXAgt4rntyK
Content-Type: multipart/mixed; boundary="VYa6WOLOVRhOMxQKffa1d2pZA32tkNtL4";
 protected-headers="v1"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: Mark Millard <marklmi26-fbsd@yahoo.com>
Cc: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>,
 FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Message-ID: <fad9dd18-724b-e086-b707-43b287b56c48@FreeBSD.org>
Subject: Re: Still true at -r333575 : 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>
 <8F22B659-90DE-42E5-B4C6-75C9B9626462@dsl-only.net>
 <8EB87EA5-0ED6-4F46-80FC-1A0DB29CF7D6@dsl-only.net>
 <84A73CB0-CBCB-4EE4-A4B7-B8B2F25EECB5@yahoo.com>
 <9086ff35-009b-c965-4970-3f8ad4fe6e6b@FreeBSD.org>
 <67D92B43-5124-4EDF-BA26-26CE8B082FE7@yahoo.com>
In-Reply-To: <67D92B43-5124-4EDF-BA26-26CE8B082FE7@yahoo.com>

--VYa6WOLOVRhOMxQKffa1d2pZA32tkNtL4
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 5/19/2018 6:04 PM, Mark Millard wrote:
> On 2018-May-14, at 5:04 PM, Bryan Drewery <bdrewery at FreeBSD.org> wro=
te:
>=20
>> On 5/13/2018 1:13 AM, Mark Millard wrote:
>>> Retrying the amd64 -> powerpc64 cross build via a powerpc64-gcc
>>> this time, combined with WITH_LIB32=3D , got: "sh: head: not found" a=
nd its
>>> later consequences, like before for installworld (to a directory on t=
he
>>> amd64 host context). This is from the /usr/src/share/mk/bsd.linker.mk=
 line
>>> that results in:
>>>
>>> (/usr/local/powerpc64-freebsd/bin/ld --version || echo none) | head -=
n 1
>>>
>>> but head is not available by default at the time (lib32 context). (I =
make
>>> head be available via using LOCAL_ITOOLS=3Dhead in order to work arou=
nd the
>>> issue.)
>>>
>>> An example of the messages (without having LOCAL_ITOOLS=3Dhead) is:
>>>
>>> --- _installlinks ---
>>> install -l s  ../../libexec/ld-elf32.so.1 /usr/obj/DESTDIRs/xtcgcc-po=
werpc64-installworld/usr/libexec/ld-elf32.so.1
>>> cd /usr/src/usr.bin/ldd; PROG=3Dldd32 . . .
>>> . . .
>>> . . . MAKEOBJDIRPREFIX=3D MK_MAN=3Dno MK_HTML=3Dno  MK_TOOLCHAIN=3Dno=
   -DLIBRARIES_ONLY  install
>>> sh: head: not found
>>> make[4]: "/usr/src/share/mk/bsd.linker.mk" line 47: warning: "(/usr/l=
ocal/powerpc64-unknown-freebsd12.0/bin/ld --version || echo none) | head =
-n 1" returned non-zero status
>>> make[4]: "/usr/src/share/mk/bsd.linker.mk" line 58: warning: Unknown =
linker from XLD=3D/usr/local/powerpc64-unknown-freebsd12.0/bin/ld: , defa=
ulting to bfd
>>>
>>>
>>> The two "make[4]" lines are consequences of the prior "sh: head: not =
found"
>>> issue that leaded to a "non-zero status" independent of the prior "--=
version"
>>> and "echo none" material. It then leads to assuming bfd.
>>>
>>> Using LOCAL_ITOOLS=3Dhead makes head available and so then the status=
 value
>>> check works.
>>>
>>
>> Sure but this command being executed never should be executing during
>> install; Adding 'head' as a tool isn't the right fix.
>>
>> I have never been able to recreate the problem here. I have an idea I'=
ll
>> test.
>>
>=20
> May be the following will help. It shows a clear difference
> between the ${XLD} and ${LD} text that is used in:
>=20
> .if ${ld} =3D=3D "LD" || (${ld} =3D=3D "XLD" && ${XLD} !=3D ${LD})
>=20
> when ${LD} =3D=3D "XLD" in my context.
>=20
> My src config that is involved has (extracted):
>=20
> TO_TYPE=3Dpowerpc64
> VERSION_CONTEXT=3D12.0
> CROSS_TOOLCHAIN=3D${TO_TYPE}-gcc
> X_COMPILER_TYPE=3Dgcc
> CROSS_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-unknown-freebsd${VE=
RSION_CONTEXT}/bin/
> .if ${.MAKE.LEVEL} =3D=3D 0
> XLD=3D/usr/local/${TOOLS_TO_TYPE}-unknown-freebsd${VERSION_CONTEXT}/bin=
/ld
> .export XLD
> .endif
>=20
> and is used via:
>=20
> SRCCONF=3D"/dev/null" SRC_ENV_CONF=3D"/root/src.configs/src.conf.powerp=
c64-xtoolchain-gcc.amd64-host"
>=20
> Given that, by adding a:
>=20
> .warning "ld=3D${ld} XLD=3D${XLD} LD=3D${LD} LINKER_TYPE=3D${${X_}LINKE=
R_TYPE} LINKER_VERSION=3D${${X_}LINKER_VERSION}"
>=20
> line just before before the /usr/src/share/mk/bsd.linker.mk line:
>=20
> _ld_version!=3D   (${${ld}} --version || echo none) | head -n 1
>=20
> that is being (incorrectly) executed and not finding head the
> extra .warning reported:
>=20
> make[4]: "/usr/src/share/mk/bsd.linker.mk" line 47: warning: "ld=3DXLD =
XLD=3D/usr/local/powerpc64-unknown-freebsd12.0/bin/ld LD=3D/usr/local/pow=
erpc64-unknown-freebsd12.0/bin/ld -m elf32ppc_fbsd LINKER_TYPE=3D LINKER_=
VERSION=3D"
>=20
> Note that the LD=3D part has the text:
>=20
> -m elf32ppc_fbsd
>=20
> in it where my explicit XLD assignment does not.
>=20
>=20
> Is my src config handling of XLD non-supported in some way?
> Did I step outside the intended coverage?
>=20
>=20

https://people.freebsd.org/~bdrewery/patches/x_vars_metadata.diff

This should fix it (requires buildworld first).  I plan to commit it
tomorrow after more testing along with WITH_SYSTEM_LINKER support.


--=20
Regards,
Bryan Drewery


--VYa6WOLOVRhOMxQKffa1d2pZA32tkNtL4--

--s6hop6ffkKeCVuIafkun1PpXAgt4rntyK
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJbJFaVAAoJEDXXcbtuRpfPqEoIAKti5/0QCmEO1TNELP3VAq2p
vDMVrwersWgFYRry8KMaMNND9f5t/I7Qi3ak4SMuPV9AMTIN0EeQ63hlPRuCfGLP
LFLVr70ghGwTcNFSxlJSFIPLD2ornJMFpNHXpin6W1Xd20Tz9h6Ycp8FHYWr1PLz
f62wvboTQ15Pezt4+CnrEefgsVJZa3PjfucLjSStB2K82pTB80SkVANJw528eVCs
+9yC9VqmC82caHX6DCiWxYd2XSg5W0cCCZWfCHFKKdzRWZi7TogRUK5rXbOvHXms
8aeoz+i6bpDNGLhYEt4gAQJSSHjyHIXj63gj9e5FkTLNaLcZZmGTiykwZvAvpIk=
=ueHh
-----END PGP SIGNATURE-----

--s6hop6ffkKeCVuIafkun1PpXAgt4rntyK--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fad9dd18-724b-e086-b707-43b287b56c48>