iPXE discussion forum

Full Version: [Solved] error creating .efirom
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.
When I try to make a i386 or x86_64 efirom I get this error:
Code:
make bin-i386-efi/11ab436a.efirom
  [HOSTCC] util/elf2efi32
util/elf2efi.c:29:17: fatal error: bfd.h: No such file or directory
compilation terminated.
make: *** [util/elf2efi32] Error 1


make bin-x86_64-efi/11ab436a.efirom
  [HOSTCC] util/elf2efi64
util/elf2efi.c:29:17: fatal error: bfd.h: No such file or directory
compilation terminated.
make: *** [util/elf2efi64] Error 1

I'm using late git code

Thanks.
(2012-04-10 18:25)kralizeck Wrote: [ -> ]When I try to make a i386 or x86_64 efirom I get this error:
Code:
make bin-i386-efi/11ab436a.efirom
  [HOSTCC] util/elf2efi32
util/elf2efi.c:29:17: fatal error: bfd.h: No such file or directory
compilation terminated.
make: *** [util/elf2efi32] Error 1

make bin-x86_64-efi/11ab436a.efirom
  [HOSTCC] util/elf2efi64
util/elf2efi.c:29:17: fatal error: bfd.h: No such file or directory
compilation terminated.
make: *** [util/elf2efi64] Error 1

You need to install the libbfd headers, which are probably in a package called "bfd-devel", "libbfd-devel", or similar.

Michael
(2012-04-10 18:37)mcb30 Wrote: [ -> ]You need to install the libbfd headers, which are probably in a package called "bfd-devel", "libbfd-devel", or similar.

Thanks.
I install binutils-dev ("apt-cache search libbfd" gave me that result), but i get a new error:

Code:
make bin-i386-efi/11ab436a.efirom
  [HOSTCC] util/elf2efi32
util/elf2efi.c: In function ‘write_pe_file’:
util/elf2efi.c:640:4: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘UINT32’ [-Wformat]
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [util/elf2efi32] Error 1

Thanks again.
(2012-04-10 18:49)kralizeck Wrote: [ -> ]Thanks.
I install binutils-dev ("apt-cache search libbfd" gave me that result), but i get a new error:

Code:
make bin-i386-efi/11ab436a.efirom
  [HOSTCC] util/elf2efi32
util/elf2efi.c: In function ‘write_pe_file’:
util/elf2efi.c:640:4: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘UINT32’ [-Wformat]
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [util/elf2efi32] Error 1

It looks as though you also need zlib-dev (or libz-dev, or similar).

Michael

Michael
Most likely you haven't installed build-essential, which gives you a complete C toolchain. Please also see the main ipxe.org website for the specific build requirements.
Finally I used ubuntu 10.04 (using latest desktop version I've all those problems) server on a virtual machine and, installing what you suggested me, it's all ok.

Thanks.
Reference URL's