GreatSQL社区

搜索

[已解决] 麒麟10编译GreateSQL-8.0.32-25,make时报错

908 4 2024-3-14 10:29
安装环境:
操作系统:麒麟10 Kylin Linux Advanced Server release V10 (Tercel)
硬件配置:CPU:4C MEM:8G DISK:200G
参考文档:https://gitee.com/GreatSQL/Great ... lin-and-loongson.md

编译命令:
cd /data/tmp/dba_tools/greatsql-8.0.32-25
mkdir bld
cd bld
cmake .. -DBOOST_INCLUDE_DIR=/data/tmp/dba_tools/boost_1_77_0 \
-DLOCAL_BOOST_DIR=/data/tmp/dba_tools/boost_1_77_0 \
-DCMAKE_INSTALL_PREFIX=/usr/local/GreatSQL-8.0.32-25 \
-DWITH_ZLIB=bundled \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release \
-DWITH_TOKUDB=OFF \
-DWITH_ROCKSDB=OFF \
-DCOMPILATION_COMMENT="GreatSQL-8.0.32-25" \
-DMAJOR_VERSION=8 \
-DMINOR_VERSION=0 \
-DPATCH_VERSION=25 \
-DWITH_UNIT_TESTS=OFF \
-DWITH_NDBCLUSTER=OFF \
-DWITH_SSL=system \
-DWITH_SYSTEMD=ON \
-DWITH_AUTHENTICATION_LDAP=OFF \
-DWITH_ROUTER=OFF
make -j 4


报错内容:make阶段报错:

报错1:
[ 35%] Building CXX object extra/icu/CMakeFiles/icui18n.dir/icu-release-69-1/source/i18n/utmscale.cpp.o
[ 35%] Building CXX object extra/icu/CMakeFiles/icui18n.dir/icu-release-69-1/source/i18n/utrans.cpp.o
[ 35%] Building CXX object extra/icu/CMakeFiles/icui18n.dir/icu-release-69-1/source/i18n/vtzone.cpp.o
[ 35%] Building CXX object extra/icu/CMakeFiles/icui18n.dir/icu-release-69-1/source/i18n/vzone.cpp.o
[ 35%] Building CXX object extra/icu/CMakeFiles/icui18n.dir/icu-release-69-1/source/i18n/zonemeta.cpp.o
[ 35%] Building CXX object extra/icu/CMakeFiles/icui18n.dir/icu-release-69-1/source/i18n/zrule.cpp.o
[ 35%] Building CXX object extra/icu/CMakeFiles/icui18n.dir/icu-release-69-1/source/i18n/ztrans.cpp.o
[ 35%] Linking CXX static library libicui18n.a
[ 35%] Built target icui18n
make: *** [Makefile:163: all] Error 2


