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

2015-11-01 Thread Simon J. Gerraty
NGie Cooper  wrote:

> And here’s the real issue — .PATH is completely broken when
> TARGET/TARGET_ARCH are specified as explicit values:

It would help if you could indicate what you think the right value
should be.
 
> $ env MAKEOBJDIRPREFIX=/scratch/tmp/ngie/obj/ make buildenv TARGET=powerpc 
> TARGET_ARCH=powerpc
> Entering world for powerpc:powerpc
> $ cd cddl/usr.sbin/dtrace/tests/common/json
> $ make -V.OBJDIR
> /scratch/tmp/ngie/obj//powerpc.powerpc/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json
> $ make -VMAKEOBJDIRPREFIX
> /scratch/tmp/ngie/obj//powerpc.powerpc
> $ make depend
> (cd /scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json &&  
> DEPENDFILE=.depend.tst.usdt.exe  NO_SUBDIR=1 make -f 
> /scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json/Makefile 
> _RECURSING_PROGS=  PROG=tst.usdt.exe  depend)

If you are doing this on current (ie MAKE_VERSION==20151020), adding -w
would be useful, since will report entering src and obj dirs.

> $ make all
> (cd /scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json &&  
> DEPENDFILE=.depend.tst.usdt.exe  NO_SUBDIR=1 make -f 
> /scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json/Makefile 
> _RECURSING_PROGS=  PROG=tst.usdt.exe )
> dtrace -C -x nolibs -G -o usdt.o -s 
> /scratch/tmp/ngie/svn/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d
>  tst.usdt.o
> dtrace: failed to link script 
> /scratch/tmp/ngie/svn/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d:
>  incorrect ELF machine type for object file: tst.usdt.o

> Stop.
> make[2]: stopped in 
> /scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json
> $ make -V.PATH

what dir do you execute that in?
I'm *guessing* cddl/usr.sbin/dtrace/tests/common/json.

It's actually quite useful when reporting/describing problems to do
everything from src eg.

make -w -C cddl/usr.sbin/dtrace/tests/common/json

leaves very little room for confusion.


> . /scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json 
> /scratch/tmp/ngie/svn/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json

What else do you expect in .PATH?
I didn't see anything in the Makefile or ../../Makefile.inc1 to add
anything else

You may also find it useful to set MAKE_PRINT_VAR_ON_ERROR
to a list of variables - that will be reported when make dies.
eg.

MAKE_PRINT_VAR_ON_ERROR=".CURDIR .OBJDIR MACHINE MACHINE_ARCH .PATH"

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

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

2015-10-31 Thread NGie Cooper

> On Oct 30, 2015, at 16:43, Simon J. Gerraty  wrote:
> 
> NGie Cooper  wrote:
>>  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".
> 
> Is it possible that the file is left over from a previous build (of amd64?)
> 
> Does your log show it being built?
> 
> 
>> 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
>> $ 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

Still running into issues on ref11-amd64:

cc1: error: unrecognized command line option "-m64"
dtrace: failed to compile script 
/scratch/tmp/ngie/svn/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d:
 Preprocessor failed to process input program
--- usdt.h ---
*** [usdt.h] Error code 1

Let’s see what happens if I use make buildenv

$ env MAKEOBJDIRPREFIX=/scratch/tmp/$USER/obj make buildenv TARGET=mips 
TARGET_ARCH=mips
Entering world for mips:mips
$ make -VMAKEOBJDIRPREFIX
/scratch/tmp/ngie/obj/mips.mips
$ which dtrace
/usr/sbin/dtrace

Uh… yeah… running the copy from the build host is no bueno. So, that root 
causes that issue. I’ll file a bug for that (dtrace needs to be built as a 
bootstrap/cross tool). The -m64 issue is because it’s compiled for amd64 and is 
running arguments that are only supposed to “work” for x86 platforms (in 
reality, there’s also no reason why -m32/-m64 need to be passed to 
${CC}/${CPP}):

