From owner-freebsd-toolchain@freebsd.org Thu Jun 29 22:33:35 2017 Return-Path: Delivered-To: freebsd-toolchain@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 14079DA712F for ; Thu, 29 Jun 2017 22:33:35 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-15.reflexion.net [208.70.210.15]) (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 C90677661F for ; Thu, 29 Jun 2017 22:33:34 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 19155 invoked from network); 29 Jun 2017 22:33:27 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 29 Jun 2017 22:33:27 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.40.1) with SMTP; Thu, 29 Jun 2017 18:33:27 -0400 (EDT) Received: (qmail 10482 invoked from network); 29 Jun 2017 22:33:27 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 29 Jun 2017 22:33:27 -0000 Received: from [192.168.1.114] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 6931EEC8029; Thu, 29 Jun 2017 15:33:26 -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: 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: <0E42D991-D350-4DC1-A683-CEA506167520@dsl-only.net> Date: Thu, 29 Jun 2017 15:33:25 -0700 To: Bryan Drewery , Ed Maste , FreeBSD Toolchain , FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 22:33:35 -0000 [This is a clang targetting powerpc64 context from my experimentation efforts, not the normal gcc 4.2.1 context for powerpc64.] I break out the PATH into lines below to make it easier to scan. See the later "sh: head: not found" line and the even later ls of the directory with the x86-64 program directory in use: no "head" is present to find. --- install32 --- cd /usr/src/lib; MACHINE=3Dpowerpc MACHINE_ARCH=3Dpowerpc = MAKEOBJDIRPREFIX=3D/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerp= c64/usr/src/world32 = PATH=3D/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/= tmp/legacy/usr/sbin = :/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/tmp/le= gacy/usr/bin = :/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/tmp/le= gacy/bin = :/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/tmp/us= r/sbin = :/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/tmp/us= r/bin = :/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/tmp/le= gacy/usr/sbin = :/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/tmp/le= gacy/usr/bin = :/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/tmp/le= gacy/bin = :/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/tmp/us= r/sbin = :/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/tmp/us= r/bin :/tmp/install.7ljKosWa = SYSROOT=3D/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/s= rc/lib32 LIBDIR=3D/usr/lib32 SHLIBDIR=3D/usr/lib32 DTRACE=3D"dtrace" = make LD=3D"/usr/local/powerpc64-freebsd/bin/ld -m elf32ppc_fbsd" = OBJCOPY=3D"/usr/local/powerpc64-freebsd/bin/objcopy" = NM=3D"/usr/local/powerpc64-freebsd/bin/nm" -DCOMPAT_32BIT CC=3D"cc = -target powerpc64-unknown-freebsd12.0 = --sysroot=3D/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr= /src/tmp -B/usr/local/powerpc64-freebsd/bin/ -DCOMPAT_32BIT = -mcpu=3Dpowerpc -m32 = -L/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib32= /usr/lib32 = --sysroot=3D/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr= /src/lib32 -B/usr/local/powerpc64-freebsd/bin/ = -B/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib32= /usr/lib32" CXX=3D"c++ -target powerpc64-unknown-freebsd12.0 = --sysroot=3D/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr= /src/tmp -B/usr/local/powerpc64-freebsd/bin/ -DCOMPAT_32BIT = -mcpu=3Dpowerpc -m32 = -L/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib32= /usr/lib32 = --sysroot=3D/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr= /src/lib32 -B/usr/local/powerpc64-freebsd/bin/ = -B/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib32= /usr/lib32" CPP=3D"cpp -target powerpc64-unknown-freebsd12.0 = --sysroot=3D/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr= /src/tmp -B/usr/local/powerpc64-freebsd/bin/ -DCOMPAT_32BIT = -mcpu=3Dpowerpc -m32 = -L/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib32= /usr/lib32 = --sysroot=3D/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr= /src/lib32 -B/usr/local/powerpc64-freebsd/bin/ = -B/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/lib32= /usr/lib32" -DNO_CPU_CFLAGS MK_CTF=3Dno -DNO_LINT MK_TESTS=3Dno = 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: Unable to determine = linker type from XLD=3D/usr/local/powerpc64-freebsd/bin/ld *** [install32] Error code 1 # ls -lT /tmp/install.7ljKosWa/ total 6151 -r-xr-xr-x 1 root wheel 12592 Jun 29 14:02:46 2017 [ -r-xr-xr-x 1 root wheel 207320 Jun 29 14:02:46 2017 awk -r-xr-xr-x 1 root wheel 8456 Jun 29 14:02:46 2017 cap_mkdb -r-xr-xr-x 1 root wheel 13272 Jun 29 14:02:46 2017 cat . . . -r-xr-xr-x 1 root wheel 57632 Jun 29 14:02:46 2017 find -r-xr-xr-x 1 root wheel 99064 Jun 29 14:02:46 2017 grep -r-xr-xr-x 1 root wheel 13360 Jun 29 14:02:46 2017 id . . . So there is no "head" to find. Below uses "find" instead to confirm the x86-64 ELF status: # file /tmp/install.7ljKosWa/find /tmp/install.7ljKosWa/find: ELF 64-bit LSB executable, x86-64, version 1 = (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for = FreeBSD 12.0 (1200036), FreeBSD-style, stripped =46rom /usr/src/share/mk/bsd.linker.mk : .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 = none .if ${_ld_version} =3D=3D "none" .error Unable to determine linker type from ${ld}=3D${${ld}} .endif Trying the failing line interactively (no PATH like above though): # /usr/local/powerpc64-freebsd/bin/ld --version 2>/dev/null | head -n 1 = || echo none GNU ld (GNU Binutils) 2.28 So /tmp/install.7ljKosWa/ just needed a copy of head in addition to what it already had. =3D=3D=3D Mark Millard markmi at dsl-only.net