Solved Cannot compile gptboot

Hello,

I'm trying to compile gptboot from /usr/src/stand/i386/gptboot/.

I typed make and got this errror:
make: don't know how to make /usr/obj/usr/src/amd64.amd64/stand/i386/btx/lib/crt0.o. Stop

Then, I went to /usr/src/stand/i386/btx/lib/ and did make. This created crt0.o in /usr/obj/usr/src/amd64.amd64/stand/i386/btx/lib/ and apparently make doesn't complain anymore about that.

But when I try to compile gptboot now, I get:
/usr/src/stand/i386/gptboot/gptboot.c:29:10: fatal error: 'stdarg.h' file not
found
#include <stdarg.h>
^~~~~~~~~~
1 error generated.

I tried to add the directory where lies this file to CFLAGS in Makefile but anothers errors appear. So it's not the solution.

Any clue?

PS: it's a 12.0-RELEASE.
 
Building gptboot (or any of the other boot binaries) standalone is not supported, as far as I know. You can however, build everything from /usr/src/stand.
 
Thank you very much.

It actually works from /usr/src/stand. I'd tried from /usr/src/stand/i386 but it make the same error.

And it's not so cumbersome as it may appear (I think about debbuging a modified code). Because once you compiled everything from /usr/src/stand, you can enter in /usr/src/stand/i386/gptboot and doing changes in source code. This time make works.
 
Back
Top