1256 #ifdef illumos
1257 #ifdef __x86
1258 /*
1259  * On x86 systems, __i386 is defined for  for 
32-bit
1260  * compiles and __amd64 is defined for 64-bit compiles.  Unlike 
SPARC,
1261  * they are defined exclusive of one another (see PSARC 2004/619).
1262  */
1263 if (dtp->dt_conf.dtc_ctfmodel == CTF_MODEL_LP64) {
1264 if (dt_cpp_add_arg(dtp, "-D__amd64") == NULL)
1265 return (set_open_errno(dtp, errp, EDT_NOMEM));
1266 } else {
1267 if (dt_cpp_add_arg(dtp, "-D__i386") == NULL)
1268 return (set_open_errno(dtp, errp, EDT_NOMEM));
1269 }
1270 #endif
1271 #else
1272 #if defined(__amd64__) || defined(__i386__)
1273 if (dtp->dt_conf.dtc_ctfmodel == CTF_MODEL_LP64) {
1274 if (dt_cpp_add_arg(dtp, "-m64") == NULL)
1275 return (set_open_errno(dtp, errp, EDT_NOMEM));
1276 } else {
1277 if (dt_cpp_add_arg(dtp, "-m32") == NULL)
1278 return (set_open_errno(dtp, errp, EDT_NOMEM));
1279 }
1280 #endif
1281 #endif

As for why the original issue occurred on my VM (which was the powerpc:powerpc 
case), I’m not sure yet. I’m working on figuring that out.

Thanks!
-NGie
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

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

2015-10-31 Thread NGie Cooper

> On Oct 30, 2015, at 23:51, NGie Cooper  wrote:
> 
> 
>> On Oct 30, 2015, at 16:43, Simon J. Gerraty  wrote:
>> 
>> NGie Cooper  wrote:
>>> 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".
>> 
>> Is it possible that the file is left over from a previous build (of amd64?)
>> 
>> Does your log show it being built?
>> 
>> 
>>> 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
>>> $ 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
> 
> Still running into issues on ref11-amd64:
> 
> cc1: error: unrecognized command line option "-m64"
> dtrace: failed to compile script 
> /scratch/tmp/ngie/svn/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d:
>  Preprocessor failed to process input program
> --- usdt.h ---
> *** [usdt.h] Error code 1
> 
> Let’s see what happens if I use make buildenv

…

Deleting the lines that pass -m32/-m64 gets me back to the same point I was at 
before:

dtrace: failed to link script 
/scratch/tmp/ngie/svn/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d:
 incorrect ELF machine type for object file: tst.usdt.o
--- usdt.o ---
*** [usdt.o] Error code 1

I’ll need to check .PATH, but I think it’s picking up the host copy by accident:

$ find ../obj/ -name  tst.usdt.o | xargs file
../obj/arm.armv6hf/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
../obj/arm.arm/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
../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
../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
../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
../obj/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json/tst.usdt.o:  
 ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), not 
stripped
../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
../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
../obj/powerpc.powerpc64/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json/tst.usdt.o:
 ELF 64-bit MSB relocatable, 64-bit PowerPC or cisco 7500, version 1 (FreeBSD), 
not stripped
../obj/arm64.aarch64/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json/tst.usdt.o:
 ELF 64-bit LSB relocatable, ARM aarch64, version 1 (FreeBSD), not stripped
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

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

2015-10-31 Thread NGie Cooper

> On Oct 31, 2015, at 14:37, NGie Cooper  wrote:
> 
> 
>> On Oct 30, 2015, at 23:51, NGie Cooper  wrote:
>> 
>> 
>>> On Oct 30, 2015, at 16:43, Simon J. Gerraty  wrote:
>>> 
>>> NGie Cooper  wrote:
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".
>>> 
>>> Is it possible that the file is left over from a previous build (of amd64?)
>>> 
>>> Does your log show it being built?
>>> 
>>> 
 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
 $ 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
