Date: Fri, 30 Oct 2015 16:01:27 -0700 From: Bryan Drewery <bdrewery@FreeBSD.org> To: NGie Cooper <yaneurabeya@gmail.com> Cc: "Simon J. Gerraty" <sjg@freebsd.org>, Ed Maste <emaste@freebsd.org>, Mark Johnston <markj@freebsd.org>, FreeBSD CURRENT <current@freebsd.org> 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: <5633F6C7.4080500@FreeBSD.org> In-Reply-To: <CAGHfRMD=rzpPKWh_8qhf=5oft_N=8ZZLQf7fuygfq87nga%2BVKA@mail.gmail.com> References: <653F31AA-982B-4026-BEF5-F608BCFFFD3A@gmail.com> <5633DF51.1070305@FreeBSD.org> <5633E27C.6000101@FreeBSD.org> <CAGHfRMD=rzpPKWh_8qhf=5oft_N=8ZZLQf7fuygfq87nga%2BVKA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On 10/30/2015 3:03 PM, NGie Cooper wrote: > On Fri, Oct 30, 2015 at 2:34 PM, Bryan Drewery <bdrewery@freebsd.org> 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. >>>> $ 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 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWM/bHAAoJEDXXcbtuRpfP3i0H/0lKt+SzK2ksTezx+Agk8aJo kB/gfnIdPK9pkR/oAY7OSMeKxgvbfZ4CWf5miyapq7BJxUtPxlDp0IHpdweqUMC5 YaOHOmGYiH+BSBgiaNrmXsPOXz4xuydRWTKHgc9Q5k071OLkuDOnrfB9ipOrXC76 ESLdx3wBOSoi3Sy6sk50d8K+WIpaa0u6boaGF5LAMceOtIub1QG7pj65TlzlMbm/ pNWVhKokx2a9iu9Jwvsq5nqVB529m1XNXEmg3e0RC32ifQJcIMqujzKD5ysGBGcl 2xuFs/TYLzl7svyilaJP2WDQpNEDDfUlMDM38+NzqlkErfuqXwrPM3MS1SDKQsI= =OBIz -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5633F6C7.4080500>
