From owner-freebsd-current@freebsd.org Fri Oct 30 23:07:20 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 C75FBA21B31 for ; Fri, 30 Oct 2015 23:07:20 +0000 (UTC) (envelope-from markjdb@gmail.com) 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 9FF5C17A8 for ; Fri, 30 Oct 2015 23:07:20 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 9D18AA21B30; Fri, 30 Oct 2015 23:07:20 +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 9CA2BA21B2E for ; Fri, 30 Oct 2015 23:07:20 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qg0-x22e.google.com (mail-qg0-x22e.google.com [IPv6:2607:f8b0:400d:c04::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5247617A7; Fri, 30 Oct 2015 23:07:20 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by qgem9 with SMTP id m9so74019722qge.1; Fri, 30 Oct 2015 16:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=hamE2U4SkhdjKuH2vC3FClA391Necevow0RAoXBnhqU=; b=Iypp0gzPtVKcUxHfNM9f1BnlVd28SGkDUzmqDFRwrLN+MiPon1h6yZRmYrfjqz74Fu bEJ+Z4i6znW/RQEoFthlLMcGW9FCrkqe76z8M6VWegIUmJCP41aP+BkkHvM2lkKVnzpO 7DqVpcGeBnp2BeEarNS5bJbwokwQi3WdvnDRBNDvMYpcEaJ4Q8TFdy5PFusOIVJbFpce fFkLflrJr59JM1JxcZ4TKU1Sov6go5DSxywEwnYb6io2QVaDNnBMk34h2J1vH9ojzDJ/ ZM5rFPcbrY90fonaCrgj2O32ntpjqzQEjl9ukeGQDIB0UXqwNflAf0i4k6Rzllu8xT5j xXGw== X-Received: by 10.140.246.69 with SMTP id r66mr14629993qhc.56.1446246439231; Fri, 30 Oct 2015 16:07:19 -0700 (PDT) Received: from wkstn-mjohnston.west.isilon.com (c-67-182-131-225.hsd1.wa.comcast.net. [67.182.131.225]) by smtp.gmail.com with ESMTPSA id p64sm3411410qkl.30.2015.10.30.16.07.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Oct 2015 16:07:18 -0700 (PDT) Sender: Mark Johnston Date: Fri, 30 Oct 2015 16:08:17 -0700 From: Mark Johnston To: Bryan Drewery Cc: NGie Cooper , "Simon J. Gerraty" , Ed Maste , FreeBSD CURRENT 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 Message-ID: <20151030230817.GA3845@wkstn-mjohnston.west.isilon.com> References: <653F31AA-982B-4026-BEF5-F608BCFFFD3A@gmail.com> <5633DF51.1070305@FreeBSD.org> <5633E27C.6000101@FreeBSD.org> <5633F6C7.4080500@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5633F6C7.4080500@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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:07:21 -0000 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_DTRACE_TESTS and I ran into this linker issue below. I have no idea (yet) why it’s trying to compile an x64 object when I specify powerpc/powerpc — and more importantly, why is the object not being put in obj.powerpc? > >>>> I ran into the same issue on ref11-amd64.freebsd.org when I ran “make 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 broadly and > >>> there to be a lot more reports if there was a problem with buildworld > >>> cross compiling. > >>> > >>>> % make buildworld TARGET=powerpc TARGET_ARCH=powerpc > >>>> … > >>>> ===> cddl/usr.sbin/dtrace/tests/common/json (all) > >>>> (cd /usr/src/svn/cddl/usr.sbin/dtrace/tests/common/json && DEPENDFILE=.depend.tst.usdt.exe NO_SUBDIR=1 make -f /usr/src/svn/cddl/usr.sbin/dtrace/tests/common/json/Makefile _RECURSING_PROGS= PROG=tst.usdt.exe ) > >>>> cc -O2 -pipe -fno-strict-aliasing -O2 -pipe -O0 -g -I/usr/obj/powerpc.powerpc/usr/src/svn/cddl/usr.sbin/dtrace/tests/common/json -std=gnu99 -fstack-protector-strong -c /usr/src/svn/cddl/contrib/opensolaris/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/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d tst.usdt.o > >>>> dtrace: failed to link script /usr/src/svn/cddl/contrib/opensolaris/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). It > must not have cross-compile support. > > The manpage does say: "The D compiler produces programs using the native > 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. 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. > > >>>> $ find /usr/obj/usr/src/svn/ -name tst.usdt.o > >>>> /usr/obj/usr/src/svn/cddl/usr.sbin/dtrace/tests/common/json/tst.usdt.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.usdt.o: ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), not stripped > >>>> > >> > >> I ran a buildworld with TARGET=powerpc 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_pathfds.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 (FreeBSD), > >> 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 > > > > > -- > Regards, > Bryan Drewery >