perf cross-compile error dual to fixdep not host-exe
Hi,
perf cross-compile error dual to fixdep is not a host executable, first bad commit is 7c422f557266("tools build: Build fixdep helper from perf and basic libs")
Cross-compiling an aarch64 target on x86_64 host, error like this:
$ make ARCH=aarch64 O=xx/aarch64 CROSS_COMPILE=aarch64-linux-gnu ... make[3]: *** [xx/aarch64/parse-utils.o] Error 126 make[3]: *** Waiting for unfinished jobs.... /bin/sh: xx/aarch64//fixdep: cannot execute binary file
$ uname -a x86_64 x86_64 x86_64 GNU/Linux
$ file xx/aarch64//fixdep xx/aarch64//fixdep : ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, not stripped
Thank you
Quoted 13 lines · He Kuang
Hi,
perf cross-compile error dual to fixdep is not a host executable, first bad commit is 7c422f557266("tools build: Build fixdep helper from perf and basic libs")
Cross-compiling an aarch64 target on
x86_64host, error like this:$ make ARCH=aarch64 O=xx/aarch64 CROSS_COMPILE=aarch64-linux-gnu ... make[3]: *** [xx/aarch64/parse-utils.o] Error 126 make[3]: *** Waiting for unfinished jobs.... /bin/sh: xx/aarch64//fixdep: cannot execute binary file
Quoted 7 lines
$ uname -a x86_64 x86_64 x86_64 GNU/Linux$ file xx/aarch64//fixdep xx/aarch64//fixdep : ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, not stripped
hum, we need fixdep to stay the host arch.. I should have seen it :-\
could you please check attached patch?
thanks,
jirka
---
tools/build/Makefile +0 -9
@@ -5,15 +5,6 @@ endif include $(srctree)/tools//scripts/Makefile.include -define allow-override - $(if $(or $(findstring environment,$(origin $(1))),\ - $(findstring command line,$(origin $(1)))),,\ - $(eval $(1) = $(2))) -endef - -$(call allow-override,CC,$(CROSS_COMPILE)gcc) -$(call allow-override,LD,$(CROSS_COMPILE)ld) - ifeq ($(V),1) Q = else
hi, Jirka
Quoted 22 lines · Jiri Olsa
Quoted 13 lines · He Kuang
Hi,
perf cross-compile error dual to fixdep is not a host executable, first bad commit is 7c422f557266("tools build: Build fixdep helper from perf and basic libs")
Cross-compiling an aarch64 target on
x86_64host, error like this:$ make ARCH=aarch64 O=xx/aarch64 CROSS_COMPILE=aarch64-linux-gnu ... make[3]: *** [xx/aarch64/parse-utils.o] Error 126 make[3]: *** Waiting for unfinished jobs.... /bin/sh: xx/aarch64//fixdep: cannot execute binary fileQuoted 7 lines
$ uname -a x86_64 x86_64 x86_64 GNU/Linux$ file xx/aarch64//fixdep xx/aarch64//fixdep : ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, not stripped
Quoted 6 lines
hum, we need fixdep to stay the host arch.. I should have seen it :-\
could you please check attached patch?thanks,
jirka
It does not work, 'fixdep' still be compiled as target executable.
Thank you.
Quoted 23 lines
---
tools/build/Makefile +0
-9@@ -5,15 +5,6 @@ endif include $(srctree)/tools//scripts/Makefile.include -define allow-override - $(if $(or $(findstring environment,$(origin $(1))),\ - $(findstring command line,$(origin $(1)))),,\ - $(eval $(1) = $(2))) -endef - -$(call allow-override,CC,$(CROSS_COMPILE)gcc) -$(call allow-override,LD,$(CROSS_COMPILE)ld) - ifeq ($(V),1) Q = else
Quoted 25 lines · He Kuang
hi, Jirka
Quoted 22 lines · Jiri Olsa
Quoted 20 lines · He Kuang
Hi,
perf cross-compile error dual to fixdep is not a host executable, first bad commit is 7c422f557266("tools build: Build fixdep helper from perf and basic libs")
Cross-compiling an aarch64 target on
x86_64host, error like this:$ make ARCH=aarch64 O=xx/aarch64 CROSS_COMPILE=aarch64-linux-gnu ... make[3]: *** [xx/aarch64/parse-utils.o] Error 126 make[3]: *** Waiting for unfinished jobs.... /bin/sh: xx/aarch64//fixdep: cannot execute binary file$ uname -a x86_64 x86_64 x86_64 GNU/Linux$ file xx/aarch64//fixdep xx/aarch64//fixdep : ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, not stripped
Quoted 8 lines
Quoted 6 lines
hum, we need fixdep to stay the host arch.. I should have seen it :-\
could you please check attached patch?thanks,
jirkaIt does not work, 'fixdep' still be compiled as target executable.
could you please provide output from that build with 'JOBS=1 V=1'
last chance before I kick myself to actualy setup cross compiling :-\
thanks,
jirka
build: Fix cross compile build
Quoted 33 lines · Jiri Olsa
Quoted 32 lines · He Kuang
hi, Jirka
Quoted 28 lines · Jiri Olsa
Quoted 13 lines · He Kuang
Hi,
perf cross-compile error dual to fixdep is not a host executable, first bad commit is 7c422f557266("tools build: Build fixdep helper from perf and basic libs")
Cross-compiling an aarch64 target on
x86_64host, error like this:$ make ARCH=aarch64 O=xx/aarch64 CROSS_COMPILE=aarch64-linux-gnu ... make[3]: *** [xx/aarch64/parse-utils.o] Error 126 make[3]: *** Waiting for unfinished jobs.... /bin/sh: xx/aarch64//fixdep: cannot execute binary fileQuoted 7 lines
$ uname -a x86_64 x86_64 x86_64 GNU/Linux$ file xx/aarch64//fixdep xx/aarch64//fixdep : ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, not strippedhum, we need fixdep to stay the host arch.. I should have seen it :-\
could you please check attached patch?thanks,
jirka
Quoted 8 lines
Quoted 1 line
It does not work, 'fixdep' still be compiled as target executable.
could you please provide output from that build with 'JOBS=1 V=1'
last chance before I kick myself to actualy setup cross compiling :-\
thanks,
jirka
posting patch for the issue
thanks,
jirka
---
He Kuang the new fixdep tool breaks cross compiling. The reason is it wouldn't get compiled under host arch, but under cross arch and failed to run.
We need to add support for host side tools build, meanwhile disabling fixdep usage for cross arch builds.
--- tools/build/Makefile.include | 4 ++++ 1 file changed, 4 insertions(+)
tools/build/Makefile.include +4 -0
@@ -1,6 +1,10 @@ build := -f $(srctree)/tools/build/Makefile.build dir=. obj +ifdef CROSS_COMPILE +fixdep: +else fixdep: $(Q)$(MAKE) -C $(srctree)/tools/build fixdep +endif .PHONY: fixdep
Signature · 1 line
2.4.3
tip-bot for Jiri Olsa
merge bot[tip:perf/core] tools build: Fix cross compile build
tools build: Fix cross compile build
Commit-ID: 3a70fcd3a4db56731f67f0189514953c74257944 Gitweb: http://git.kernel.org/tip/3a70fcd3a4db56731f67f0189514953c74257944 Author: Jiri Olsa <[email protected]> AuthorDate: Tue, 13 Oct 2015 14:43:58 +0200 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 13 Oct 2015 11:59:43 -0300
tools build: Fix cross compile build
He Kuang the new fixdep tool breaks cross compiling. The reason is it wouldn't get compiled under host arch, but under cross arch and failed to run.
We need to add support for host side tools build, meanwhile disabling fixdep usage for cross arch builds.
--- tools/build/Makefile.include | 4 ++++ 1 file changed, 4 insertions(+)
tools/build/Makefile.include +4 -0
@@ -1,6 +1,10 @@ build := -f $(srctree)/tools/build/Makefile.build dir=. obj +ifdef CROSS_COMPILE +fixdep: +else fixdep: $(Q)$(MAKE) -C $(srctree)/tools/build fixdep +endif .PHONY: fixdep