[yocto] Fail to build core-image-minimal when MACHINE=genericx86-64

Markus Svilans msvilans at aeonyx.ca
Thu Oct 31 15:48:38 PDT 2013


With the help of a friend, have confirmed that 'core-image-minimal' 
cannot be built with Ubuntu 13.10 64-bit when MACHINE=genericx86-64. 
Attempted the build on a different machine in a different city, same 
results (failure to build).

Confirmed that 'core-image-minimal' can be successfully built under an 
lxc and a chroot running Debian Wheezy, on Ubuntu 13.10 64-bit, with 
MACHINE=genericx86-64.

Filed bug 5440 on Yocto Bugzilla.
https://bugzilla.yoctoproject.org/show_bug.cgi?id=5440

Markus


On 10/29/2013 10:28 PM, Markus Svilans wrote:
> Thanks, Khem.
>
> Following your suggestion, I tried removing the com32/ subdirectory
> from the build, by modifying the do_configure() routine in
> syslinux_6.01.bb recipe. It did not work, there were errors related to
> missing .o files in a later step.
>
> Your response prompted me to look further.
>
> It appears that in the do_install() step, the syslinux recipe is using
> the host gcc and ld, and not the cross-compiler gcc and ld.
>
> For example, from the do_install log:
>> gcc -Wp,-MT,ctime.o,-MD,./.ctime.o.d -std=gnu99
>> -fno-stack-protector -fwrapv -freg-struct-return -Os -fPIC
>> -fno-exceptions -fno-asynchronous-unwind-tables -fno-strict-aliasing
>> -falign-functions=0 -falign-jumps=0 -falign-labels=0 -falign-loops=0
>> -mregparm=3 -DREGPARM=3 -W -Wall -Wstrict-prototypes
>> -fomit-frame-pointer -D__COM32__ -nostdinc -iwithprefix include
>> -I/home/markus/yocto/genericx86-64-dora-10.0.0/build/tmp/work/x86_64-linux/syslinux-native/6.01-r0/syslinux-6.01/com32/libutil/include
>> -I/home/markus/yocto/genericx86-64-dora-10.0.0/build/tmp/work/x86_64-linux/syslinux-native/6.01-r0/syslinux-6.01/com32/include
>> -I/home/markus/yocto/genericx86-64-dora-10.0.0/build/tmp/work/x86_64-linux/syslinux-native/6.01-r0/syslinux-6.01/com32/include/sys
>> -I/home/markus/yocto/genericx86-64-dora-10.0.0/build/tmp/work/x86_64-linux/syslinux-native/6.01-r0/syslinux-6.01/com32/gplinclude
>> -c -o ctime.o
>> /home/markus/yocto/genericx86-64-dora-10.0.0/build/tmp/work/x86_64-linux/syslinux-na
> tive/6.01-r0/syslinux-6.01/com32/libupload/ctime.c
>
> Additionally, according to the makefile fragment "com32.mk" (in the
> directory
> ~/yocto/genericx86-64-dora-10.0.0/build/tmp/work/x86_64-poky-linux/syslinux/6.02-r0/syslinux-6.02/mk/)
> there should be some architecture related parameters following
> "-std=gnu99".
> To see why not, I had a look in the file "syslinux.mk" (in the same
> directory). The architecture selection is done via the SUBARCH and
> ARCH variables. I tried various sed commands in the BB recipe
> do_configure() step to force ARCH to "x86_64", but nothing seemed to
> make it work.
>
> Next I tried the following change in the do_install() step in the BB
> recipe:
>
> Before:
>     oe_runmake install INSTALLROOT="${D}" firmware="bios"
>
> After:
>     oe_runmake install CC="${CC} ${CFLAGS}" LDFLAGS="${LDFLAGS} -A
> i386" INSTALLROOT="${D}" ${SYSLINUX_ARCH} firmware="bios"
>
> Now the cross-compiler was being invoked, but with conflicting flags:
>
>> x86_64-poky-linux-gcc  -m64
>> --sysroot=/home/markus/yocto/genericx86-64-dora-10.0.0/build/tmp/sysroots/genericx86-64
>> -O2 -pipe -g -feliminate-unused-debug-types
>> -Wp,-MT,ctime.o,-MD,./.ctime.o.d -std=gnu99 -m32 -march=i386
>> -mpreferred-stack-boundary=2  -fno-stack-protector -fwrapv
>> -freg-struct-return -Os -fPIC -fno-exceptions
>> -fno-asynchronous-unwind-tables -fno-strict-aliasing
>> -falign-functions=0 -falign-jumps=0 -falign-labels=0 -falign-loops=0
>> -mregparm=3 -DREGPARM=3 -W -Wall -Wstrict-prototypes
>> -fomit-frame-pointer -D__COM32__ -nostdinc -iwithprefix include
>> -I/home/markus/yocto/genericx86-64-dora-10.0.0/build/tmp/work/x86_64-poky-linux/syslinux/6.02-r0/syslinux-6.02/com32/libutil/include
>> -I/home/markus/yocto/genericx86-64-dora-10.0.0/build/tmp/work/x86_64-poky-linux/syslinux/6.02-r0/syslinux-6.02/com32/include
>> -I/home/markus/yocto/genericx86-64-dora-10.0.0/build/tmp/work/x86_64-poky-linux/syslinux/6.02-r0/syslinux-6.02/com32/include/sys
>> -I/home/markus/yocto/genericx86-64-dora-10.0.0/build/tmp/work/x86_64-poky-linux/syslinux/6.02-r0/syslinux-6.02/com32/gplinclude
>> -c -o ctime.o
>> /home/markus/yocto/genericx86-64-dora-10.0.0/build/tmp/work/x86_64-poky-linux/syslinux/6.02-r0/syslinux-6.02/com32/libupload/ctime.c
>
> The build didn't work, there were more errors during the link stage.
>
> Basically it looks like the syslinux recipe cannot handle
> cross-compilation to x86_64 at the moment. Making it work is a little
> bit outside my experience level. I feel like I am feeling around in
> the dark here. Maybe could someone else take a look at this?
>
> Thanks very much
> Markus
>
>
>
>
> On 10/29/2013 07:11 PM, Khem Raj wrote:
>> On Tue, Oct 29, 2013 at 3:55 PM, Markus Svilans <msvilans at aeonyx.ca>
>> wrote:
>>> Dear list,
>>>
>>> A quick update:
>>>
>>> - The same build failure occurred when I tried "bitbake
>>> core-image-minimal"
>>> using a fresh poky 1.5 downloaded from the Yocto web site, with
>>> MACHINE set
>>> to genericx86-64.
>>> - The same build failure occurred when I manually created a recipe for
>>> syslinux 6.02 and tried to build it directly "bitbake syslinux"
>>>
>>> Any assistance would be greatly appreciated.
>> its failing while building syslinux-native package and as it seems
>> from errors, its not building com32 bits by passing -m32
>> flags to compiler. Seems like you need to hack syslinux build and add
>> -m32 when building com32/ subdir or alternatively
>> remove it from build
>>
>> sed -e 's,com32/\S*,,g' -i Makefile
>>
>> but that may not be best thing to do.
>>
>>
>>> Thanks very much
>>> Markus
>>>
>>>
>>>
>>> On 10/29/2013 05:40 PM, Markus Svilans wrote:
>>>
>>> Dear list,
>>>
>>> I'm trying to build a core-image-minimal recipe using
>>> MACHINE=genericx86-64
>>> but it always fails at syslinux-native-6.01 recipe. I've tried
>>> deleting my
>>> tmp and build folders several times, but it will not build. I am
>>> using the
>>> genericx86-64 BSP package downloaded from the Yocto website, located
>>> at:
>>>
>>> https://www.yoctoproject.org/download/intel-x86-64-based-pcs-and-devices-genericx86-64
>>>
>>>
>>> File: genericx86-64-dora-10.0.0.tar.bz2
>>>
>>> I extracted it to:
>>> /home/markus/yocto/genericx86-64-dora-10.0.0
>>>
>>> Then ran the "oe-init-build-env" script and editted local.conf to
>>> enable
>>> parallel make, and changed MACHINE to genericx86-64. (I've attached
>>> a copy
>>> of my local.conf file.)
>>>
>>> After that, I ran the command "bitbake core-image-minimal" and sat
>>> back,
>>> waiting for it to build.
>>>
>>> The build always fails at syslinux-native.
>>>
>>> I tried several things:
>>> - deleted tmp directory, re-try build = failure
>>> - deleted build directory, re-try build = failure
>>> - deleted build directory, build only syslinux = failure
>>> - deleted build directory, build only syslinux-native = failure
>>>
>>> I think I may be doing something wrong, because about an hour of Google
>>> searching did not turn up anybody having a similar issue.
>>>
>>> I am running Kubuntu 13.10 64-bit.
>>>
>>> Can anyone please offer any advice, so that I can successfully build
>>> x86-64
>>> images?
>>>
>>> Thanks very much
>>> Markus
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> yocto mailing list
>>> yocto at yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>>>
>>>
>>>
>>> _______________________________________________
>>> yocto mailing list
>>> yocto at yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>>>
>
>
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto




More information about the yocto mailing list