On Fri, Aug 01, 2025 at 10:36:15AM +0200, Waldemar Brodkorb wrote:
> Hi Gary,
Hi Waldemar,

> Gary Lin via Grub-devel wrote,
> 
> > This patch series imports the Argon2 code and tests from libgcrypt and
> > adds Argon2 support to LUKS2.
> 
> I am trying to use your patch series, but compilation is failing.
> I am using Debian 12 with gcc 12.
> 
> Attached is the logfile of the make invocation with the failures.
> 
> Any ideas why it is working for you? Older gcc? Or are you using
> --disable-werror in the configure step?
> 
I didn't touch arcfour.c. Are you using git master? Could you try to
remove grub-core/lib/libgcrypt-grub/ and run 'autogen.sh' to update
libgcrypt-grub?

Cheers,

Gary Lin

> best regards
>  Waldemar

> make  all-recursive
> make[1]: Entering directory '/root/grub/build'
> Making all in grub-core/lib/gnulib
> make[2]: Entering directory '/root/grub/build/grub-core/lib/gnulib'
> make  all-recursive
> make[3]: Entering directory '/root/grub/build/grub-core/lib/gnulib'
> make[4]: Entering directory '/root/grub/build/grub-core/lib/gnulib'
> make[4]: Nothing to be done for 'all-am'.
> make[4]: Leaving directory '/root/grub/build/grub-core/lib/gnulib'
> make[3]: Leaving directory '/root/grub/build/grub-core/lib/gnulib'
> make[2]: Leaving directory '/root/grub/build/grub-core/lib/gnulib'
> Making all in .
> make[2]: Entering directory '/root/grub/build'
> gcc -DHAVE_CONFIG_H -I. -I..  -Wall -W -DGRUB_UTIL=1 -D_FILE_OFFSET_BITS=64 
> -I./include -DGRUB_FILE=\"grub-core/lib/libgcrypt-grub/cipher/arcfour.c\" -I. 
> -I.. -I. -I.. -I../include -I./include -I../grub-core/lib/libgcrypt-grub/src/ 
>  -I../grub-core/lib/libgcrypt_wrap -I../grub-core/lib/posix_wrap 
> -D_GCRYPT_IN_LIBGCRYPT=1 -D_GCRYPT_CONFIG_H_INCLUDED=1 
> -I../include/grub/gcrypt -D_FILE_OFFSET_BITS=64 -std=gnu99 -fno-common  -Wall 
> -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment 
> -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal 
> -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit 
> -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces 
> -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type 
> -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs 
> -Wunknown-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-initializers -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-sign-compare -Wno-missing-field-initializers 
> -Wno-redundant-decls -Wno-undef -fno-builtin  -MT 
> grub-core/lib/libgcrypt-grub/cipher/libgrubgcry_a-arcfour.o -MD -MP -MF 
> grub-core/lib/libgcrypt-grub/cipher/.deps-util/libgrubgcry_a-arcfour.Tpo -c 
> -o grub-core/lib/libgcrypt-grub/cipher/libgrubgcry_a-arcfour.o `test -f 
> 'grub-core/lib/libgcrypt-grub/cipher/arcfour.c' || echo 
> '../'`grub-core/lib/libgcrypt-grub/cipher/arcfour.c
> In file included from ../grub-core/lib/libgcrypt-grub/cipher/types.h:2,
>                  from ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:30:
> ../grub-core/lib/libgcrypt_wrap/cipher_wrap.h:82: error: "strtoul" redefined 
> [-Werror]
>    82 | #define strtoul grub_strtoul
>       | 
> In file included from ../grub-core/lib/libgcrypt_wrap/cipher_wrap.h:76:
> ../include/grub/gcrypt/g10lib.h:207: note: this is the location of the 
> previous definition
>   207 | #define strtoul(a,b,c)  ((unsigned long)strtol((a),(b),(c)))
>       | 
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:5: error: initialization 
> of ‘int’ from ‘const char *’ makes integer from pointer without a cast 
> [-Werror=int-conversion]
>   127 |     "ARCFOUR", NULL, NULL, 1, 128, sizeof (ARCFOUR_context),
>       |     ^~~~~~~~~
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:5: note: (near 
> initialization for ‘_gcry_cipher_spec_arcfour.algo’)
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:5: error: initializer 
> element is not computable at load time
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:5: note: (near 
> initialization for ‘_gcry_cipher_spec_arcfour.algo’)
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:16: error: 
> initialization of ‘unsigned char:1’ from ‘void *’ makes integer from pointer 
> without a cast [-Werror=int-conversion]
>   127 |     "ARCFOUR", NULL, NULL, 1, 128, sizeof (ARCFOUR_context),
>       |                ^~~~
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:16: note: (near 
> initialization for ‘_gcry_cipher_spec_arcfour.flags.disabled’)
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:22: error: 
> initialization of ‘unsigned char:1’ from ‘void *’ makes integer from pointer 
> without a cast [-Werror=int-conversion]
>   127 |     "ARCFOUR", NULL, NULL, 1, 128, sizeof (ARCFOUR_context),
>       |                      ^~~~
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:22: note: (near 
> initialization for ‘_gcry_cipher_spec_arcfour.flags.fips’)
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:28: error: 
> initialization of ‘const char *’ from ‘int’ makes pointer from integer 
> without a cast [-Werror=int-conversion]
>   127 |     "ARCFOUR", NULL, NULL, 1, 128, sizeof (ARCFOUR_context),
>       |                            ^
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:28: note: (near 
> initialization for ‘_gcry_cipher_spec_arcfour.name’)
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:31: error: 
> initialization of ‘const char **’ from ‘int’ makes pointer from integer 
> without a cast [-Werror=int-conversion]
>   127 |     "ARCFOUR", NULL, NULL, 1, 128, sizeof (ARCFOUR_context),
>       |                               ^~~
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:31: note: (near 
> initialization for ‘_gcry_cipher_spec_arcfour.aliases’)
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:36: error: 
> initialization of ‘const gcry_cipher_oid_spec_t *’ {aka ‘const struct 
> gcry_cipher_oid_spec *’} from ‘long unsigned int’ makes pointer from integer 
> without a cast [-Werror=int-conversion]
>   127 |     "ARCFOUR", NULL, NULL, 1, 128, sizeof (ARCFOUR_context),
>       |                                    ^~~~~~
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:127:36: note: (near 
> initialization for ‘_gcry_cipher_spec_arcfour.oids’)
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:128:5: error: initialization 
> of ‘long unsigned int’ from ‘gcry_err_code_t (*)(void *, const byte *, 
> unsigned int)’ {aka ‘gpg_err_code_t (*)(void *, const unsigned char *, 
> unsigned int)’} makes integer from pointer without a cast 
> [-Werror=int-conversion]
>   128 |     arcfour_setkey, NULL, NULL, encrypt_stream, encrypt_stream,
>       |     ^~~~~~~~~~~~~~
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:128:5: note: (near 
> initialization for ‘_gcry_cipher_spec_arcfour.blocksize’)
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:128:21: error: 
> initialization of ‘long unsigned int’ from ‘void *’ makes integer from 
> pointer without a cast [-Werror=int-conversion]
>   128 |     arcfour_setkey, NULL, NULL, encrypt_stream, encrypt_stream,
>       |                     ^~~~
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:128:21: note: (near 
> initialization for ‘_gcry_cipher_spec_arcfour.keylen’)
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:128:27: error: 
> initialization of ‘long unsigned int’ from ‘void *’ makes integer from 
> pointer without a cast [-Werror=int-conversion]
>   128 |     arcfour_setkey, NULL, NULL, encrypt_stream, encrypt_stream,
>       |                           ^~~~
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:128:27: note: (near 
> initialization for ‘_gcry_cipher_spec_arcfour.contextsize’)
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:128:33: error: 
> initialization of ‘gcry_err_code_t (*)(void *, const unsigned char *, 
> unsigned int,  struct cipher_bulk_ops *)’ {aka ‘gpg_err_code_t (*)(void *, 
> const unsigned char *, unsigned int,  struct cipher_bulk_ops *)’} from 
> incompatible pointer type ‘void (*)(void *, byte *, const byte *, unsigned 
> int)’ {aka ‘void (*)(void *, unsigned char *, const unsigned char *, unsigned 
> int)’} [-Werror=incompatible-pointer-types]
>   128 |     arcfour_setkey, NULL, NULL, encrypt_stream, encrypt_stream,
>       |                                 ^~~~~~~~~~~~~~
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:128:33: note: (near 
> initialization for ‘_gcry_cipher_spec_arcfour.setkey’)
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:128:49: error: 
> initialization of ‘unsigned int (*)(void *, unsigned char *, const unsigned 
> char *)’ from incompatible pointer type ‘void (*)(void *, byte *, const byte 
> *, unsigned int)’ {aka ‘void (*)(void *, unsigned char *, const unsigned char 
> *, unsigned int)’} [-Werror=incompatible-pointer-types]
>   128 |     arcfour_setkey, NULL, NULL, encrypt_stream, encrypt_stream,
>       |                                                 ^~~~~~~~~~~~~~
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:128:49: note: (near 
> initialization for ‘_gcry_cipher_spec_arcfour.encrypt’)
> ../grub-core/lib/libgcrypt-grub/cipher/arcfour.c:126:3: error: missing braces 
> around initializer [-Werror=missing-braces]
>   126 |   {
>       |   ^
> cc1: all warnings being treated as errors
> make[2]: *** [Makefile:6403: 
> grub-core/lib/libgcrypt-grub/cipher/libgrubgcry_a-arcfour.o] Error 1
> make[2]: Leaving directory '/root/grub/build'
> make[1]: *** [Makefile:12468: all-recursive] Error 1
> make[1]: Leaving directory '/root/grub/build'
> make: *** [Makefile:4058: all] Error 2


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to