No000 / uefi-junk-shell

0 stars 0 forks source link

edk2のセットアップ時のエラー #1

Open No000 opened 3 years ago

No000 commented 3 years ago
gcc  -c -I ./brotli/c/include -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/ -MD -fshort-wchar -fno-strict-aliasing -fwrapv -fno-delete-null-pointer-checks -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-unused-result -nostdlib -g -O2  brotli/c/dec/bit_reader.c -o brotli/c/dec/bit_reader.o
gcc  -c -I ./brotli/c/include -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/ -MD -fshort-wchar -fno-strict-aliasing -fwrapv -fno-delete-null-pointer-checks -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-unused-result -nostdlib -g -O2  brotli/c/dec/decode.c -o brotli/c/dec/decode.o
brotli/c/dec/decode.c:2033:41: エラー: argument 2 of type ‘const uint8_t *’ {aka ‘const unsigned char *’} declared as a pointer [-Werror=vla-parameter]
 2033 |     size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size,
      |                          ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
次のファイルから読み込み:  brotli/c/dec/decode.c:7:
./brotli/c/include/brotli/decode.h:204:19: 備考: 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: エラー: argument 4 of type ‘uint8_t *’ {aka ‘unsigned char *’} declared as a pointer [-Werror=vla-parameter]
 2034 |     uint8_t* decoded_buffer) {
      |     ~~~~~~~~~^~~~~~~~~~~~~~
次のファイルから読み込み:  brotli/c/dec/decode.c:7:
./brotli/c/include/brotli/decode.h:206:13: 備考: 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)]);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: すべての警告はエラーとして取り扱われます
make[1]: *** [../Makefiles/footer.makefile:21: brotli/c/dec/decode.o] エラー 1
make[1]: ディレクトリ '/home/toto/Work/OSdev/uefi-junk-shell/tool/edk2/BaseTools/Source/C/BrotliCompress' から出ます
make: *** [GNUmakefile:76: BrotliCompress] エラー 2
make: ディレクトリ '/home/toto/Work/OSdev/uefi-junk-shell/tool/edk2/BaseTools/Source/C' から出ます
rkarsnk commented 3 years ago

@No000 私の環境では、何ごともなくビルドできました。

git clone git@github.com:tianocore/edk2.git
cd edk2
git checkout edk2-stable202105
git submodule update --init
make -C BaseTools/Source/C

実行環境 Ubuntu 20.04 x86_64 brotil : 666c3280cc11dc433c303d79a83d4ffbdd12cc8d BaseTools/Source/C/BrotliCompress/brotli (v1.0.7-17-g666c328)

% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) 

OSは何を使用してます?

No000 commented 3 years ago

manjarolinuxでgcc 11.1.0、GNU ld (GNU Binutils) 2.36.1になります。