Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile shim: efi.h not found #127

Closed
Sporesirius opened this issue Apr 27, 2018 · 5 comments
Closed

compile shim: efi.h not found #127

Sporesirius opened this issue Apr 27, 2018 · 5 comments

Comments

@Sporesirius
Copy link

Hello,
when I try to compile with "make EFIDIR = (path) install" shim get this error:
shim.h: 27: 17: fatal error: efi.h: No such file or directory

@gzer0-0ne
Copy link

@Sporesirius How did you resolve this issue?

@Rtoax
Copy link

Rtoax commented Sep 21, 2022

I got the same issue, efi.h in /usr/include/efi/efi.h:

[rongtao@68-VM-Alma9 shim]$ make EFIDIR=/usr/include/efi install
gcc -std=gnu11 -ggdb -ffreestanding -fmacro-prefix-map=/home/rongtao/Git/shim/= -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar -Os -Wall -Wextra -Wno-missing-field-initializers  -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args  -m64 -DMDE_CPU_X64 -DPAGE_SIZE=4096 -Werror -nostdinc -I/home/rongtao/Git/shim/Cryptlib -I/home/rongtao/Git/shim/Cryptlib/Include -I/home/rongtao/Git/shim/gnu-efi/inc -I/home/rongtao/Git/shim/gnu-efi/inc/x86_64 -I/home/rongtao/Git/shim/gnu-efi/inc/protocol -I/home/rongtao/Git/shim/include -iquote /home/rongtao/Git/shim -iquote /home/rongtao/Git/shim -isystem /home/rongtao/Git/shim/include/system -isystem /usr/lib/gcc/x86_64-redhat-linux/11/include -DDEFAULT_LOADER='L"\\\\grubx64.efi"' -DDEFAULT_LOADER_CHAR='"\\\\grubx64.efi"' -DEFI_ARCH='L"x64"' -DDEBUGDIR='L"/usr/lib/debug/usr/share/shim/x64-15.6/"'   -c -o shim.o shim.c
In file included from shim.c:14:
shim.h:56:10: fatal error: efi.h: No such file or directory
   56 | #include <efi.h>
      |          ^~~~~~~
compilation terminated.
make: *** [<builtin>: shim.o] Error 1

@Rtoax
Copy link

Rtoax commented Sep 21, 2022

This helpful #451

@dennis-tseng99
Copy link
Contributor

Because shim project depends on gnu-efi projec, please use the following command to clone gnu-efi : git submodule update --init --recursive

@Rtoax
Copy link

Rtoax commented Sep 21, 2022

Thank you for your reply, git submodule update --init --recursive is very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants