* [Buildroot] FW: [PATCH] linux-headers: cross compile fix
@ 2014-02-23 8:29 Noam Camus
2014-02-23 9:50 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Noam Camus @ 2014-02-23 8:29 UTC (permalink / raw)
To: buildroot
Otherwise compiler not found errors occured.
Signed-off-by: Noam Camus <noamc@ezchip.com>
---
| 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
--git a/package/linux-headers/linux-headers.mk b/package/linux-headers/linux-headers.mk
index 30d3076..632b94f 100644
--- a/package/linux-headers/linux-headers.mk
+++ b/package/linux-headers/linux-headers.mk
@@ -25,6 +25,7 @@ define LINUX_HEADERS_INSTALL_STAGING_CMDS
HOSTCFLAGS="$(HOSTCFLAGS)" \
HOSTCXX="$(HOSTCXX)" \
INSTALL_HDR_PATH=$(STAGING_DIR)/usr \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
headers_install)
endef
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] FW: [PATCH] linux-headers: cross compile fix
2014-02-23 8:29 [Buildroot] FW: [PATCH] linux-headers: cross compile fix Noam Camus
@ 2014-02-23 9:50 ` Thomas Petazzoni
2014-02-23 12:33 ` Noam Camus
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2014-02-23 9:50 UTC (permalink / raw)
To: buildroot
Dear Noam Camus,
On Sun, 23 Feb 2014 08:29:15 +0000, Noam Camus wrote:
> Otherwise compiler not found errors occured.
>
> Signed-off-by: Noam Camus <noamc@ezchip.com>
> ---
> package/linux-headers/linux-headers.mk | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/package/linux-headers/linux-headers.mk b/package/linux-headers/linux-headers.mk
> index 30d3076..632b94f 100644
> --- a/package/linux-headers/linux-headers.mk
> +++ b/package/linux-headers/linux-headers.mk
> @@ -25,6 +25,7 @@ define LINUX_HEADERS_INSTALL_STAGING_CMDS
> HOSTCFLAGS="$(HOSTCFLAGS)" \
> HOSTCXX="$(HOSTCXX)" \
> INSTALL_HDR_PATH=$(STAGING_DIR)/usr \
> + CROSS_COMPILE="$(TARGET_CROSS)" \
> headers_install)
> endef
>
Doesn't look harmful in principle, but it seems to have worked until
now without CROSS_COMPILE="$(TARGET_CROSS)". Can you expand the commit
log by explaining in which case you have seen errors, and which errors.
The linux-headers package is used daily to build toolchains by all
Buildroot users, so I'd like to understand how your situation is
different. Is it that the ARC kernel headers need something special?
But we are building ARC toolchains everyday in the autobuilders, with
no problem. That's why I'd like to have more details.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] FW: [PATCH] linux-headers: cross compile fix
2014-02-23 9:50 ` Thomas Petazzoni
@ 2014-02-23 12:33 ` Noam Camus
2014-02-23 14:11 ` Thomas Petazzoni
2014-02-23 14:13 ` Yann E. MORIN
0 siblings, 2 replies; 5+ messages in thread
From: Noam Camus @ 2014-02-23 12:33 UTC (permalink / raw)
To: buildroot
See Inline
-----Original Message-----
From: Thomas Petazzoni [mailto:thomas.petazzoni at free-electrons.com]
Sent: Sunday, February 23, 2014 11:51 AM
To: Noam Camus
Cc: buildroot at busybox.net
Subject: Re: [Buildroot] FW: [PATCH] linux-headers: cross compile fix
Dear Noam Camus,
On Sun, 23 Feb 2014 08:29:15 +0000, Noam Camus wrote:
> Otherwise compiler not found errors occured.
>
> Signed-off-by: Noam Camus <noamc@ezchip.com>
> ---
> package/linux-headers/linux-headers.mk | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/package/linux-headers/linux-headers.mk
> b/package/linux-headers/linux-headers.mk
> index 30d3076..632b94f 100644
> --- a/package/linux-headers/linux-headers.mk
> +++ b/package/linux-headers/linux-headers.mk
> @@ -25,6 +25,7 @@ define LINUX_HEADERS_INSTALL_STAGING_CMDS
> HOSTCFLAGS="$(HOSTCFLAGS)" \
> HOSTCXX="$(HOSTCXX)" \
> INSTALL_HDR_PATH=$(STAGING_DIR)/usr \
> + CROSS_COMPILE="$(TARGET_CROSS)" \
> headers_install)
> endef
>
Doesn't look harmful in principle, but it seems to have worked until now without CROSS_COMPILE="$(TARGET_CROSS)". Can you expand the commit log by explaining in which case you have seen errors, and which errors.
The linux-headers package is used daily to build toolchains by all Buildroot users, so I'd like to understand how your situation is different. Is it that the ARC kernel headers need something special?
But we are building ARC toolchains everyday in the autobuilders, with no problem. That's why I'd like to have more details.
Thomas
[Noam Camus]
Sorry for long lines I am still looking for better email client than my outlook.
Just use target linux-headers-rebuild and you will get many errors that buildroot silently ignores.
You alternatively may add intentionally BAD CROSS_COMPILE if you don't have ARC setup handy and see that
Toolchain building is not stopped due to this error.
For example here is my log:
---------------------------------------
rm -f /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/.stamp_rsynced
rm -f /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/.stamp_built
rm -f /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/.stamp_staging_installed
rm -f /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/.stamp_target_installed
rm -f /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/.stamp_images_installed
rm -f /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/.stamp_host_installed
>>> linux-headers custom Syncing from source dir /home/noamc/workspace/sb/EZdk-nps/ldk/build/buildroot/../sources/linux-nps
rsync -au --cvs-exclude --include core /home/noamc/workspace/sb/EZdk-nps/ldk/build/buildroot/../sources/linux-nps/ /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom
>>> linux-headers custom Building
>>> linux-headers custom Installing to staging directory
(cd /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom; PATH="/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/bin:/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/usr/bin:/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/usr/sbin/:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/npsdb/ezutils:/home/noamc/bin:/home/npsdb/ezutils" PERLLIB="/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/usr/lib/perl" /usr/bin/make -j9 ARCH=arc HOSTCC="/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/usr/bin/ccache /usr/bin/gcc" HOSTCFLAGS="" HOSTCXX="/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/usr/bin/ccache /usr/bin/g++" INSTALL_HDR_PATH=/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/usr/arceb-ezchip-linux-uclibc/sysroot/usr headers_install)
/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 25: arc-linux-uclibc-gcc: command not found
/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 26: arc-linux-uclibc-gcc: command not found
/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 25: arc-linux-uclibc-gcc: command not found
/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 26: arc-linux-uclibc-gcc: command not found
/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 25: arc-linux-uclibc-gcc: command not found
/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 26: arc-linux-uclibc-gcc: command not found
/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 25: arc-linux-uclibc-gcc: command not found
/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 26: arc-linux-uclibc-gcc: command not found
make[3]: arc-linux-uclibc-gcc: Command not found
make[3]: Entering directory `/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom'
make[3]: arc-linux-uclibc-gcc: Command not found
CHK include/generated/uapi/linux/version.h
make[3]: Leaving directory `/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom'
>>> linux-headers custom Installing to target
---------------------------------------------------------
Regards,
Noam
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] FW: [PATCH] linux-headers: cross compile fix
2014-02-23 12:33 ` Noam Camus
@ 2014-02-23 14:11 ` Thomas Petazzoni
2014-02-23 14:13 ` Yann E. MORIN
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2014-02-23 14:11 UTC (permalink / raw)
To: buildroot
Dear Noam Camus,
On Sun, 23 Feb 2014 12:33:42 +0000, Noam Camus wrote:
> See Inline
No need to say that. Just strip from the original message the parts
that have become irrelevant.
> Doesn't look harmful in principle, but it seems to have worked until now without CROSS_COMPILE="$(TARGET_CROSS)". Can you expand the commit log by explaining in which case you have seen errors, and which errors.
> The linux-headers package is used daily to build toolchains by all Buildroot users, so I'd like to understand how your situation is different. Is it that the ARC kernel headers need something special?
> But we are building ARC toolchains everyday in the autobuilders, with no problem. That's why I'd like to have more details.
> Thomas
>
> [Noam Camus]
> Sorry for long lines I am still looking for better email client than my outlook.
Aah, yes, indeed. But I've been told that it might be possible, with
some configuration, to tweak the Outlook behavior to make it more or
less reasonable for discussions on open-source mailing list. Though
I've never used Outlook myself, so I can't say much more than that.
> Just use target linux-headers-rebuild and you will get many errors that buildroot silently ignores.
> You alternatively may add intentionally BAD CROSS_COMPILE if you don't have ARC setup handy and see that
> Toolchain building is not stopped due to this error.
> For example here is my log:
> ---------------------------------------
> rm -f /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/.stamp_rsynced
> rm -f /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/.stamp_built
> rm -f /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/.stamp_staging_installed
> rm -f /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/.stamp_target_installed
> rm -f /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/.stamp_images_installed
> rm -f /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/.stamp_host_installed
> >>> linux-headers custom Syncing from source dir /home/noamc/workspace/sb/EZdk-nps/ldk/build/buildroot/../sources/linux-nps
> rsync -au --cvs-exclude --include core /home/noamc/workspace/sb/EZdk-nps/ldk/build/buildroot/../sources/linux-nps/ /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom
> >>> linux-headers custom Building
> >>> linux-headers custom Installing to staging directory
> (cd /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom; PATH="/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/bin:/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/usr/bin:/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/usr/sbin/:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/npsdb/ezutils:/home/noamc/bin:/home/npsdb/ezutils" PERLLIB="/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/usr/lib/perl" /usr/bin/make -j9 ARCH=arc HOSTCC="/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/usr/bin/ccache /usr/bin/gcc" HOSTCFLAGS="" HOSTCXX="/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/usr/bin/ccache /usr/bin/g++" INSTALL_HDR_PATH=/home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/host/usr/arceb-ezchip-linux-uclibc/sysroot/usr headers_install)
> /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 25: arc-linux-uclibc-gcc: command not found
> /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 26: arc-linux-uclibc-gcc: command not found
> /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 25: arc-linux-uclibc-gcc: command not found
> /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 26: arc-linux-uclibc-gcc: command not found
> /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 25: arc-linux-uclibc-gcc: command not found
> /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 26: arc-linux-uclibc-gcc: command not found
> /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 25: arc-linux-uclibc-gcc: command not found
> /home/noamc/workspace/sb/EZdk-nps/ldk/build/output_arc/build/linux-headers-custom/scripts/gcc-version.sh: line 26: arc-linux-uclibc-gcc: command not found
Ah, right. The problem is that our linux-headers package does not
depend on any cross-compiler, not even gcc-initial. It happens that
since host-gcc-initial is before linux-headers in the alphabetical
order, you normally have a cross-compiler available by the time the
linux-headers package is installed, but this is not explicitly
guaranteed by the package dependencies.
This problem was already raised on the LKML a number of years ago:
https://lkml.org/lkml/2007/10/10/140, with apparently no solution
coming up.
A possible solution is to adjust your patch so that it explicitly adds
host-gcc-initial as a dependency of linux-headers.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] FW: [PATCH] linux-headers: cross compile fix
2014-02-23 12:33 ` Noam Camus
2014-02-23 14:11 ` Thomas Petazzoni
@ 2014-02-23 14:13 ` Yann E. MORIN
1 sibling, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2014-02-23 14:13 UTC (permalink / raw)
To: buildroot
Noam, All,
On 2014-02-23 12:33 +0000, Noam Camus spake thusly:
> See Inline
>
> -----Original Message-----
> From: Thomas Petazzoni [mailto:thomas.petazzoni at free-electrons.com]
> Sent: Sunday, February 23, 2014 11:51 AM
> To: Noam Camus
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] FW: [PATCH] linux-headers: cross compile fix
>
> Dear Noam Camus,
>
> On Sun, 23 Feb 2014 08:29:15 +0000, Noam Camus wrote:
> > Otherwise compiler not found errors occured.
> >
> > Signed-off-by: Noam Camus <noamc@ezchip.com>
> > ---
> > package/linux-headers/linux-headers.mk | 1 +
> > 1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/package/linux-headers/linux-headers.mk
> > b/package/linux-headers/linux-headers.mk
> > index 30d3076..632b94f 100644
> > --- a/package/linux-headers/linux-headers.mk
> > +++ b/package/linux-headers/linux-headers.mk
> > @@ -25,6 +25,7 @@ define LINUX_HEADERS_INSTALL_STAGING_CMDS
> > HOSTCFLAGS="$(HOSTCFLAGS)" \
> > HOSTCXX="$(HOSTCXX)" \
> > INSTALL_HDR_PATH=$(STAGING_DIR)/usr \
> > + CROSS_COMPILE="$(TARGET_CROSS)" \
> > headers_install)
> > endef
> >
>
> Doesn't look harmful in principle, but it seems to have worked until now
> without CROSS_COMPILE="$(TARGET_CROSS)". Can you expand the commit log
> by explaining in which case you have seen errors, and which errors.
> The linux-headers package is used daily to build toolchains by all
> Buildroot users, so I'd like to understand how your situation is
> different. Is it that the ARC kernel headers need something special?
> But we are building ARC toolchains everyday in the autobuilders, with
> no problem. That's why I'd like to have more details.
> Thomas
>
> [Noam Camus]
> Just use target linux-headers-rebuild and you will get many errors that
> buildroot silently ignores.
It's not Buildroot that ignores those errors, it's the Linux buildsystem
itself that ignores them, since they are harmless at the time of
installing headers.
> You alternatively may add intentionally BAD CROSS_COMPILE if you don't
> have ARC setup handy and see that Toolchain building is not stopped due
> to this error.
The cross-compiler is not used at the time of 'make headers-install'.
So, those are spurious errors of the Linux buildsystem.
They can/should be safely ignored.
(Side note: ARC is not the only arch that exhibit this behaviour. IIRC,
cris, hexagon, ia64, parisc, score and xtensa behave the same, with ia64
in an aggaravated way.)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-23 14:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-23 8:29 [Buildroot] FW: [PATCH] linux-headers: cross compile fix Noam Camus
2014-02-23 9:50 ` Thomas Petazzoni
2014-02-23 12:33 ` Noam Camus
2014-02-23 14:11 ` Thomas Petazzoni
2014-02-23 14:13 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox