Bug 1372

Summary: lib64-gcc-cross-initial:do_compile failed
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Lianhao Lu <lianhao.lu>
Component: devtools / tool chainAssignee: Ke Yu <ke.yu>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: dongxiao.xu, ke.yu, meta.mr.watcher, meta.watcher, richard.purdie, sgw
Version: unspecified   
Target Milestone: 1.2   
Hardware: x86   
OS: Multiple   
Whiteboard: Post 1.1, as the bug happens only in rare scenario
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Lianhao Lu 2011-08-15 23:42:14 UTC
Following the following steps would trigger a do_compile failure in lib64-gcc-cross-initial, complaining not finding "gnu/stubs-64.h" in sysroot

1. set MACHINE=qemux86 and include multilib.conf in local.conf
2. bitbake eglibc
3. bitbake lib64-gcc-cross-initial
Comment 1 Ke Yu 2011-08-15 23:46:15 UTC
My understanding is that qemux86 can not built lib64 multilib, since it is 32bit. but qemux86-64 is allowed to buid lib64 multilib
Comment 2 Lianhao Lu 2011-08-16 00:20:58 UTC
(In reply to comment #1)
> My understanding is that qemux86 can not built lib64 multilib, since it is
> 32bit. but qemux86-64 is allowed to buid lib64 multilib

Well, then what is lib64 on qemux86-64 for?
Comment 3 Nitin Kamble 2011-08-16 08:46:56 UTC
lianhao,
  in your original post you mentioned the MACHINE is set to qemux86, which is a 32bit only machine. And 64bit libraries does not make sense on 32bit machine.
Nitin
Comment 4 Nitin Kamble 2011-08-16 12:07:54 UTC
ke,
also maybe we can give an error if somebody enables 64bit multilib for 32bit machine/arch.

Nitin
Comment 5 Nitin Kamble 2011-08-17 18:31:19 UTC
ke, I am not that familiar with the multilib code. Does it makes sense to give an error if someone tries to build 64bit targets with 32bit arch? And what is the right place to give this error. I think this is more multilib related bug than gcc.

Nitin
Comment 6 Ke Yu 2011-08-18 19:55:25 UTC
(In reply to comment #5)
> ke, I am not that familiar with the multilib code. Does it makes sense to give
> an error if someone tries to build 64bit targets with 32bit arch? And what is
> the right place to give this error. I think this is more multilib related bug
> than gcc.
> Nitin

I think it make sense to give error. i will take this bug to investigate which is the right to raise the error
Comment 7 Ke Yu 2011-08-22 19:41:06 UTC
Talk with RP, and RP suggest to figure out why it breaks. in theory, it should pass.

and the usage scenario would be: 64 bit kernel + most 32 bit apps + one demanding 64 bit app (e.g. DB)
Comment 8 Dongxiao Xu 2011-08-31 18:37:27 UTC
This issue may caused by the toolchain boot strap issue. When building multilib version of toolchain, normal gcc/eglibc has been built out and they do exist in sysroot. Therefore configuring gcc-cross-initial will find that some macros have already been defined and thus it includes some inproper headers, like the stubs.h and stubs-64.h, actually these headers are generated by eglibc.

One solution may be to change the sysroot for multilib recipes, otherwise is to use unique gcc to build multilib recipes.