luauefiedk2

Failing to build Lua for EFI environment (EDK2)


I am trying to build Lua for EDK2 but it fails with the following error.

/home/dave/dev/edk2libc/edk2-libc/AppPkg/Applications/Lua/src/ldo.c: In function ‘luaD_throw’:
/home/dave/dev/edk2libc/edk2-libc/AppPkg/Applications/Lua/src/ldo.c:122:1: error: ‘noreturn’ function does return [-Werror]
  122 | }
      | ^

In the answers to the following post Lua.efi package for running lua in EFI environment; 'unixsmurf' mentions a patch to avoid build errors but the link is broken, so perhaps I need that patch, anyone know where it may be?

I am able to build the 'Hello' sample application without issue so my build environment seems ok.


Solution

  • I assume he meant this patch.

    You need to add the NORETURN attribute to

    In addition to the changes in the patch, you also need to add it to: