Bug 3080

Summary: [meta-x32] x32 image fails to build due to no recipes available for eglib_2.15
Product: [Build System, Metadata & Runtime] Other YP Layers Reporter: Laurentiu Serban <laurentiu.serban>
Component: layersAssignee: Saul Wold <sgw>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: bruce.ashfield, poky.bs.watcher, poky.watcher, song.liu, sstncr
Version: unspecified   
Target Milestone: 1.3 M5   
Hardware: x86   
OS: Multiple   
Whiteboard: Fixed for Danny
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
log do compile issue
none
local.conf
none
eglibc log.do_compile ubuntu2 none

Description Laurentiu Serban 2012-09-08 06:52:18 UTC
lserban@computer1:~/work/poky/build$ bitbake core-image-minimal
Loading cache: 100% |########################################################################################################################################################################################################| ETA:  00:00:00
Loaded 1123 entries from dependency cache.
ERROR: No recipes available for:
  /home/lserban/work/poky/meta-x32/eglibc/eglibc_2.15.bbappend
  /home/lserban/work/poky/meta-x32/eglibc/eglibc-initial_2.15.bbappend
ERROR: Command execution failed: Exited with 1

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
Comment 1 Saul Wold 2012-09-11 04:25:34 UTC
Removing the x32 layer and setting the default tune:

DEFAULTTUNE = "x86-64-x32"
baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) or 'INVALID'), True) or 'lib'}"

Builds correctly with 2.16 eglibc and the 3.4 kernel.  

I did one additional step of using bitbake -c menuconfig linux-yocto on the kernel to enable CONFIG_X86_X32=y

This booted to and x32 based image!

I am going to work with Bruce to get a correct config fragment into the meta layer.
Comment 2 Laurentiu Serban 2012-09-11 12:51:44 UTC
Adding the x32 layer
gives the following output

lserban@computer4:~/work/master/build$ bitbake core-image-sato
Pseudo is not present but is required, building this first before the main build
ERROR: ParseError at /home/lserban/work/master/meta-x32/images/core-image-core-x32.bb:8: Could not include required file recipes-core/images/core-image-core-x32.bb                                                          | ETA:  --:--:--
ERROR: Command execution failed: Exited with 1

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
Comment 3 Laurentiu Serban 2012-09-11 12:52:38 UTC
I will set the test as failed until the fix is commited
Comment 4 Saul Wold 2012-09-12 21:58:29 UTC
Thanks to Bruce

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0359330bdd9ab0a98a07531fee77a79c69ca8b70

This is post RC1

For the test, you don't need to add the meta-x32 layer any longer.
Comment 5 Laurentiu Serban 2012-09-20 15:38:28 UTC
I have these errors while using the steps above.

