Building GRUB fails with `In function `do_setkey' undefined reference to `fips_mode'`
Dear GRUB folks,
with latest master
$ git describe
grub-2.02-beta2-137-gbac5d1abuilding GRUB as a coreboot payload fails on Debian Sid/unstable.
$ make clean
$ ./configure --with-platform=coreboot
$ make
[…]
mv -f .deps-util/grub_fstest-grub_fstest_init.Tpo .deps-util/grub_fstest-grub_fstest_init.Po
gcc -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -W
float-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-br
aces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunkn
own-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs
-Wstrict-prototypes -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initia
lizers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing
-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -Werror -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter
-Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -o grub-fstest util/grub_fstest-grub-fstest.o grub-core/kern/emu/grub_fstes
t-hostfs.o grub-core/disk/grub_fstest-host.o grub-core/osdep/grub_fstest-init.o grub_fstest-grub_fstest_init.o libgrubmods.a libgrubgcry.a l
ibgrubkern.a grub-core/gnulib/libgnu.a
libgrubgcry.a(libgrubgcry_a-rijndael.o): In function `do_setkey':
rijndael.c:(.text+0x51): undefined reference to `fips_mode'
libgrubgcry.a(libgrubgcry_a-des.o): In function `des_setkey':
des.c:(.text+0x542): undefined reference to `fips_mode'
libgrubgcry.a(libgrubgcry_a-des.o): In function `tripledes_set3keys':
des.c:(.text+0x1410): undefined reference to `fips_mode'
collect2: error: ld returned 1 exit status
Makefile:4962: recipe for target 'grub-fstest' failed
make[2]: *** [grub-fstest] Error 1
make[2]: Leaving directory '/home/paul/src/grub'
Makefile:11522: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/paul/src/grub'
Makefile:3936: recipe for target 'all' failed
make: *** [all] Error 2Thanks,
Paul
В Fri, 26 Dec 2014 11:23:24 +0100
Paul Menzel <[email protected]> пишет:
Quoted 19 lines
Dear GRUB folks,
with latest master
$ git describe grub-2.02-beta2-137-gbac5d1abuilding GRUB as a coreboot payload fails on Debian Sid/unstable.
$ make clean $ ./configure --with-platform=coreboot $ make […] mv -f .deps-util/grub_fstest-grub_fstest_init.Tpo .deps-util/grub_fstest-grub_fstest_init.Po gcc -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -W float-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-br aces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunkn own-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs
Quoted 8 lines
-Wstrict-prototypes -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initia
lizers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing
-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -Werror -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter
-Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -o grub-fstest util/grub_fstest-grub-fstest.o grub-core/kern/emu/grub_fstes
t-hostfs.o grub-core/disk/grub_fstest-host.o grub-core/osdep/grub_fstest-init.o grub_fstest-grub_fstest_init.o libgrubmods.a libgrubgcry.a l
ibgrubkern.a grub-core/gnulib/libgnu.a
libgrubgcry.a(libgrubgcry_a-rijndael.o): In function `do_setkey':
rijndael.c:(.text+0x51): undefined reference to `fips_mode'Works here. Looks like fips_mode is (re-)defined in some header on your system. Could you find out where?
Quoted 20 lines
libgrubgcry.a(libgrubgcry_a-des.o): In function `des_setkey':
des.c:(.text+0x542): undefined reference tofips_mode' libgrubgcry.a(libgrubgcry_a-des.o): In functiontripledes_set3keys':
des.c:(.text+0x1410): undefined reference to `fips_mode'
collect2: error: ld returned 1 exit status
Makefile:4962: recipe for target 'grub-fstest' failed make[2]: *** [grub-fstest] Error 1
make[2]: Leaving directory '/home/paul/src/grub' Makefile:11522: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/paul/src/grub' Makefile:3936: recipe for target 'all' failed
make: *** [all] Error 2Thanks,
Paul
Am Freitag, den 26.12.2014, 20:59 +0300 schrieb Andrei Borzenkov:
Quoted 27 lines
В Fri, 26 Dec 2014 11:23:24 +0100 Paul Menzel пишет:
Quoted 16 lines
with latest master
$ git describe grub-2.02-beta2-137-gbac5d1abuilding GRUB as a coreboot payload fails on Debian Sid/unstable.
$ make clean $ ./configure --with-platform=coreboot $ make […] mv -f .deps-util/grub_fstest-grub_fstest_init.Tpo .deps-util/grub_fstest-grub_fstest_init.Po gcc -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -W float-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-br aces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunkn own-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externsQuoted 8 lines
-Wstrict-prototypes -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initia lizers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing -include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -Werror -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -o grub-fstest util/grub_fstest-grub-fstest.o grub-core/kern/emu/grub_fstes t-hostfs.o grub-core/disk/grub_fstest-host.o grub-core/osdep/grub_fstest-init.o grub_fstest-grub_fstest_init.o libgrubmods.a libgrubgcry.a l ibgrubkern.a grub-core/gnulib/libgnu.a libgrubgcry.a(libgrubgcry_a-rijndael.o): In function `do_setkey': rijndael.c:(.text+0x51): undefined reference to `fips_mode'
Quoted 2 lines
Works here. Looks like
fips_modeis (re-)defined in some header on your system. Could you find out where?
Sorry, I was not able to find that out. Cloning the repository on the same system again and running
$ ./autogen.sh
$ ./configure --with-platform=coreboot
$ makeit worked fine too. So, maybe I’m missing when I need to run ./autogen.sh and not only make clean. Are there some guidelines?
Quoted 5 lines
Quoted 5 lines
libgrubgcry.a(libgrubgcry_a-des.o): In function `des_setkey':
des.c:(.text+0x542): undefined reference tofips_mode' libgrubgcry.a(libgrubgcry_a-des.o): In functiontripledes_set3keys':
des.c:(.text+0x1410): undefined reference to `fips_mode'
collect2: error: ld returned 1 exit status
Quoted 8 lines
Quoted 8 lines
Makefile:4962: recipe for target 'grub-fstest' failed make[2]: *** [grub-fstest] Error 1
make[2]: Leaving directory '/home/paul/src/grub' Makefile:11522: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/paul/src/grub' Makefile:3936: recipe for target 'all' failed
make: *** [all] Error 2
Thanks,
Paul
Quoted 34 lines · Paul Menzel
Am Freitag, den 26.12.2014, 20:59 +0300 schrieb Andrei Borzenkov:
Quoted 27 lines
В Fri, 26 Dec 2014 11:23:24 +0100 Paul Menzel пишет:
Quoted 16 lines
with latest master
$ git describe grub-2.02-beta2-137-gbac5d1abuilding GRUB as a coreboot payload fails on Debian Sid/unstable.
$ make clean $ ./configure --with-platform=coreboot $ make […] mv -f .deps-util/grub_fstest-grub_fstest_init.Tpo .deps-util/grub_fstest-grub_fstest_init.Po gcc -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -W float-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-br aces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunkn own-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externsQuoted 8 lines
-Wstrict-prototypes -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initia lizers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing -include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -Werror -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -o grub-fstest util/grub_fstest-grub-fstest.o grub-core/kern/emu/grub_fstes t-hostfs.o grub-core/disk/grub_fstest-host.o grub-core/osdep/grub_fstest-init.o grub_fstest-grub_fstest_init.o libgrubmods.a libgrubgcry.a l ibgrubkern.a grub-core/gnulib/libgnu.a libgrubgcry.a(libgrubgcry_a-rijndael.o): In function `do_setkey': rijndael.c:(.text+0x51): undefined reference to `fips_mode'Quoted 2 lines
Works here. Looks like
fips_modeis (re-)defined in some header on your system. Could you find out where?Sorry, I was not able to find that out. Cloning the repository on the same system again and running
Quoted 7 lines
$ ./autogen.sh $ ./configure --with-platform=coreboot $ makeit worked fine too. So, maybe I’m missing when I need to run
./autogen.shand not onlymake clean. Are there some guidelines?
Normally autogen.sh is needed just once after git checkout (or I think to rebuild message catalogs if you add some). All other times I just use "make distclean" which worked so far.