[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fwupdate not building; efibootmgr 0.11.0 crashes with efivar 0.18

On Wed, May 20, 2015 at 09:59:45PM -0500, D. Jared Dominguez wrote:
> On Wed, May 20, 2015 at 08:42:15PM -0500, Dominguez, Jared wrote:
> >Hi Peter,
> >
> >I'm trying to build fwupdate. I know it's early, but I'd like to make it
> >testable on Debian. It's not buildable for me because it barfs on this:
> >make[3]: Entering directory '/«BUILDDIR»/fwupdate-0.2+git20150520/efi'
> >gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -ffreestanding -fno-stack-protector -fno-stack-check --std=c11 -DCONFIG_x86_64 -D__KERNEL__ -I/usr/include/efi/ -I/usr/include/efi/x86_64/ -iquote/«BUILDDIR»/fwupdate-0.2+git20150520/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include -c -o fakeesrt2.o fakeesrt2.c
> >fakeesrt2.c:1:17: fatal error: efi.h: No such file or directory
> >  #include <efi.h>
> >                  ^
> >compilation terminated.
> >make[3]: *** [fakeesrt2.o] Error 1
> >Makefile:53: recipe for target 'fakeesrt2.o' failed
> >make[3]: Leaving directory '/«BUILDDIR»/fwupdate-0.2+git20150520/efi'
> >
> >I'm actually not sure where efi.h is supposed to come from. I see a
> >fwup-efi.h in fwupdate's source and no efi.h in efivar's source. Am I
> >missing something?
> geofft pointed out to me that I probably want gnu-efi installed. It's
> missing from the build requirements in the spec file, so you probably want
> to add that. Once I build depend on that, I get further, but it looks like
> Debian's gnu-efi uses a different library path:
> gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -ffreestanding -fno-stack-protector -fno-stack-check --std=c11 -DCONFIG_x86_64 -D__KERNEL__ -I/usr/include/efi/ -I/usr/include/efi/x86_64/ -iquote/«BUILDDIR»/fwupdate-0.2+git20150520/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include -c -o fakeesrt2.o fakeesrt2.c
> ld -nostdlib --warn-common --no-undefined --fatal-warnings -shared -Bsymbolic -L/usr/lib64 -L/usr/lib64/gnuefi /usr/lib64/gnuefi/crt0-efi-x86_64.o -o fakeesrt2.so fakeesrt2.o -lefi -lgnuefi \
>         /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc.a \
>         -T /usr/lib64/gnuefi/elf_x86_64_efi.lds
> ld: cannot open linker script file /usr/lib64/gnuefi/elf_x86_64_efi.lds: No such file or directory
> make[3]: *** [fakeesrt2.so] Error 1
> Makefile:48: recipe for target 'fakeesrt2.so' failed
> I've got:
> $ dpkg -L gnu-efi | grep usr/lib
> /usr/lib32
> /usr/lib32/libefi.a
> /usr/lib32/crt0-efi-ia32.o
> /usr/lib32/elf_ia32_efi.lds
> /usr/lib32/libgnuefi.a
> /usr/lib
> /usr/lib/crt0-efi-x86_64.o
> /usr/lib/libefi.a
> /usr/lib/elf_x86_64_efi.lds
> /usr/lib/libgnuefi.a
> So that's fun... I'm not sure of the best way to handle this.

We should just make it do like we do in shim and use LIB_PATH , and make
that settable from the command line, so you can override it in
packaging, I suspect?


Reply to: