* [BUG] perf cross-compile error dual to fixdep not host-exe
@ 2015-09-30 3:18 He Kuang
2015-09-30 6:13 ` Jiri Olsa
0 siblings, 1 reply; 6+ messages in thread
From: He Kuang @ 2015-09-30 3:18 UTC (permalink / raw)
To: jolsa
Cc: David Ahern, Namhyung Kim, Peter Zijlstra,
Arnaldo Carvalho de Melo, linux-kernel, Wang Nan
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [BUG] perf cross-compile error dual to fixdep not host-exe 2015-09-30 3:18 [BUG] perf cross-compile error dual to fixdep not host-exe He Kuang @ 2015-09-30 6:13 ` Jiri Olsa 2015-10-08 8:02 ` He Kuang 0 siblings, 1 reply; 6+ messages in thread From: Jiri Olsa @ 2015-09-30 6:13 UTC (permalink / raw) To: He Kuang Cc: jolsa, David Ahern, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, linux-kernel, Wang Nan On Wed, Sep 30, 2015 at 11:18:20AM +0800, He Kuang wrote: > 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 hum, we need fixdep to stay the host arch.. I should have seen it :-\ could you please check attached patch? thanks, jirka --- diff --git a/tools/build/Makefile b/tools/build/Makefile index a93036272d43..648897694992 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [BUG] perf cross-compile error dual to fixdep not host-exe 2015-09-30 6:13 ` Jiri Olsa @ 2015-10-08 8:02 ` He Kuang 2015-10-08 8:30 ` Jiri Olsa 0 siblings, 1 reply; 6+ messages in thread From: He Kuang @ 2015-10-08 8:02 UTC (permalink / raw) To: Jiri Olsa Cc: jolsa, David Ahern, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, linux-kernel, Wang Nan hi, Jirka On 2015/9/30 14:13, Jiri Olsa wrote: > On Wed, Sep 30, 2015 at 11:18:20AM +0800, He Kuang wrote: >> 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 > > 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. > > --- > diff --git a/tools/build/Makefile b/tools/build/Makefile > index a93036272d43..648897694992 100644 > --- a/tools/build/Makefile > +++ b/tools/build/Makefile > @@ -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 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] perf cross-compile error dual to fixdep not host-exe 2015-10-08 8:02 ` He Kuang @ 2015-10-08 8:30 ` Jiri Olsa 2015-10-13 12:43 ` build: Fix cross compile build Jiri Olsa 0 siblings, 1 reply; 6+ messages in thread From: Jiri Olsa @ 2015-10-08 8:30 UTC (permalink / raw) To: He Kuang Cc: jolsa, David Ahern, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, linux-kernel, Wang Nan On Thu, Oct 08, 2015 at 04:02:48PM +0800, He Kuang wrote: > hi, Jirka > > On 2015/9/30 14:13, Jiri Olsa wrote: > >On Wed, Sep 30, 2015 at 11:18:20AM +0800, He Kuang wrote: > >>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 > > > >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. 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* build: Fix cross compile build 2015-10-08 8:30 ` Jiri Olsa @ 2015-10-13 12:43 ` Jiri Olsa 2015-10-14 13:15 ` [tip:perf/core] tools " tip-bot for Jiri Olsa 0 siblings, 1 reply; 6+ messages in thread From: Jiri Olsa @ 2015-10-13 12:43 UTC (permalink / raw) To: He Kuang, Arnaldo Carvalho de Melo Cc: jolsa, David Ahern, Namhyung Kim, Peter Zijlstra, linux-kernel, Wang Nan On Thu, Oct 08, 2015 at 10:30:04AM +0200, Jiri Olsa wrote: > On Thu, Oct 08, 2015 at 04:02:48PM +0800, He Kuang wrote: > > hi, Jirka > > > > On 2015/9/30 14:13, Jiri Olsa wrote: > > >On Wed, Sep 30, 2015 at 11:18:20AM +0800, He Kuang wrote: > > >>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 > > > > > >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. > > 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. Reported-by: He Kuang <hekuang@huawei.com> Link: http://lkml.kernel.org/n/tip-3h8xhjd858qf03mnqbmzfvgl@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/build/Makefile.include | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/build/Makefile.include b/tools/build/Makefile.include index 6572bb023543..4e09ad617a60 100644 --- a/tools/build/Makefile.include +++ b/tools/build/Makefile.include @@ -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 -- 2.4.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [tip:perf/core] tools build: Fix cross compile build 2015-10-13 12:43 ` build: Fix cross compile build Jiri Olsa @ 2015-10-14 13:15 ` tip-bot for Jiri Olsa 0 siblings, 0 replies; 6+ messages in thread From: tip-bot for Jiri Olsa @ 2015-10-14 13:15 UTC (permalink / raw) To: linux-tip-commits Cc: a.p.zijlstra, wangnan0, mingo, dsahern, jolsa, jolsa, hekuang, linux-kernel, tglx, hpa, namhyung, acme Commit-ID: 3a70fcd3a4db56731f67f0189514953c74257944 Gitweb: http://git.kernel.org/tip/3a70fcd3a4db56731f67f0189514953c74257944 Author: Jiri Olsa <jolsa@redhat.com> AuthorDate: Tue, 13 Oct 2015 14:43:58 +0200 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> 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. Reported-by: He Kuang <hekuang@huawei.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/20151013124358.GB9467@krava.brq.redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/build/Makefile.include | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/build/Makefile.include b/tools/build/Makefile.include index 6572bb0..4e09ad6 100644 --- a/tools/build/Makefile.include +++ b/tools/build/Makefile.include @@ -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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-14 13:15 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-09-30 3:18 [BUG] perf cross-compile error dual to fixdep not host-exe He Kuang 2015-09-30 6:13 ` Jiri Olsa 2015-10-08 8:02 ` He Kuang 2015-10-08 8:30 ` Jiri Olsa 2015-10-13 12:43 ` build: Fix cross compile build Jiri Olsa 2015-10-14 13:15 ` [tip:perf/core] tools " tip-bot for Jiri Olsa
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox