All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhenhua Luo <zhenhua.luo@nxp.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: Failed to cross compile kernel with Yocto toolchain
Date: Wed, 29 Jun 2016 08:52:42 +0000	[thread overview]
Message-ID: <DB3PR04MB06844D91E4A18CAAFDFD6194EE230@DB3PR04MB0684.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <CAMKF1soDAJ3hTV90UDTjwPc8U7G2x1m9jSLYnaaXGmJwbg7=FQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 6408 bytes --]

The /usr/lib64/ccache is added in PATH by /etc/profile.d/ccache.sh when ccache is installed on Fedora host, the issue disappears if one of the following changes is done.

1.       Remove /usr/lib64/ccache from PATH

2.       Move /usr/lib64/ccache after /usr/bin in PATH

3.       Set CCACHE_PATH equals to PATH

4.       Unset CCACHE_PATH

Another observation, before sourcing environment-setup-<core>-poky-linux, gcc can be found even if /usr/lib64/ccache is in prepend to PATH, but after sourcing the environment-setup-<core>-poky-linux script, the gcc can’t be found, this should be a bug of the environment-setup-<core>-poky-linux script. Should I open a Bugzilla ticket to track it?

$ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/bjsimics/.local/bin:/home/bjsimics/bin
which gcc
/usr/lib64/ccache/gcc
$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-default-libstdcxx-abi=gcc4-compatible --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC)
$
$ source /opt/poky/2.1+snapshot/environment-setup-ppce500mc-poky-linux
$
$ echo $PATH
/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/sbin:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/sbin:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux-uclibc:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux-musl:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/bjsimics/.local/bin:/home/bjsimics/bin
$
$ which gcc
/usr/lib64/ccache/gcc
$ gcc -v
ccache: error: Could not find compiler "gcc" in PATH
$


Best Regards,

Zhenhua

From: Khem Raj [mailto:raj.khem@gmail.com]
Sent: Tuesday, June 28, 2016 10:48 PM
To: Zhenhua Luo <zhenhua.luo@nxp.com>
Cc: yocto@yoctoproject.org
Subject: RE: [yocto] Failed to cross compile kernel with Yocto toolchain


/usr/lib64/ccache is unusual why do you have it in path and if you really need it add it after all other paths. Check your env first

On Jun 27, 2016 10:56 PM, "Zhenhua Luo" <zhenhua.luo@nxp.com<mailto:zhenhua.luo@nxp.com>> wrote:
Hello Khem,

> -----Original Message-----
> From: Khem Raj [mailto:raj.khem@gmail.com<mailto:raj.khem@gmail.com>]
> Sent: Tuesday, June 28, 2016 12:36 AM
> To: Zhenhua Luo <zhenhua.luo@nxp.com<mailto:zhenhua.luo@nxp.com>>
> Cc: yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
> Subject: Re: [yocto] Failed to cross compile kernel with Yocto toolchain
>
> On Mon, Jun 27, 2016 at 1:16 AM, Zhenhua Luo <zhenhua.luo@nxp.com<mailto:zhenhua.luo@nxp.com>>
> wrote:
> > Hello all,
> >
> >
> >
> > I generate the Yocto toolchain by “bitbake meta-toolchain”, and use
> > this toolchain to cross-compile kernel, I met the following error. Is
> > this a bug or I missed something? My host Linux is Fedora 22.
>
> its better to start using bitbake -cpopulate_sdk <image name> to generate
> SDKs.
>
>
> >
> >
> >
> > $ source /opt/poky/2.1+snapshot/environment-setup-ppce500mc-poky-
> linux
> >
> > $ cd linux/
> >
> > $ make corenet32_smp_defconfig
> >
> >   HOSTCC  scripts/kconfig/conf.o
> >
> > ccache: error: Could not find compiler "gcc" in PATH
>
> did you see if gcc is in your path after sourcing SDK env script?
[Luo Zhenhua-B19537] gcc can't be found after sourcing the SDK env script. but the /usr/bin is in the PATH env variable.
$ source /opt/poky/2.1+snapshot/environment-setup-ppce500mc-poky-linux
$ echo $PATH
/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/sbin:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/sbin:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux-uclibc:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux-musl:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/bjsimics/.local/bin:/home/bjsimics/bin
$ echo $CCACHE_PATH
/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux-uclibc:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux-musl:
$ which gcc
/usr/lib64/ccache/gcc
$ gcc -v
ccache: error: Could not find compiler "gcc" in PATH

Best Regards,

Zhenhua

> > scripts/Makefile.host:108: recipe for target 'scripts/kconfig/conf.o'
> > failed
> >
> > make[1]: *** [scripts/kconfig/conf.o] Error 1
> >
> > Makefile:541: recipe for target 'corenet32_smp_defconfig' failed
> >
> > make: *** [corenet32_smp_defconfig] Error 2
> >
> >
> >
> >
> >
> > Best Regards,
> >
> >
> >
> > Zhenhua
> >
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
> > https://lists.yoctoproject.org/listinfo/yocto
> >


[-- Attachment #2: Type: text/html, Size: 18505 bytes --]

  reply	other threads:[~2016-06-29  8:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27  8:16 Failed to cross compile kernel with Yocto toolchain Zhenhua Luo
2016-06-27 16:36 ` Khem Raj
2016-06-28  5:56   ` Zhenhua Luo
2016-06-28 10:27     ` Burton, Ross
2016-06-28 11:20       ` Zhenhua Luo
2016-06-28 13:34         ` Daniel.
2016-06-29  6:15           ` Zhenhua Luo
     [not found]     ` <CAMKF1sr=7o2LnTtbgV=fEb+JMw2=vmvaN8b2iQSmZ1qJKd7SAw@mail.gmail.com>
     [not found]       ` <CAMKF1sqSM_jtKm0BCzcpDCDFwQZe6jOA_AO+7acq2Yq-N731-w@mail.gmail.com>
2016-06-28 14:48         ` Khem Raj
2016-06-29  8:52           ` Zhenhua Luo [this message]
2016-06-29 12:13             ` Daniel.
2016-06-30  1:54               ` Zhenhua Luo
2016-06-30 20:47                 ` Daniel.
2016-07-01  8:45                   ` Zhenhua Luo
2016-07-01 14:30                     ` Khem Raj

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=DB3PR04MB06844D91E4A18CAAFDFD6194EE230@DB3PR04MB0684.eurprd04.prod.outlook.com \
    --to=zhenhua.luo@nxp.com \
    --cc=raj.khem@gmail.com \
    --cc=yocto@yoctoproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.