All of lore.kernel.org
 help / color / mirror / Atom feed
* Failed to cross compile kernel with Yocto toolchain
@ 2016-06-27  8:16 Zhenhua Luo
  2016-06-27 16:36 ` Khem Raj
  0 siblings, 1 reply; 14+ messages in thread
From: Zhenhua Luo @ 2016-06-27  8:16 UTC (permalink / raw)
  To: yocto

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

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.

$ 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
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

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
  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
  0 siblings, 1 reply; 14+ messages in thread
From: Khem Raj @ 2016-06-27 16:36 UTC (permalink / raw)
  To: Zhenhua Luo; +Cc: yocto

On Mon, Jun 27, 2016 at 1:16 AM, Zhenhua Luo <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 ?


>
> 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
> https://lists.yoctoproject.org/listinfo/yocto
>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
  2016-06-27 16:36 ` Khem Raj
@ 2016-06-28  5:56   ` Zhenhua Luo
  2016-06-28 10:27     ` Burton, Ross
       [not found]     ` <CAMKF1sr=7o2LnTtbgV=fEb+JMw2=vmvaN8b2iQSmZ1qJKd7SAw@mail.gmail.com>
  0 siblings, 2 replies; 14+ messages in thread
From: Zhenhua Luo @ 2016-06-28  5:56 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

Hello Khem, 

> -----Original Message-----
> From: Khem Raj [mailto:raj.khem@gmail.com]
> Sent: Tuesday, June 28, 2016 12:36 AM
> To: Zhenhua Luo <zhenhua.luo@nxp.com>
> Cc: 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>
> 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
> > https://lists.yoctoproject.org/listinfo/yocto
> >

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
  2016-06-28  5:56   ` Zhenhua Luo
@ 2016-06-28 10:27     ` Burton, Ross
  2016-06-28 11:20       ` Zhenhua Luo
       [not found]     ` <CAMKF1sr=7o2LnTtbgV=fEb+JMw2=vmvaN8b2iQSmZ1qJKd7SAw@mail.gmail.com>
  1 sibling, 1 reply; 14+ messages in thread
From: Burton, Ross @ 2016-06-28 10:27 UTC (permalink / raw)
  To: Zhenhua Luo; +Cc: yocto

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

On 28 June 2016 at 06:56, Zhenhua Luo <zhenhua.luo@nxp.com> wrote:

> [Luo Zhenhua-B19537] gcc can't be found after sourcing the SDK env script.
> but the /usr/bin is in the PATH env variable.
>

You *do* have a gcc in /usr/bin, right?

Ross

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
  2016-06-28 10:27     ` Burton, Ross
@ 2016-06-28 11:20       ` Zhenhua Luo
  2016-06-28 13:34         ` Daniel.
  0 siblings, 1 reply; 14+ messages in thread
From: Zhenhua Luo @ 2016-06-28 11:20 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto

Hi, 

> From: Burton, Ross [mailto:ross.burton@intel.com] 
> Sent: Tuesday, June 28, 2016 6:27 PM
> To: Zhenhua Luo <zhenhua.luo@nxp.com>
> Cc: Khem Raj <raj.khem@gmail.com>; yocto@yoctoproject.org
> Subject: Re: [yocto] Failed to cross compile kernel with Yocto toolchain
>
> On 28 June 2016 at 06:56, Zhenhua Luo <zhenhua.luo@nxp.com> wrote:
> Luo Zhenhua-B19537] gcc can't be found after sourcing the SDK env script. but the /usr/bin is in the PATH env variable.
> 
> You *do* have a gcc in /usr/bin, right?
[Zhenhua Liuo] Right. 


Best Regards,

