efitools
efitools copied to clipboard
Cannot compile sources anymore
Compiling the sources ends with
make -C lib lib-efi.a
make[1]: Entering directory '/usr/local/src/efitools/lib'
make[1]: 'lib-efi.a' is up to date.
make[1]: Leaving directory '/usr/local/src/efitools/lib'
make -C lib lib.a
make[1]: Entering directory '/usr/local/src/efitools/lib'
make[1]: 'lib.a' is up to date.
make[1]: Leaving directory '/usr/local/src/efitools/lib'
make -C lib/asn1 libasn1-efi.a
make[1]: Entering directory '/usr/local/src/efitools/lib/asn1'
make[1]: 'libasn1-efi.a' is up to date.
make[1]: Leaving directory '/usr/local/src/efitools/lib/asn1'
cc -I/usr/local/src/efitools/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -mno-red-zone -fno-stack-protector -g -DEFI_FUNCTION_WRAPPER -DCONFIG_x86_64 -c cert-to-efi-hash-list.c -o cert-to-efi-hash-list.o
cert-to-efi-hash-list.c:9: warning: "__STDC_VERSION__" redefined
#define __STDC_VERSION__ 199901L
<built-in>: note: this is the location of the previous definition
cert-to-efi-hash-list.c: In function ‘main’:
cert-to-efi-hash-list.c:102:3: warning: implicit declaration of function ‘strptime’; did you mean ‘strftime’? [-Wimplicit-function-declaration]
strptime(timestampstr, "%Y-%m-%d %H:%M:%S", &tms);
^~~~~~~~
strftime
cert-to-efi-hash-list.c:132:35: error: dereferencing pointer to incomplete type ‘X509’ {aka ‘struct x509_st’}
int cert_len = i2d_X509_CINF(cert->cert_info, &cert_buf);
^~
make: *** [Make.rules:79: cert-to-efi-hash-list.o] Error 1
Tested on Fedora 28. I had to change Make.rules in order to get until this point.
--- Make.rules.org 2018-07-02 18:36:49.594249924 +0200
+++ Make.rules 2018-07-02 18:41:13.632769566 +0200
@@ -12,13 +12,13 @@
CFLAGS = -O2 $(ARCH3264) -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -mno-red-zone -fno-stack-protector -g
LDFLAGS = -nostdlib
CRTOBJ = crt0-efi-$(ARCH).o
-CRTPATHS = /lib /lib64 /lib/efi /lib64/efi /usr/lib /usr/lib64 /usr/lib/efi /usr/lib64/efi
+CRTPATHS = /lib /lib64 /lib/efi /lib64/efi /usr/lib /usr/lib64 /usr/lib/efi /usr/lib64/efi /usr/lib64/gnuefi /usr/lib/gnuefi
CRTPATH = $(shell for f in $(CRTPATHS); do if [ -e $$f/$(CRTOBJ) ]; then echo $$f; break; fi; done)
CRTOBJS = $(CRTPATH)/$(CRTOBJ)
# there's a bug in the gnu tools ... the .reloc section has to be
# aligned otherwise the file alignment gets screwed up
LDSCRIPT = $(TOPDIR)/elf_$(ARCH)_efi.lds
-LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic $(CRTOBJS) -L $(CRTPATH)
+LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic $(CRTOBJS) -L $(CRTPATH) -L /usr/lib64
LOADLIBES = -lefi -lgnuefi $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
FORMAT = efi-app-$(ARCH)
OBJCOPY = objcopy