r/build/tmp/work/x86_64_x32-poky-linux-gnux32/eglibc-2.16-r9+svnr20393/build-x86_64-poky-linux-gnux32/posix/spawnattr_getschedparam.o.dt -MT /home/lserban/work/master/build/tmp/work/x86_64_x32-poky-linux-gnux32/eglibc-2.16-r9+svnr20393/build-x86_64-poky-linux-gnux32/posix/spawnattr_getschedparam.o
| ../sysdeps/unix/sysv/linux/pwrite.c:32:4: error: #error "__NR_pwrite and __NR_pwrite64 both defined???"
| ../sysdeps/unix/sysv/linux/pread.c:32:4: error: #error "__NR_pread and __NR_pread64 both defined???"
| make[2]: *** [/home/lserban/work/master/build/tmp/work/x86_64_x32-poky-linux-gnux32/eglibc-2.16-r9+svnr20393/build-x86_64-poky-linux-gnux32/posix/pwrite.o] Error 1
| make[2]: *** Waiting for unfinished jobs....
| make[2]: *** [/home/lserban/work/master/build/tmp/work/x86_64_x32-poky-linux-gnux32/eglibc-2.16-r9+svnr20393/build-x86_64-poky-linux-gnux32/posix/pread.o] Error 1
| make[2]: Leaving directory `/home/lserban/work/master/build/tmp/work/x86_64_x32-poky-linux-gnux32/eglibc-2.16-r9+svnr20393/eglibc-2_16/libc/posix'
| make[1]: *** [posix/subdir_lib] Error 2
| make[1]: Leaving directory `/home/lserban/work/master/build/tmp/work/x86_64_x32-poky-linux-gnux32/eglibc-2.16-r9+svnr20393/eglibc-2_16/libc'
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (see /home/lserban/work/master/build/tmp/work/x86_64_x32-poky-linux-gnux32/eglibc-2.16-r9+svnr20393/temp/log.do_compile.5605 for further information)
ERROR: Task 7 (/home/lserban/work/master/meta/recipes-core/eglibc/eglibc_2.16.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 727 tasks of which 726 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/lserban/work/master/meta/recipes-core/eglibc/eglibc_2.16.bb, do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

The eglibc revision might be important here eglibc-2.16-r9+svnr2039
Comment 6 Laurentiu Serban 2012-09-20 15:39:42 UTC
commit id 0359330bdd9ab0a98a07531fee77a79c69ca8b70
Comment 7 Laurentiu Serban 2012-09-20 15:42:50 UTC
Created attachment 825 [details]
log do compile issue
Comment 8 Laurentiu Serban 2012-09-20 15:55:27 UTC
Created attachment 826 [details]
local.conf
Comment 9 Laurentiu Serban 2012-09-20 16:01:12 UTC
Build Configuration:
BB_VERSION        = "1.15.3"
TARGET_ARCH       = "i586"
TARGET_OS         = "linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.2+snapshot-20120920"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "(nobranch):0359330bdd9ab0a98a07531fee77a79c69ca8b70"
Comment 10 Stefan Stanacar 2012-09-27 09:59:52 UTC
Using:

Build Configuration:
BB_VERSION        = "1.15.3"
TARGET_ARCH       = "x86_64"
TARGET_OS         = "linux-gnux32"
MACHINE           = "qemux86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "1.2+snapshot-20120927"
TUNE_FEATURES     = "mx32"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "1.3_M5:718eb85806e080d0b165344b272e531ef19421eb"


and these lines in local.conf:

DEFAULTTUNE = "x86-64-x32"
baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) or 'INVALID'), True) or 'lib'}"

I didn't get any errors on bitbake core-image-minimal on Fedora 17, OpenSuse 12.2 and CentOS 6.3.
Comment 11 Stefan Stanacar 2012-10-05 14:49:55 UTC
But it failed on eglibc compile on Ubuntu 12.04 x64, branch danny:

Build Configuration:
BB_VERSION        = "1.16.0"
TARGET_ARCH       = "x86_64"
TARGET_OS         = "linux-gnux32"
MACHINE           = "qemux86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "1.3"
TUNE_FEATURES     = "mx32"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "danny:86c9aa8081f107420cd3763d0566d779daddc2b1"

DEFAULTTUNE = "x86-64-x32"
baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) or 'INVALID'), True) or 'lib'}"
Comment 12 Stefan Stanacar 2012-10-05 14:51:29 UTC
Created attachment 876 [details]
eglibc log.do_compile ubuntu2
Comment 13 Saul Wold 2012-10-08 20:40:47 UTC
I still need more information, and maybe access to that machine, I can not reproduce this issue.  I just tried again with a fresh build (no sstate).

My machine is 12.04.1 LTS with a 3.2.0-31 kernel.

Also, please note these compile failures are different!  The first one is a compile fail with a #error NF_pread and NR_pread64 both being defined.  The new error is in the make-syscalls.sh script with a bad subsititution, this could be a shell issue or missing dependency of somekind.  Again I would need to look directly at this build.
Comment 14 Saul Wold 2012-10-09 18:40:05 UTC
The new issue is related to make-syscalls.sh which has some bash'isms in it. I found that the systems QA is using has dash as default, while I had bash as default /bin/sh.  I checked with Khem and found that eglibc is currently not dash clean in all cases.

I am working on seeing what changes can be made, but currently a release note for x32 might be appropriate and make a note in the x32 Wiki page.
Comment 15 Stefan Stanacar 2012-10-10 10:51:36 UTC
I think that /bin/sh -> dash is the default in Ubuntu (at least for the last 2 versions), I didn't do any change here.

stefans@ubuntu12:~$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Aug  3 17:13 /bin/sh -> dash

Interestingly user shell is still bash:

stefans:x:1000:1000:Stefan,,,:/home/stefans:/bin/bash

After changing /bin/sh -> bash eglibc compile doesn't fail anymore, image builds fine, boots and kernel has the correct config fragment. Same for other distros (see comment 10).
Comment 17 Stefan Stanacar 2012-10-11 15:59:06 UTC
Verified danny:c9de24d3f4845251b01e2eab0aeeb7472badc5bb