From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] FW: [PATCH] linux-headers: cross compile fix
Date: Sun, 23 Feb 2014 15:11:59 +0100 [thread overview]
Message-ID: <20140223151159.7114b0be@skate> (raw)
In-Reply-To: <884EA965490E3C4D8E66AEF41E98025006C47E@ezex10.ezchip.com>
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
next prev parent reply other threads:[~2014-02-23 14:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2014-02-23 14:13 ` Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140223151159.7114b0be@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox