Bug 7421

Summary: gummiboot fails to compile with x32 ABI
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Mariano Lopez <mariano.lopez>
Component: coreAssignee: Unassigned <unassigned>
Status: RESOLVED OBSOLETE QA Contact:
Severity: minor    
Priority: Medium CC: anibal.limon, maxin.john, meta.mr.watcher, meta.watcher, sgw
Version: 1.8   
Target Milestone: Future   
Hardware: x86   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on: 10332    
Bug Blocks: 3437    

Description Mariano Lopez 2015-03-06 22:09:03 UTC
Trying to compile gummiboot fails using x32.

| make --no-print-directory all-am
| x86_64-poky-linux-gnux32-gcc  -mx32 --sysroot=/home/mlopezva/poky/build/tmp/sysroots/qemux86-64 -std=gnu99 -D_GNU_SOURCE -Wall -Wextra -Wmissing-prototypes -Wno-unused-parameter -I/home/mlopezva/poky/build/tmp/sysroots/qemux86-64/usr/include/blkid -I/home/mlopezva/poky/build/tmp/sysroots/qemux86-64/usr/include/uuid  -O2 -pipe -g -feliminate-unused-debug-types  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o gummiboot src/setup/gummiboot-setup.o src/setup/gummiboot-efivars.o -L/home/mlopezva/poky/build/tmp/sysroots/qemux86-64/usr/libx32 -lblkid
| x86_64-poky-linux-gnux32-ld --sysroot=/home/mlopezva/poky/build/tmp/sysroots/qemux86-64  -m elf32_x86_64  -T /home/mlopezva/poky/build/tmp/sysroots/qemux86-64/usr/libx32/elf_x86_64_efi.lds -shared -Bsymbolic -nostdlib -znocombreloc -L /home/mlopezva/poky/build/tmp/sysroots/qemux86-64/usr/libx32 /home/mlopezva/poky/build/tmp/sysroots/qemux86-64/usr/libx32/crt0-efi-x86_64.o ./src/efi/util.o ./src/efi/console.o ./src/efi/graphics.o ./src/efi/gummiboot.o \
| 	-o src/efi/gummiboot.so -lefi -lgnuefi /home/mlopezva/poky/build/tmp/sysroots/qemux86-64/usr/libx32/x86_64-poky-linux-gnux32/4.9.2/libgcc.a; \
| nm -D -u src/efi/gummiboot.so | grep ' U ' && exit 1 || :
| x86_64-poky-linux-gnux32-ld: skipping incompatible /home/mlopezva/poky/build/tmp/sysroots/qemux86-64/usr/libx32/libefi.a when searching for -lefi
| x86_64-poky-linux-gnux32-ld: cannot find -lefi
| x86_64-poky-linux-gnux32-ld: skipping incompatible /home/mlopezva/poky/build/tmp/sysroots/qemux86-64/usr/libx32/libgnuefi.a when searching for -lgnuefi
| x86_64-poky-linux-gnux32-ld: cannot find -lgnuefi
| nm: 'src/efi/gummiboot.so': No such file
| x86_64-poky-linux-gnux32-objcopy -j .text -j .sdata -j .data -j .dynamic \
|   -j .dynsym -j .rel -j .rela -j .reloc -j .eh_frame \
|   --target=efi-app-x86_64 src/efi/gummiboot.so gummibootx64.efi
| x86_64-poky-linux-gnux32-objcopy: 'src/efi/gummiboot.so': No such file
| make[1]: *** [gummibootx64.efi] Error 1
| make[1]: *** Waiting for unfinished jobs....
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| WARNING: /home/mlopezva/poky/build/tmp/work/x86_64_x32-poky-linux-gnux32/gummiboot/43+gitAUTOINC+4062c51075-r0/temp/run.do_compile.14905:1 exit 1 from
|   exit 1
| ERROR: Function failed: do_compile (log file is located at /home/mlopezva/poky/build/tmp/work/x86_64_x32-poky-linux-gnux32/gummiboot/43+gitAUTOINC+4062c51075-r0/temp/log.do_compile.14905)
Comment 1 Aníbal Limón 2015-03-31 17:42:20 UTC
I did a initial debug and the problem is related that gnu-efi don't have support for x32 ABI this cause the failure when try to link to static libraries provided by gnu-efi.

/usr/libx32/libefi.a
/usr/libx32/libgnuefi.a
Comment 2 Maxin B. John 2017-01-12 13:16:48 UTC
gummiboot will be removed from OE in near future:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=10332
Comment 3 Aníbal Limón 2017-01-12 15:21:03 UTC
(In reply to comment #2)
> gummiboot will be removed from OE in near future:
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=10332

Mariano please close this bug when #10332 is fixed. I added the bug number as dependency.
Comment 4 Aníbal Limón 2017-04-19 15:24:01 UTC
Gummibot was removed on oe-core,

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