iPXE discussion forum

Full Version: iPXE EFI build fails with elf2efi64 failed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When I try to build the ipxe.efi with latest version of ipxe

The command I am using is-----
Code:
make bin-x86_64-efi/ipxe.efi

it comes with an error-----
Code:
[HOSTCC] util/elf2efi64
/tmp/cc5uKw9w.o: In function `elf2pe':
/home/user/Desktop/ipxe/src/util/elf2efi.c:933: undefined reference to `__xpg_basename'
/usr/bin/ld: util/elf2efi64: hidden symbol `__xpg_basename' isn't defined
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile.housekeeping:1375: recipe for target 'util/elf2efi64' failed
make: *** [util/elf2efi64] Error 1
What configuration changes have you made, and have you tried to compile with a clean checkout?

> undefined reference to `__xpg_basename'
Google tells me it is a libc refererence issue, which libc is used on this system?
(2017-01-06 09:55)NiKiZe Wrote: [ -> ]What configuration changes have you made, and have you tried to compile with a clean checkout?

> undefined reference to `__xpg_basename'
Google tells me it is a libc refererence issue, which libc is used on this system?

my OS is ubuntu 16.10 x64
ldd --version
Code:
ldd (Ubuntu GLIBC 2.24-3ubuntu2) 2.24
(2017-01-06 10:55)zerojay100 Wrote: [ -> ]my OS is ubuntu 16.10 x64
ldd --version
Code:
ldd (Ubuntu GLIBC 2.24-3ubuntu2) 2.24

I had this same issue in the past with ubuntu. Since then I only use fedora (24 currently) which compiles fine
Proposed fix for this is included in a Pull Request on Github, mail sent for this at: http://lists.ipxe.org/pipermail/ipxe-dev...05402.html
(2017-01-07 11:39)ndog Wrote: [ -> ]
(2017-01-06 10:55)zerojay100 Wrote: [ -> ]my OS is ubuntu 16.10 x64
ldd --version
Code:
ldd (Ubuntu GLIBC 2.24-3ubuntu2) 2.24

I had this same issue in the past with ubuntu. Since then I only use fedora (24 currently) which compiles fine

It is also compiles fine on fedora 25, thanks.
(2017-01-06 09:06)zerojay100 Wrote: [ -> ]
Code:
[HOSTCC] util/elf2efi64
/tmp/cc5uKw9w.o: In function `elf2pe':
/home/user/Desktop/ipxe/src/util/elf2efi.c:933: undefined reference to `__xpg_basename'

Now fixed: http://git.ipxe.org/ipxe.git/commitdiff/941c53a.

Thanks!

Michael
Reference URL's