>> 
>> Still running into issues on ref11-amd64:
>> 
>> cc1: error: unrecognized command line option "-m64"
>> dtrace: failed to compile script 
>> /scratch/tmp/ngie/svn/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d:
>>  Preprocessor failed to process input program
>> --- usdt.h ---
>> *** [usdt.h] Error code 1
>> 
>> Let’s see what happens if I use make buildenv
> 
> …
> 
> Deleting the lines that pass -m32/-m64 gets me back to the same point I was 
> at before:
> 
> dtrace: failed to link script 
> /scratch/tmp/ngie/svn/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d:
>  incorrect ELF machine type for object file: tst.usdt.o
> --- usdt.o ---
> *** [usdt.o] Error code 1
> 
> I’ll need to check .PATH, but I think it’s picking up the host copy by 
> accident:
> 
> $ find ../obj/ -name  tst.usdt.o | xargs file
> ../obj/arm.armv6hf/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
> ../obj/arm.arm/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
> ../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
> ../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
> ../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
> ../obj/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json/tst.usdt.o:
>ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), 
> not stripped
> ../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
> ../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
> ../obj/powerpc.powerpc64/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json/tst.usdt.o:
>  ELF 64-bit MSB relocatable, 64-bit PowerPC or cisco 7500, version 1 
> (FreeBSD), not stripped
> ../obj/arm64.aarch64/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json/tst.usdt.o:
>  ELF 64-bit LSB relocatable, ARM aarch64, version 1 (FreeBSD), not 
> stripped

And here’s the real issue — .PATH is completely broken when TARGET/TARGET_ARCH 
are specified as explicit values:

$ env MAKEOBJDIRPREFIX=/scratch/tmp/ngie/obj/ make buildenv TARGET=powerpc 
TARGET_ARCH=powerpc
Entering world for powerpc:powerpc
$ cd cddl/usr.sbin/dtrace/tests/common/json
$ make -V.OBJDIR
/scratch/tmp/ngie/obj//powerpc.powerpc/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json
$ make -VMAKEOBJDIRPREFIX
/scratch/tmp/ngie/obj//powerpc.powerpc
$ make depend
(cd /scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json &&  
DEPENDFILE=.depend.tst.usdt.exe  NO_SUBDIR=1 make -f 
/scratch/tmp/ngie/svn/cddl/usr.sbin/dtrace/tests/common/json/Makefile 
_RECURSING_PROGS=  PROG=tst.usdt.exe  depend)
$ make all
(cd 

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

2015-10-30 Thread Bryan Drewery
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
> $ 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
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


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

2015-10-30 Thread NGie Cooper
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

% 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
$ 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
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

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

2015-10-30 Thread Bryan Drewery
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
>> $ 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.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


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

2015-10-30 Thread Mark Johnston
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
> 


___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

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

2015-10-30 Thread Bryan Drewery
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_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.
> 

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/common/json
-name tst.usdt.o -exec file {} +
/scratch/tmp/ngie/obj/arm.arm/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.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/dtrace/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/dtrace/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.sbin/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.usdt.o
>> $ file 
>> /usr/obj/usr/src/svn/cddl/usr.sbin/dtrace/tests/common/json/tst.usdt.o
>> 

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

2015-10-30 Thread Simon J. Gerraty
NGie Cooper  wrote:
>   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".

Is it possible that the file is left over from a previous build (of amd64?)

Does your log show it being built?


> 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
> $ 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
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

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

2015-10-30 Thread NGie Cooper
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
>>> $ 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
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

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

2015-10-30 Thread Bryan Drewery
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.

 $ 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



signature.asc
Description: OpenPGP digital signature


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

2015-10-30 Thread NGie Cooper
On Fri, Oct 30, 2015 at 4:09 PM, Bryan Drewery  wrote:
...
> 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/common/json
> -name tst.usdt.o -exec file {} +
> /scratch/tmp/ngie/obj/arm.arm/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.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/dtrace/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/dtrace/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.sbin/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]

Weird. Ok, I'll do some more digging into this.
Thanks for the input!
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"