GreatSQL社区

搜索

[已解决] gcc 13 编译报错

660 3 2024-1-22 17:41
  1. [ 11%] Building CXX object extra/icu/CMakeFiles/icui18n.dir/icu-release-69-1/source/i18n/utf8collationiterator.cpp.o
  2. /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*)’:
  3. /tmp/greatsql/extra/icu/icu-release-69-1/source/i18n/uspoof_impl.cpp:948:34: warning: comparison between two arrays [-Warray-compare]
  4.   948 |     if (outputDH->fFormatVersion != spoofDH->fFormatVersion) {
  5.       |         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
  6. /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>[0] != &‘component_ref’ not supported by dump_decl<declaration error>[
  7. 0]’ to compare the addresses
  8. [ 11%] Building CXX object extra/icu/CMakeFiles/icui18n.dir/icu-release-69-1/source/i18n/utmscale.cpp.o

  9. make: *** [Makefile:166: all] Error 2
  10. [root@3f553fdb1939 build]# gcc --version
  11. gcc (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4)
  12. Copyright (C) 2023 Free Software Foundation, Inc.
  13. This is free software; see the source for copying conditions.  There is NO
  14. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

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


全部回复(3)
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的
ShawnYan

21

主题

1

博客

787

贡献

高级会员

Rank: 4

积分
852

2022年度博学人物2022年度求知人物2022年度活跃用户助人为乐(铜)勤学好问(铜)写作分享(铜)

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-11-25 02:16 , Processed in 0.027460 second(s), 18 queries , Redis On.
快速回复 返回顶部 返回列表