iPXE Binary Compile Error
-
Hi,
I’m trying to compile the latest iPXE binaries using the buildipxe.sh script but I am getting an error when it tries to build bin/aes.o:
[BUILD] bin/aes.o
In file included from <command-line>:
crypto/aes.c: In function ‘aes_gcm_setkey’:
include/assert.h:82:10: error: call to ‘build_assert_805’ declared with attribute error: build_assert(( ( void * ) &context->raw ) == ( ( void * ) context->gcm.raw_ctx )) failed
82 | C2 ( build_assert, LINE ) ();
| ^
./include/compiler.h:46:21: note: in definition of macro ‘_C1’
46 | #define _C1( x, y ) x ## y
| ^
include/assert.h:82:4: note: in expansion of macro ‘_C2’
82 | C2 ( build_assert, LINE ) ();
| ^~~
include/ipxe/gcm.h:92:2: note: in expansion of macro ‘build_assert’
92 | build_assert ( ( ( void * ) &context->gcm ) == ctx );
| ^~~~~~~~~~~~
crypto/aes.c:805:1: note: in expansion of macro ‘GCM_CIPHER’
805 | GCM_CIPHER ( aes_gcm, aes_gcm_algorithm,
| ^~~~~~~~~~
crypto/aes.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-dangling-pointer’ [-Werror]
cc1: all warnings being treated as errors
make: *** [Makefile.housekeeping:964: bin/aes.o] Error 1I’m on Ubuntu 20.04, I did apt update and apt upgrade, and FOG is 1.5.10. I’ve tried downloading the script again, downloading the fogproject package again, and cloning the iPXE package and trying to manually do it, but it always gives this error.
I’m not really sure what the error means or what I need to do for this to work. I have other FOG servers on Ubuntu 20.04 and same make package version that have latest Ubuntu updates and they can compile using the buildipxe.sh script no problem.
Any insight would be much appreciated.
Thank you! -
Here’s a screenshot of the error if that’s easier to read:
-
This appears to be caused by a recent update to the iPXE repo on Github. Here is a link to someone else encountering the same error:
https://github.com/ipxe/ipxe/discussions/1126
According to the thread above, build 6ca597e will not cause this error, which is the build before the one that gives this error. Therefore I added the line “git checkout 6ca597e” in the buildipxe.sh script after the git pull lines for the iPXE and iPXE-efi repositories. This allowed me to compile the binaries via the script without errors. I hope this helps if you come across this error!
-
@rtarr I had to renew my cert. Recompiled iPXE binary with error and chainload failed during PXE boot. Adding that line and recompiling worked without error. Thank you!
-
@TaTa Glad that worked for you! There hasn’t been any update to the github thread since 1/31, but I was able to compile binaries today using the original buildipxe.sh script without the additional line without error.