ShawnYan 发表于 2024-1-22 17:41:53

gcc 13 编译报错

[ 11%] Building CXX object extra/icu/CMakeFiles/icui18n.dir/icu-release-69-1/source/i18n/utf8collationiterator.cpp.o
/tmp/greatsql/extra/icu/icu-release-69-1/source/i18n/uspoof_impl.cpp: In function ‘int32_t uspoof_swap_69(const UDataSwapper*, const void*, int32_t, void*, UErrorCode*)’:
/tmp/greatsql/extra/icu/icu-release-69-1/source/i18n/uspoof_impl.cpp:948:34: warning: comparison between two arrays [-Warray-compare]
948 |   if (outputDH->fFormatVersion != spoofDH->fFormatVersion) {
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/greatsql/extra/icu/icu-release-69-1/source/i18n/uspoof_impl.cpp:948:34: note: use unary ‘+’ which decays operands to pointers or ‘&‘component_ref’ not supported by dump_decl<declaration error> != &‘component_ref’ not supported by dump_decl<declaration error>[
0]’ to compare the addresses
[ 11%] Building CXX object extra/icu/CMakeFiles/icui18n.dir/icu-release-69-1/source/i18n/utmscale.cpp.o

make: *** Error 2
# gcc --version
gcc (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rocky linux 9.3 , gcc 13 下编译报错,换成gcc 12 正常


yejr 发表于 2024-1-23 10:01:58

谢谢分享,gcc版本太高了也不行,一般选择gcc11或12版本 :)

ShawnYan 发表于 2024-1-23 10:25:08

yejr 发表于 2024-1-23 10:01
谢谢分享,gcc版本太高了也不行,一般选择gcc11或12版本 :)

okay, 默认的11适配就挺好的

yejr 发表于 2024-1-23 10:36:45

ShawnYan 发表于 2024-1-23 10:25
okay, 默认的11适配就挺好的

如果是指定spec文件编译RPM的话,可能会要求是gcc12的
页: [1]
查看完整版本: gcc 13 编译报错