Zhenhua

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
  2016-06-28 11:20       ` Zhenhua Luo
@ 2016-06-28 13:34         ` Daniel.
  2016-06-29  6:15           ` Zhenhua Luo
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel. @ 2016-06-28 13:34 UTC (permalink / raw)
  To: Zhenhua Luo; +Cc: yocto

I think you should set CROSS_COMPILE variable

usually I have a script at kernel root to setup variables for me: here
is what I'm using for Daisy
https://gist.github.com/gkos/28f7cf019b716eba8574b21e6f628aa7

2016-06-28 8:20 GMT-03:00 Zhenhua Luo <zhenhua.luo@nxp.com>:
> Hi,
>
>> From: Burton, Ross [mailto:ross.burton@intel.com]
>> Sent: Tuesday, June 28, 2016 6:27 PM
>> To: Zhenhua Luo <zhenhua.luo@nxp.com>
>> Cc: Khem Raj <raj.khem@gmail.com>; yocto@yoctoproject.org
>> Subject: Re: [yocto] Failed to cross compile kernel with Yocto toolchain
>>
>> On 28 June 2016 at 06:56, Zhenhua Luo <zhenhua.luo@nxp.com> wrote:
>> Luo Zhenhua-B19537] gcc can't be found after sourcing the SDK env script. but the /usr/bin is in the PATH env variable.
>>
>> You *do* have a gcc in /usr/bin, right?
> [Zhenhua Liuo] Right.
>
>
> Best Regards,
>
> Zhenhua
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



-- 
"Do or do not. There is no try"
  Yoda Master


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
       [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
  0 siblings, 1 reply; 14+ messages in thread
From: Khem Raj @ 2016-06-28 14:48 UTC (permalink / raw)
  To: Zhenhua Luo; +Cc: yocto

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

/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> wrote:

Hello Khem,

> -----Original Message-----
> From: Khem Raj [mailto:raj.khem@gmail.com]
> Sent: Tuesday, June 28, 2016 12:36 AM
> To: Zhenhua Luo <zhenhua.luo@nxp.com>
> Cc: 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>
> 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
> > https://lists.yoctoproject.org/listinfo/yocto
> >

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
  2016-06-28 13:34         ` Daniel.
@ 2016-06-29  6:15           ` Zhenhua Luo
  0 siblings, 0 replies; 14+ messages in thread
From: Zhenhua Luo @ 2016-06-29  6:15 UTC (permalink / raw)
  To: Daniel.; +Cc: yocto

Hello Daniel, 

I tried to pass CROSS_COMPILE for make, it doesn’t help. Actually the ENV variable is defined in /opt/poky/2.1+snapshot/environment-setup-ppce500mc-poky-linux. 
$ source /opt/poky/2.1+snapshot/environment-setup-ppce500mc-poky-linux 
$ env |  grep CROSS_COMPILE
CROSS_COMPILE=powerpc-poky-linux-


Best Regards,

Zhenhua 

> -----Original Message-----
> From: Daniel. [mailto:danielhilst@gmail.com]
> Sent: Tuesday, June 28, 2016 9:34 PM
> To: Zhenhua Luo <zhenhua.luo@nxp.com>
> Cc: Burton, Ross <ross.burton@intel.com>; yocto@yoctoproject.org
> Subject: Re: [yocto] Failed to cross compile kernel with Yocto toolchain
> 
> I think you should set CROSS_COMPILE variable
> 
> usually I have a script at kernel root to setup variables for me: here is what I'm
> using for Daisy
> https://gist.github.com/gkos/28f7cf019b716eba8574b21e6f628aa7
> 
> 2016-06-28 8:20 GMT-03:00 Zhenhua Luo <zhenhua.luo@nxp.com>:
> > Hi,
> >
> >> From: Burton, Ross [mailto:ross.burton@intel.com]
> >> Sent: Tuesday, June 28, 2016 6:27 PM
> >> To: Zhenhua Luo <zhenhua.luo@nxp.com>
> >> Cc: Khem Raj <raj.khem@gmail.com>; yocto@yoctoproject.org
> >> Subject: Re: [yocto] Failed to cross compile kernel with Yocto
> >> toolchain
> >>
> >> On 28 June 2016 at 06:56, Zhenhua Luo <zhenhua.luo@nxp.com> wrote:
> >> Luo Zhenhua-B19537] gcc can't be found after sourcing the SDK env script.
> but the /usr/bin is in the PATH env variable.
> >>
> >> You *do* have a gcc in /usr/bin, right?
> > [Zhenhua Liuo] Right.
> >
> >
> > Best Regards,
> >
> > Zhenhua
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> 
> 
> 
> --
> "Do or do not. There is no try"
>   Yoda Master

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
  2016-06-28 14:48         ` Khem Raj
@ 2016-06-29  8:52           ` Zhenhua Luo
  2016-06-29 12:13             ` Daniel.
  0 siblings, 1 reply; 14+ messages in thread
From: Zhenhua Luo @ 2016-06-29  8:52 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