报错2:
[ 35%] Building CXX object extra/protobuf/protobuf-3.19.4/cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/compiler/importer.cc.o
[ 35%] Building CXX object client/CMakeFiles/mysql_ssl_rsa_setup.dir/path.cc.o
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/any.pb.cc: In constructor ‘constexpr google::protobuf::AnyDefaultTypeInternal::AnyDefaultTypeInternal()’:
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/any.pb.cc:27:76: error: temporary of non-literal type ‘google::protobuf::Any’ in a constant expression
     : _instance(:ROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
                                                                            ^
In file included from /data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/any.pb.cc:4:0:
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/any.pb.h:68:23: note: ‘google::protobuf::Any’ is not literal because:
class PROTOBUF_EXPORT Any final :
                       ^~~
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/any.pb.h:68:23: note:   ‘google::protobuf::Any’ has a non-trivial destructor
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.cc: In constructor ‘constexpr google::protobuf::ApiDefaultTypeInternal::ApiDefaultTypeInternal()’:
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.cc:32:76: error: temporary of non-literal type ‘google::protobuf::Api’ in a constant expression
     : _instance(:ROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
                                                                            ^
In file included from /data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.cc:4:0:
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.h:78:23: note: ‘google::protobuf::Api’ is not literal because:
class PROTOBUF_EXPORT Api final :
                       ^~~
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.h:78:23: note:   ‘google::protobuf::Api’ has a non-trivial destructor
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.cc: In constructor ‘constexpr google::protobuf::MethodDefaultTypeInternal::MethodDefaultTypeInternal()’:
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.cc:51:76: error: temporary of non-literal type ‘google::protobuf::Method’ in a constant expression
     : _instance(:ROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
                                                                            ^
In file included from /data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.cc:4:0:
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.h:336:23: note: ‘google::protobuf::Method’ is not literal because:
class PROTOBUF_EXPORT Method final :
                       ^~~~~~
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.h:336:23: note:   ‘google::protobuf::Method’ has a non-trivial destructor
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.cc: In constructor ‘constexpr google::protobuf::MixinDefaultTypeInternal::MixinDefaultTypeInternal()’:
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.cc:64:76: error: temporary of non-literal type ‘google::protobuf::Mixin’ in a constant expression
     : _instance(:ROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
                                                                            ^
In file included from /data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.cc:4:0:
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.h:572:23: note: ‘google::protobuf::Mixin’ is not literal because:
class PROTOBUF_EXPORT Mixin final :
                       ^~~~~
/data/tmp/dba_tools/greatsql-8.0.32-25/extra/protobuf/protobuf-3.19.4/src/google/protobuf/api.pb.h:572:23: note:   ‘google::protobuf::Mixin’ has a non-trivial destructor
make[2]: *** [extra/protobuf/protobuf-3.19.4/cmake/CMakeFiles/libprotobuf.dir/build.make:492: extra/protobuf/protobuf-3.19.4/cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/any.pb.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Scanning dependencies of target lz4_decompress
[ 35%] Building CXX object utilities/CMakeFiles/lz4_decompress.dir/lz4_decompress.cc.o
make[2]: *** [extra/protobuf/protobuf-3.19.4/cmake/CMakeFiles/libprotobuf.dir/build.make:505: extra/protobuf/protobuf-3.19.4/cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/api.pb.cc.o] Error 1
Scanning dependencies of target zlib_decompress
[ 35%] Building CXX object utilities/CMakeFiles/zlib_decompress.dir/zlib_decompress.cc.o
[ 35%] Linking CXX executable ../runtime_output_directory/lz4_decompress
[ 35%] Linking CXX executable ../runtime_output_directory/zlib_decompress
[ 35%] Built target lz4_decompress
Scanning dependencies of target my_print_defaults
[ 35%] Building CXX object utilities/CMakeFiles/my_print_defaults.dir/my_print_defaults.cc.o
[ 35%] Linking CXX executable ../runtime_output_directory/mysql_ssl_rsa_setup
[ 35%] Built target zlib_decompress
Scanning dependencies of target comp_err
[ 35%] Building CXX object utilities/CMakeFiles/comp_err.dir/comp_err.cc.o
[ 35%] Built target mysql_ssl_rsa_setup
Scanning dependencies of target ndbportlib
make[1]: *** [CMakeFiles/Makefile2:2252: extra/protobuf/protobuf-3.19.4/cmake/CMakeFiles/libprotobuf.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 35%] Linking CXX static library ../../../../../archive_output_directory/libndbportlib.a
[ 35%] Built target ndbportlib
[ 35%] Linking CXX executable ../runtime_output_directory/my_print_defaults
[ 35%] Built target my_print_defaults
[ 35%] Linking CXX executable ../runtime_output_directory/comp_err
[ 35%] Built target comp_err
make: *** [Makefile:163: all] Error 2

全部回复(4)
yejr 2024-3-14 11:17:43
你的CPU是什么类型的呢
x86的话,可以直接用GreatSQL-Build Docker镜像来编译更省事,参考 https://gitee.com/GreatSQL/Great ... ster/GreatSQL-Build

看起来是因为WITH_PROTOBUF依赖的原因,请采用上述仓库中的 greatsql-automake.sh 脚本完成编译

如果还有报错,请直接上传 /tmp/greatsql-automake.log 完整文件
北部卡车 2024-3-14 14:19:22
yejr 发表于 2024-3-14 11:17
你的CPU是什么类型的呢
x86的话,可以直接用GreatSQL-Build Docker镜像来编译更省事,参考 https://gitee.c ...

CPU 架构类型为 ARMv8
本机进行编译安装的,没用docker镜像
yejr 2024-3-14 22:14:13
北部卡车 发表于 2024-3-14 14:19
CPU 架构类型为 ARMv8
本机进行编译安装的,没用docker镜像

ARM架构编译和X86的方法一样,不用参考龙芯CPU的那篇,参考这篇就好 https://greatsql.cn/docs/8032-25 ... th-source-code.html

另外,还是需要详细日志才知道原因
北部卡车 2024-3-28 16:26:38
yejr 发表于 2024-3-14 22:14
ARM架构编译和X86的方法一样,不用参考龙芯CPU的那篇,参考这篇就好 https://greatsql.cn/docs/8032-25/u ...

直接使用了 glib 2.28 的二进制包的安装方式了,不需要进行编译了 ,跳过了这个报错
北部卡车

1

主题

1

博客

15

贡献

新手上路

Rank: 1

积分
19

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-11-23 19:30 , Processed in 0.020647 second(s), 17 queries , Redis On.
快速回复 返回顶部 返回列表