Date: Sat, 19 Jun 2021 15:40:33 -0700 From: Mark Millard via freebsd-ports <freebsd-ports@freebsd.org> To: FreeBSD ports <freebsd-ports@freebsd.org>, freebsd-uboot@freebsd.org Subject: sysutils/edk2@??? port futures: will need updates for gcc11 based builds Message-ID: <C383800B-6E74-4182-A663-54BC6973614B@yahoo.com> References: <C383800B-6E74-4182-A663-54BC6973614B.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
EDK2 fails to build via lang/gcc11-devel (or lang/gcc11). But it turns out that EDK2 uses an external git submodule that is a source for why. That submodule has code that changed a header to use the newer C variably modified types for a couple of functions but did not change the function definitions to match. gcc10 did not report about this but gcc11 correctly rejects the combination. brotli/c/dec/decode.c:2033:41: error: argument 2 of type 'const uint8_t = *' {aka 'const unsigned char *'} declared as a pointer = [-Werror=3Dvla-parameter] 2033 | size_t encoded_size, const uint8_t* encoded_buffer, size_t* = decoded_size, | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ In file included from brotli/c/dec/decode.c:7: ./brotli/c/include/brotli/decode.h:204:19: note: previously declared as = a variable length array 'const uint8_t[*decoded_size]' {aka 'const = unsigned char[*decoded_size]'} 204 | const uint8_t = encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)], | = ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ brotli/c/dec/decode.c:2034:14: error: argument 4 of type 'uint8_t *' = {aka 'unsigned char *'} declared as a pointer [-Werror=3Dvla-parameter] 2034 | uint8_t* decoded_buffer) { | ~~~~~~~~~^~~~~~~~~~~~~~ In file included from brotli/c/dec/decode.c:7: ./brotli/c/include/brotli/decode.h:206:13: note: previously declared as = a variable length array 'uint8_t[encoded_size]' {aka 'unsigned = char[encoded_size]'} 206 | uint8_t decoded_buffer[BROTLI_ARRAY_PARAM(*decoded_size)]); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (I'm not claiming that is the only issue but it is sufficient to stop the build.) I know that there has been activity at the projects involved to deal with such, but I've not been tracking the progress. NOTE: My build tests ended up using lang/gcc11-devel instead of lang/gcc11 because Mk/bsd.gcc.mk still has the code: # A concrete version has been selected. Set proper ports dependencies, # CC, CXX, CPP, and flags. V:=3D ${_USE_GCC:S/.//} . if ${V} =3D=3D 11 _GCC_PORT:=3D gcc${V}-devel . else _GCC_PORT:=3D gcc${V} . endif =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C383800B-6E74-4182-A663-54BC6973614B>