lcp / mokutil

The utility to manipulate machine owner keys
GNU General Public License v3.0
67 stars 37 forks source link

Build fails on 32-bit architecture #4

Closed CaptainFlint closed 9 years ago

CaptainFlint commented 9 years ago

When I try to build mokutil-0.3.0 on i586 with gcc 4.9.2 I get the following errors:

make  all-recursive
make[1]: Entering directory '/home/live/mokutil/mokutil-0.3.0'
Making all in src
make[2]: Entering directory '/home/live/mokutil/mokutil-0.3.0/src'
gcc -DHAVE_CONFIG_H -I. -I..      -std=gnu11 -Wall -Wextra -Wcast-align -Wno-uninitialized -Wmissing-declarations -Wcast-align -Wwrite-strings -Winit-self -Wreturn-type -Werror=format-nonliteral -Werror=format-security -Wmissing-format-attribute -Werror=sign-compare -Wuninitialized -Wunused -Waggregate-return -Werror=strict-aliasing -g -O2 -MT mokutil-password-crypt.o -MD -MP -MF .deps/mokutil-password-crypt.Tpo -c -o mokutil-password-crypt.o `test -f 'password-crypt.c' || echo './'`password-crypt.c
mv -f .deps/mokutil-password-crypt.Tpo .deps/mokutil-password-crypt.Po
gcc -DHAVE_CONFIG_H -I. -I..      -std=gnu11 -Wall -Wextra -Wcast-align -Wno-uninitialized -Wmissing-declarations -Wcast-align -Wwrite-strings -Winit-self -Wreturn-type -Werror=format-nonliteral -Werror=format-security -Wmissing-format-attribute -Werror=sign-compare -Wuninitialized -Wunused -Waggregate-return -Werror=strict-aliasing -g -O2 -MT mokutil-mokutil.o -MD -MP -MF .deps/mokutil-mokutil.Tpo -c -o mokutil-mokutil.o `test -f 'mokutil.c' || echo './'`mokutil.c
mokutil.c: In function ‘issue_mok_request’:
mokutil.c:1287:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   if (read_size < 0 || read_size != sizes[i]) {
                                  ^
mokutil.c: In function ‘export_moks’:
mokutil.c:1648:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   while (offset < list[i].mok_size) {
                 ^
cc1: some warnings being treated as errors
Makefile:386: recipe for target 'mokutil-mokutil.o' failed
make[2]: *** [mokutil-mokutil.o] Error 1
make[2]: Leaving directory '/home/live/mokutil/mokutil-0.3.0/src'
Makefile:349: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/live/mokutil/mokutil-0.3.0'
Makefile:289: recipe for target 'all' failed
make: *** [all] Error 2
lcp commented 9 years ago

Could you try the latest master? I just pushed a patch and it should fix your problem.

CaptainFlint commented 9 years ago

Thanks, it does build successfully. (Unfortunately, I cannot test how it works - I don't have a machine with 32-bit UEFI…)

lcp commented 9 years ago

Thanks for the confirmation. In fact, you can test the 32bit UEFI with OVMF+QEMU, but I don't know if there is any linux distro supporting Secure Boot on a 32bit machine.