Bug 1417 - x32: libaio building fails
Summary: x32: libaio building fails
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 x86_64
: Medium normal
Target Milestone: 1.2
Assignee: Nitin Kamble
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks: 1579
  Show dependency tree
 
Reported: 2011-08-25 14:44 UTC by Nitin Kamble
Modified: 2011-12-15 09:15 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nitin Kamble 2011-08-25 14:44:13 UTC
ERROR: Function 'do_compile' failed (see /disk0/pokybuild/build-multilib-x32-qemu/tmp/work/x86_64-x32-poky-linux-gnux32/libaio-0.3.107-r0/temp/log.do_compile.6957 for further information)
ERROR: Logfile of failure stored in: /disk0/pokybuild/build-multilib-x32-qemu/tmp/work/x86_64-x32-poky-linux-gnux32/libaio-0.3.107-r0/temp/log.do_compile.6957
Log data follows:
| NOTE: make -j 16 prefix=/usr includedir=/usr/include libdir=/usr/lib -e MAKEFLAGS=
| make[1]: Entering directory `/disk0/pokybuild/build-multilib-x32-qemu/tmp/work/x86_64-x32-poky-linux-gnux32/libaio-0.3.107-r0/libaio-0.3.107/src'
| ccache x86_64-poky-linux-gnux32-gcc   -mx32  --sysroot=/disk0/pokybuild/build-multilib-x32-qemu/tmp/sysroots/qemux86-64 -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC -c -o io_getevents.ol io_getevents.c
| In file included from syscall.h:16:0,
|                  from io_getevents.c:23:
| syscall-x86_64.h:1:0: warning: "__NR_io_setup" redefined [enabled by default]
| /disk0/pokybuild/build-multilib-x32-qemu/tmp/sysroots/qemux86-64/usr/include/asm/unistd_x32.h:477:0: note: this is the location of the previous definition
| syscall-x86_64.h:2:0: warning: "__NR_io_destroy" redefined [enabled by default]
| /disk0/pokybuild/build-multilib-x32-qemu/tmp/sysroots/qemux86-64/usr/include/asm/unistd_x32.h:479:0: note: this is the location of the previous definition
| syscall-x86_64.h:3:0: warning: "__NR_io_getevents" redefined [enabled by default]
| /disk0/pokybuild/build-multilib-x32-qemu/tmp/sysroots/qemux86-64/usr/include/asm/unistd_x32.h:481:0: note: this is the location of the previous definition
| syscall-x86_64.h:4:0: warning: "__NR_io_submit" redefined [enabled by default]
| /disk0/pokybuild/build-multilib-x32-qemu/tmp/sysroots/qemux86-64/usr/include/asm/unistd_x32.h:483:0: note: this is the location of the previous definition
| syscall-x86_64.h:5:0: warning: "__NR_io_cancel" redefined [enabled by default]
| /disk0/pokybuild/build-multilib-x32-qemu/tmp/sysroots/qemux86-64/usr/include/asm/unistd_x32.h:485:0: note: this is the location of the previous definition
| io_getevents.c: Assembler messages:
| io_getevents.c:25: Error: operand type mismatch for `movq'
| io_getevents.c:25: Error: operand type mismatch for `movq'
| make[1]: *** [io_getevents.ol] Error 1
| make[1]: Leaving directory `/disk0/pokybuild/build-multilib-x32-qemu/tmp/work/x86_64-x32-poky-linux-gnux32/libaio-0.3.107-r0/libaio-0.3.107/src'
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| ERROR: Function 'do_compile' failed (see /disk0/pokybuild/build-multilib-x32-qemu/tmp/work/x86_64-x32-poky-linux-gnux32/libaio-0.3.107-r0/temp/log.do_compile.6957 for further information)
NOTE: package libaio-0.3.107-r0: task do_compile: Failed
Comment 1 Nitin Kamble 2011-12-01 15:19:20 UTC
I have a fix for this in my local branch, will push it soon,
Nitin
Comment 2 Nitin Kamble 2011-12-15 09:15:23 UTC
This commit on the master fixes the issue:

commit f5c071d93c9e6f57930bce56b1e4f009c160a826
Author: Nitin A Kamble <nitin.a.kamble@intel.com>
Date:   Fri Dec 2 12:20:08 2011 -0800

    libaio: patch source code for x32
    
    This Fixes bug: [YOCTO #1417]
    
    Properly load arguments 5 an 6 for x86-64 syscall
    Use asm ("r10") and asm ("r8") to load arguments 5 an 6 for x86-64
    syscall so that it works with both x32 and x86-64.
    
    (From OE-Core rev: 207e86ba12c15937845ace66206566cd11dac994)
    
    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
    Signed-Off-By: H.J. Lu <hjl.tools@gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>