[-- 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 --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
  2016-06-29  8:52           ` Zhenhua Luo
@ 2016-06-29 12:13             ` Daniel.
  2016-06-30  1:54               ` Zhenhua Luo
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel. @ 2016-06-29 12:13 UTC (permalink / raw)
  To: Zhenhua Luo; +Cc: yocto

Is /usr/lib64/gcc a file or a link? Is it a valid link?

2016-06-29 5:52 GMT-03:00 Zhenhua Luo <zhenhua.luo@nxp.com>:
> 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> wrote:
>
> Hello Khem,
>
>
>> -----Original Message-----
>> From: Khem Raj [mailto:raj.khem@gmail.com]
>> Sent: Tuesday, June 28, 2016 12:36 AM
>> To: Zhenhua Luo <zhenhua.luo@nxp.com>
>> Cc: 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>
>> 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
>> > https://lists.yoctoproject.org/listinfo/yocto
>> >
>
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



-- 
"Do or do not. There is no try"
  Yoda Master


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
  2016-06-29 12:13             ` Daniel.
@ 2016-06-30  1:54               ` Zhenhua Luo
  2016-06-30 20:47                 ` Daniel.
  0 siblings, 1 reply; 14+ messages in thread
From: Zhenhua Luo @ 2016-06-30  1:54 UTC (permalink / raw)
  To: Daniel.; +Cc: yocto

I think you mean /usr/lib64/ccache/gcc instead of /usr/lib64/gcc, it is a valid link. 

$ source /opt/poky/2.1+snapshot/environment-setup-ppce500mc-poky-linux 
$ which gcc
/usr/lib64/ccache/gcc
$ 
$ ls -l /usr/lib64/ccache/gcc
lrwxrwxrwx 1 root root 16 Jun 29 18:22 /usr/lib64/ccache/gcc -> ../../bin/ccache
$ ls -l /usr/bin/ccache 
-rwxr-xr-x 1 root root 128584 Jan 26 14:58 /usr/bin/ccache
$ 


Best Regards,

Zhenhua

> -----Original Message-----
> From: Daniel. [mailto:danielhilst@gmail.com]
> Sent: Wednesday, June 29, 2016 8:14 PM
> To: Zhenhua Luo <zhenhua.luo@nxp.com>
> Cc: Khem Raj <raj.khem@gmail.com>; yocto@yoctoproject.org
> Subject: Re: [yocto] Failed to cross compile kernel with Yocto toolchain
> 
> Is /usr/lib64/gcc a file or a link? Is it a valid link?
> 
> 2016-06-29 5:52 GMT-03:00 Zhenhua Luo <zhenhua.luo@nxp.com>:
> > 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/l
> > ocal/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-
> wra
> > pper
> >
> > 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+sna
> > pshot/sysroots/x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysroot
> > s/x86_64-pokysdk-linux/sbin:/opt/poky/2.1+snapshot/sysroots/x86_64-pok
> > ysdk-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-ucl
> > ibc:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/power
> > pc-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> wrote:
> >
> > Hello Khem,
> >
> >
> >> -----Original Message-----
> >> From: Khem Raj [mailto:raj.khem@gmail.com]
> >> Sent: Tuesday, June 28, 2016 12:36 AM
> >> To: Zhenhua Luo <zhenhua.luo@nxp.com>
> >> Cc: 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>
> >> 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+sna
> > pshot/sysroots/x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysroot
> > s/x86_64-pokysdk-linux/sbin:/opt/poky/2.1+snapshot/sysroots/x86_64-pok
> > ysdk-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-ucl
> > ibc:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/power
> > pc-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
> >> > https://lists.yoctoproject.org/listinfo/yocto
> >> >
> >
> >
> >
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >
> 
> 
> 
> --
> "Do or do not. There is no try"
>   Yoda Master

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
  2016-06-30  1:54               ` Zhenhua Luo
@ 2016-06-30 20:47                 ` Daniel.
  2016-07-01  8:45                   ` Zhenhua Luo
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel. @ 2016-06-30 20:47 UTC (permalink / raw)
  To: Zhenhua Luo; +Cc: yocto

The problem is that ccache is not finding the compiler after
environment-setup*.sh is sourced.Your error message can be foud at:
https://github.com/ccache/ccache/blob/master/ccache.c#L2075. It seems
that its searching for "gcc" when I though that kernel would search
for "${CROSS_COMPILE}gcc"

2016-06-29 22:54 GMT-03:00 Zhenhua Luo <zhenhua.luo@nxp.com>:
> I think you mean /usr/lib64/ccache/gcc instead of /usr/lib64/gcc, it is a valid link.
>
> $ source /opt/poky/2.1+snapshot/environment-setup-ppce500mc-poky-linux
> $ which gcc
> /usr/lib64/ccache/gcc
> $
> $ ls -l /usr/lib64/ccache/gcc
> lrwxrwxrwx 1 root root 16 Jun 29 18:22 /usr/lib64/ccache/gcc -> ../../bin/ccache
> $ ls -l /usr/bin/ccache
> -rwxr-xr-x 1 root root 128584 Jan 26 14:58 /usr/bin/ccache
> $
>
>
> Best Regards,
>
> Zhenhua
>
>> -----Original Message-----
>> From: Daniel. [mailto:danielhilst@gmail.com]
>> Sent: Wednesday, June 29, 2016 8:14 PM
>> To: Zhenhua Luo <zhenhua.luo@nxp.com>
>> Cc: Khem Raj <raj.khem@gmail.com>; yocto@yoctoproject.org
>> Subject: Re: [yocto] Failed to cross compile kernel with Yocto toolchain
>>
>> Is /usr/lib64/gcc a file or a link? Is it a valid link?
>>
>> 2016-06-29 5:52 GMT-03:00 Zhenhua Luo <zhenhua.luo@nxp.com>:
>> > 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/l
>> > ocal/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-
>> wra
>> > pper
>> >
>> > 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+sna
>> > pshot/sysroots/x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysroot
>> > s/x86_64-pokysdk-linux/sbin:/opt/poky/2.1+snapshot/sysroots/x86_64-pok
>> > ysdk-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-ucl
>> > ibc:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/power
>> > pc-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> wrote:
>> >
>> > Hello Khem,
>> >
>> >
>> >> -----Original Message-----
>> >> From: Khem Raj [mailto:raj.khem@gmail.com]
>> >> Sent: Tuesday, June 28, 2016 12:36 AM
>> >> To: Zhenhua Luo <zhenhua.luo@nxp.com>
>> >> Cc: 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>
>> >> 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+sna
>> > pshot/sysroots/x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysroot
>> > s/x86_64-pokysdk-linux/sbin:/opt/poky/2.1+snapshot/sysroots/x86_64-pok
>> > ysdk-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-ucl
>> > ibc:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/power
>> > pc-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
>> >> > https://lists.yoctoproject.org/listinfo/yocto
>> >> >
>> >
>> >
>> >
>> >
>> > --
>> > _______________________________________________
>> > yocto mailing list
>> > yocto@yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/yocto
>> >
>>
>>
>>
>> --
>> "Do or do not. There is no try"
>>   Yoda Master



-- 
"Do or do not. There is no try"
  Yoda Master


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
  2016-06-30 20:47                 ` Daniel.
@ 2016-07-01  8:45                   ` Zhenhua Luo
  2016-07-01 14:30                     ` Khem Raj
  0 siblings, 1 reply; 14+ messages in thread
From: Zhenhua Luo @ 2016-07-01  8:45 UTC (permalink / raw)
  To: Daniel.; +Cc: yocto

Thanks a lot for your comments, Daniel. 

Can somebody please shed light on how to fix the issue in Yocto recipes?  


Best Regards,

Zhenhua

> -----Original Message-----
> From: Daniel. [mailto:danielhilst@gmail.com]
> Sent: Friday, July 01, 2016 4:48 AM
> To: Zhenhua Luo <zhenhua.luo@nxp.com>
> Cc: Khem Raj <raj.khem@gmail.com>; yocto@yoctoproject.org
> Subject: Re: [yocto] Failed to cross compile kernel with Yocto toolchain
> 
> The problem is that ccache is not finding the compiler after environment-
> setup*.sh is sourced.Your error message can be foud at:
> https://github.com/ccache/ccache/blob/master/ccache.c#L2075. It seems that
> its searching for "gcc" when I though that kernel would search for
> "${CROSS_COMPILE}gcc"
> 
> 2016-06-29 22:54 GMT-03:00 Zhenhua Luo <zhenhua.luo@nxp.com>:
> > I think you mean /usr/lib64/ccache/gcc instead of /usr/lib64/gcc, it is a valid
> link.
> >
> > $ source /opt/poky/2.1+snapshot/environment-setup-ppce500mc-poky-
> linux
> > $ which gcc
> > /usr/lib64/ccache/gcc
> > $
> > $ ls -l /usr/lib64/ccache/gcc
> > lrwxrwxrwx 1 root root 16 Jun 29 18:22 /usr/lib64/ccache/gcc ->
> > ../../bin/ccache $ ls -l /usr/bin/ccache -rwxr-xr-x 1 root root 128584
> > Jan 26 14:58 /usr/bin/ccache $
> >
> >
> > Best Regards,
> >
> > Zhenhua
> >
> >> -----Original Message-----
> >> From: Daniel. [mailto:danielhilst@gmail.com]
> >> Sent: Wednesday, June 29, 2016 8:14 PM
> >> To: Zhenhua Luo <zhenhua.luo@nxp.com>
> >> Cc: Khem Raj <raj.khem@gmail.com>; yocto@yoctoproject.org
> >> Subject: Re: [yocto] Failed to cross compile kernel with Yocto
> >> toolchain
> >>
> >> Is /usr/lib64/gcc a file or a link? Is it a valid link?
> >>
> >> 2016-06-29 5:52 GMT-03:00 Zhenhua Luo <zhenhua.luo@nxp.com>:
> >> > 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:/us
> >> > r/l
> >> > ocal/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-
> >> wra
> >> > pper
> >> >
> >> > 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/p
> >> > oky
> >> > /2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/sbin:/opt/poky/2.1+
> >> > sna
> >> > pshot/sysroots/x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysr
> >> > oot
> >> > s/x86_64-pokysdk-linux/sbin:/opt/poky/2.1+snapshot/sysroots/x86_64-
> >> > pok
> >> > ysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapsh
> >> > ot/
> >> > 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-
> >> > +ucl
> >> > ibc:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/po
> >> > wer
> >> > pc-poky-linux-musl:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/loc
> >> > al/
> >> > bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/bjsimics/.local/bin:/h
> >> > ome
> >> > /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> wrote:
> >> >
> >> > Hello Khem,
> >> >
> >> >
> >> >> -----Original Message-----
> >> >> From: Khem Raj [mailto:raj.khem@gmail.com]
> >> >> Sent: Tuesday, June 28, 2016 12:36 AM
> >> >> To: Zhenhua Luo <zhenhua.luo@nxp.com>
> >> >> Cc: 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>
> >> >> 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/p
> >> > oky
> >> > /2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/sbin:/opt/poky/2.1+
> >> > sna
> >> > pshot/sysroots/x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysr
> >> > oot
> >> > s/x86_64-pokysdk-linux/sbin:/opt/poky/2.1+snapshot/sysroots/x86_64-
> >> > pok
> >> > ysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapsh
> >> > ot/
> >> > 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-
> >> > +ucl
> >> > ibc:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/po
> >> > wer
> >> > pc-poky-linux-musl:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/loc
> >> > al/
> >> > bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/bjsimics/.local/bin:/h
> >> > ome
> >> > /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
> >> >> > https://lists.yoctoproject.org/listinfo/yocto
> >> >> >
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > _______________________________________________
> >> > yocto mailing list
> >> > yocto@yoctoproject.org
> >> > https://lists.yoctoproject.org/listinfo/yocto
> >> >
> >>
> >>
> >>
> >> --
> >> "Do or do not. There is no try"
> >>   Yoda Master
> 
> 
> 
> --
> "Do or do not. There is no try"
>   Yoda Master

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failed to cross compile kernel with Yocto toolchain
  2016-07-01  8:45                   ` Zhenhua Luo
@ 2016-07-01 14:30                     ` Khem Raj
  0 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2016-07-01 14:30 UTC (permalink / raw)
  To: Zhenhua Luo; +Cc: yocto

you can try to set HOSTCC=/usr/bin/gcc along when you call make may be
via EXTRA_OEMAKE, problem you have is that kernel is expecting gcc to
be used for host utilties and ccache has overrides for gcc which may
not be working in all situations. Ideally you should just uninstall
ccache from your build host.

On Fri, Jul 1, 2016 at 1:45 AM, Zhenhua Luo <zhenhua.luo@nxp.com> wrote:
> Thanks a lot for your comments, Daniel.
>
> Can somebody please shed light on how to fix the issue in Yocto recipes?
>
>
> Best Regards,
>
> Zhenhua
>
>> -----Original Message-----
>> From: Daniel. [mailto:danielhilst@gmail.com]
>> Sent: Friday, July 01, 2016 4:48 AM
>> To: Zhenhua Luo <zhenhua.luo@nxp.com>
>> Cc: Khem Raj <raj.khem@gmail.com>; yocto@yoctoproject.org
>> Subject: Re: [yocto] Failed to cross compile kernel with Yocto toolchain
>>
>> The problem is that ccache is not finding the compiler after environment-
>> setup*.sh is sourced.Your error message can be foud at:
>> https://github.com/ccache/ccache/blob/master/ccache.c#L2075. It seems that
>> its searching for "gcc" when I though that kernel would search for
>> "${CROSS_COMPILE}gcc"
>>
>> 2016-06-29 22:54 GMT-03:00 Zhenhua Luo <zhenhua.luo@nxp.com>:
>> > I think you mean /usr/lib64/ccache/gcc instead of /usr/lib64/gcc, it is a valid
>> link.
>> >
>> > $ source /opt/poky/2.1+snapshot/environment-setup-ppce500mc-poky-
>> linux
>> > $ which gcc
>> > /usr/lib64/ccache/gcc
>> > $
>> > $ ls -l /usr/lib64/ccache/gcc
>> > lrwxrwxrwx 1 root root 16 Jun 29 18:22 /usr/lib64/ccache/gcc ->
>> > ../../bin/ccache $ ls -l /usr/bin/ccache -rwxr-xr-x 1 root root 128584
>> > Jan 26 14:58 /usr/bin/ccache $
>> >
>> >
>> > Best Regards,
>> >
>> > Zhenhua
>> >
>> >> -----Original Message-----
>> >> From: Daniel. [mailto:danielhilst@gmail.com]
>> >> Sent: Wednesday, June 29, 2016 8:14 PM
>> >> To: Zhenhua Luo <zhenhua.luo@nxp.com>
>> >> Cc: Khem Raj <raj.khem@gmail.com>; yocto@yoctoproject.org
>> >> Subject: Re: [yocto] Failed to cross compile kernel with Yocto
>> >> toolchain
>> >>
>> >> Is /usr/lib64/gcc a file or a link? Is it a valid link?
>> >>
>> >> 2016-06-29 5:52 GMT-03:00 Zhenhua Luo <zhenhua.luo@nxp.com>:
>> >> > 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:/us
>> >> > r/l
>> >> > ocal/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-
>> >> wra
>> >> > pper
>> >> >
>> >> > 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/p
>> >> > oky
>> >> > /2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/sbin:/opt/poky/2.1+
>> >> > sna
>> >> > pshot/sysroots/x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysr
>> >> > oot
>> >> > s/x86_64-pokysdk-linux/sbin:/opt/poky/2.1+snapshot/sysroots/x86_64-
>> >> > pok
>> >> > ysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapsh
>> >> > ot/
>> >> > 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-
>> >> > +ucl
>> >> > ibc:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/po
>> >> > wer
>> >> > pc-poky-linux-musl:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/loc
>> >> > al/
>> >> > bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/bjsimics/.local/bin:/h
>> >> > ome
>> >> > /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> wrote:
>> >> >
>> >> > Hello Khem,
>> >> >
>> >> >
>> >> >> -----Original Message-----
>> >> >> From: Khem Raj [mailto:raj.khem@gmail.com]
>> >> >> Sent: Tuesday, June 28, 2016 12:36 AM
>> >> >> To: Zhenhua Luo <zhenhua.luo@nxp.com>
>> >> >> Cc: 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>
>> >> >> 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/p
>> >> > oky
>> >> > /2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/sbin:/opt/poky/2.1+
>> >> > sna
>> >> > pshot/sysroots/x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapshot/sysr
>> >> > oot
>> >> > s/x86_64-pokysdk-linux/sbin:/opt/poky/2.1+snapshot/sysroots/x86_64-
>> >> > pok
>> >> > ysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/poky/2.1+snapsh
>> >> > ot/
>> >> > 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-
>> >> > +ucl
>> >> > ibc:/opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/po
>> >> > wer
>> >> > pc-poky-linux-musl:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/loc
>> >> > al/
>> >> > bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/bjsimics/.local/bin:/h
>> >> > ome
>> >> > /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
>> >> >> > https://lists.yoctoproject.org/listinfo/yocto
>> >> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > _______________________________________________
>> >> > yocto mailing list
>> >> > yocto@yoctoproject.org
>> >> > https://lists.yoctoproject.org/listinfo/yocto
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> "Do or do not. There is no try"
>> >>   Yoda Master
>>
>>
>>
>> --
>> "Do or do not. There is no try"
>>   Yoda Master


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-07-01 15:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.