From owner-freebsd-current@freebsd.org Fri Oct 30 23:09:58 2015 Return-Path: Delivered-To: freebsd-current@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 0271DA21CD7 for ; Fri, 30 Oct 2015 23:09:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id D19EE1CFB for ; Fri, 30 Oct 2015 23:09:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id CEE31A21CD6; Fri, 30 Oct 2015 23:09:57 +0000 (UTC) Delivered-To: current@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 CE744A21CD5 for ; Fri, 30 Oct 2015 23:09:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id B0B971CFA; Fri, 30 Oct 2015 23:09:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id A038817A4; Fri, 30 Oct 2015 23:09:57 +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 65AA01073D; Fri, 30 Oct 2015 23:09:57 +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 F6wAWNI34lvO; Fri, 30 Oct 2015 23:09:54 +0000 (UTC) Subject: Re: Compilation failure with WITH_DTRACE_TESTS on mips/mips and powerpc/powerpc; it's trying to compile a host object on mips/powerpc because MAKEOBJDIRPREFIX is incorrect DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 3C70810737 To: Mark Johnston References: <653F31AA-982B-4026-BEF5-F608BCFFFD3A@gmail.com> <5633DF51.1070305@FreeBSD.org> <5633E27C.6000101@FreeBSD.org> <5633F6C7.4080500@FreeBSD.org> <20151030230817.GA3845@wkstn-mjohnston.west.isilon.com> Cc: NGie Cooper , "Simon J. Gerraty" , Ed Maste , FreeBSD CURRENT From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5633F8C5.6040500@FreeBSD.org> Date: Fri, 30 Oct 2015 16:09:57 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151030230817.GA3845@wkstn-mjohnston.west.isilon.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BdiK8hFnKoaetNS77MaHoeVdAhQhG9Ofl" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2015 23:09:58 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BdiK8hFnKoaetNS77MaHoeVdAhQhG9Ofl Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/30/2015 4:08 PM, Mark Johnston wrote: > On Fri, Oct 30, 2015 at 04:01:27PM -0700, Bryan Drewery wrote: >> On 10/30/2015 3:03 PM, NGie Cooper wrote: >>> On Fri, Oct 30, 2015 at 2:34 PM, Bryan Drewery = wrote: >>>> On 10/30/2015 2:21 PM, Bryan Drewery wrote: >>>>> On 10/30/2015 1:57 PM, NGie Cooper wrote: >>>>>> Hi Bryan/Simon! >>>>>> I tried doing buildworld on powerpc/powerpc with -DWITH_DTRAC= E_TESTS and I ran into this linker issue below. I have no idea (yet) why = it=E2=80=99s trying to compile an x64 object when I specify powerpc/power= pc =E2=80=94 and more importantly, why is the object not being put in obj= =2Epowerpc? >>>>>> I ran into the same issue on ref11-amd64.freebsd.org when I r= an =E2=80=9Cmake tinderbox". >>>>>> Thanks! >>>>>> -NGie >>>>>> >>>>> >>>>> Have you modified any of your local toolchain handling, or skipped >>>>> CLANG_BOOTSTRAP? I would expect this to be failing much more broadl= y and >>>>> there to be a lot more reports if there was a problem with buildwor= ld >>>>> cross compiling. >>>>> >>>>>> % make buildworld TARGET=3Dpowerpc TARGET_ARCH=3Dpowerpc >>>>>> =E2=80=A6 >>>>>> =3D=3D=3D> cddl/usr.sbin/dtrace/tests/common/json (all) >>>>>> (cd /usr/src/svn/cddl/usr.sbin/dtrace/tests/common/json && DEPEND= FILE=3D.depend.tst.usdt.exe NO_SUBDIR=3D1 make -f /usr/src/svn/cddl/usr.= sbin/dtrace/tests/common/json/Makefile _RECURSING_PROGS=3D PROG=3Dtst.us= dt.exe ) >>>>>> cc -O2 -pipe -fno-strict-aliasing -O2 -pipe -O0 -g -I/usr/obj/p= owerpc.powerpc/usr/src/svn/cddl/usr.sbin/dtrace/tests/common/json -std=3D= gnu99 -fstack-protector-strong -c /usr/src/svn/cddl/contrib/opensolari= s/cmd/dtrace/test/tst/common/json/tst.usdt.c -o tst.usdt.o >>>>>> dtrace -C -x nolibs -G -o usdt.o -s /usr/src/svn/cddl/contrib/open= solaris/cmd/dtrace/test/tst/common/json/usdt.d tst.usdt.o >>>>>> dtrace: failed to link script /usr/src/svn/cddl/contrib/opensolari= s/cmd/dtrace/test/tst/common/json/usdt.d: incorrect ELF machine type for = object file: tst.usdt.o >>>>>> *** Error code 1 >> >> The problem looks specific to compiling of .d files using dtrace(1). I= t >> must not have cross-compile support. >> >> The manpage does say: "The D compiler produces programs using the nati= ve >> data model of the operating system kernel.". >> >> So these will need to be disabled for non-native builds. >> >> I don't know if it would be possible to build a cross-compile version = of >> dtrace(1) and drop it in WORLDTMP/usr/sbin and have it work. >=20 > In the snippet above, tst.usdt.o is generated by cc, not dtrace(1). > dtrace is complaining that the input file doesn't have the expected > machine type, which seems valid given the file(1) output below. >=20 The example output must be a mistake as they are correct on ref11: ref11-amd64% find /scratch/tmp/ngie/obj/*/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/c= ommon/json -name tst.usdt.o -exec file {} + /scratch/tmp/ngie/obj/arm.arm/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/t= ests/common/json/tst.usdt.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (FreeBSD), not stripped /scratch/tmp/ngie/obj/arm.armeb/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace= /tests/common/json/tst.usdt.o: ELF 32-bit MSB relocatable, ARM, EABI5 version 1 (FreeBSD), not stripped /scratch/tmp/ngie/obj/arm.armv6/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace= /tests/common/json/tst.usdt.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (FreeBSD), not stripped /scratch/tmp/ngie/obj/arm.armv6hf/scratch/tmp/ngie/svn/cddl/usr.sbin/dtra= ce/tests/common/json/tst.usdt.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (FreeBSD), not stripped /scratch/tmp/ngie/obj/arm64.aarch64/scratch/tmp/ngie/svn/cddl/usr.sbin/dt= race/tests/common/json/tst.usdt.o: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (FreeBSD), not stripped /scratch/tmp/ngie/obj/i386.i386/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace= /tests/common/json/tst.usdt.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (FreeBSD), not stripped /scratch/tmp/ngie/obj/pc98.i386/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace= /tests/common/json/tst.usdt.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (FreeBSD), not stripped /scratch/tmp/ngie/obj/powerpc.powerpc/scratch/tmp/ngie/svn/cddl/usr.sbin/= dtrace/tests/common/json/tst.usdt.o: ELF 32-bit MSB relocatable, PowerPC or cisco 4500, version 1 (FreeBSD), not stripped /scratch/tmp/ngie/obj/powerpc.powerpc64/scratch/tmp/ngie/svn/cddl/usr.sbi= n/dtrace/tests/common/json/tst.usdt.o: ELF 64-bit MSB relocatable, 64-bit PowerPC or cisco 7500, version 1 (FreeBSD), not stripped [sorry for bad mail client] >> >>>>>> $ find /usr/obj/usr/src/svn/ -name tst.usdt.o >>>>>> /usr/obj/usr/src/svn/cddl/usr.sbin/dtrace/tests/common/json/tst.us= dt.o >>>>>> $ file /usr/obj/usr/src/svn/cddl/usr.sbin/dtrace/tests/common/json= /tst.usdt.o >>>>>> /usr/obj/usr/src/svn/cddl/usr.sbin/dtrace/tests/common/json/tst.us= dt.o: ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), not stripp= ed >>>>>> >>>> >>>> I ran a buildworld with TARGET=3Dpowerpc just a few days ago and it = seemed >>>> to be fine with PROGS. Here's a test object built via PROGS: >>>> >>>> ~/git/freebsd # find /usr/obj/powerpc.powerpc -name ld_library_pathf= ds.o >>>> /usr/obj/powerpc.powerpc/root/git/freebsd/libexec/rtld-elf/tests/ld_= library_pathfds.o >>>> ~/git/freebsd # file >>>> /usr/obj/powerpc.powerpc/root/git/freebsd/libexec/rtld-elf/tests/ld_= library_pathfds.o >>>> /usr/obj/powerpc.powerpc/root/git/freebsd/libexec/rtld-elf/tests/ld_= library_pathfds.o: >>>> ELF 32-bit MSB relocatable, PowerPC or cisco 4500, version 1 (FreeBS= D), >>>> not stripped >>>> -rw-r--r-- 1 root wheel 21136 Oct 23 17:08 >>>> /usr/obj/powerpc.powerpc/root/git/freebsd/libexec/rtld-elf/tests/ld_= library_pathfds.o >>>> >>>> I see nothing special with the DTRACE_TESTS to change any of this. >>> >>> I could see there being a possible issue with my host VM, but I >>> haven't modified my environment in ref11-amd64.freebsd.org at all. >>> >>> Could you please try reproing it there with your user? >>> >>> Thanks, >>> -NGie >>> >> >> >> --=20 >> Regards, >> Bryan Drewery >> >=20 >=20 --=20 Regards, Bryan Drewery --BdiK8hFnKoaetNS77MaHoeVdAhQhG9Ofl 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 iQEcBAEBAgAGBQJWM/jFAAoJEDXXcbtuRpfPudAH/2I4Ob3+N1srMvuiHd3LNx7Z D/sfzv9GzPDDu2L/AJzEVH1nQ6/t4u8LqOL1yraQRK8VQZ2UZaViIJcaHq6cMUCK Py8NwufZRrbZHHGlIVgECDLPNVdAfzqyZk7XakXA7SuydyczKEw2ENLzto+u3ahY Xl1/JwyUgY4hFhA34wXgFKA/v6nA+r+dVHeGmrEFZbYCITRItDoxKrQ/3181L7hm LnSbzA6Jfk21Jl6/yhAH2Epkijoe3JlxnL5XHLgl71InILhSF/PIt5d4QLyD0tgx ZRkz37yEZbdJPlozql23GlrqBqWTu1+cQcw6YTiSzqp5O4dLyR+z6JwyE3BuAD4= =X8kP -----END PGP SIGNATURE----- --BdiK8hFnKoaetNS77MaHoeVdAhQhG9Ofl--