Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译kvs服务报错 #5

Open
zagzhang opened this issue Sep 9, 2024 · 0 comments
Open

编译kvs服务报错 #5

zagzhang opened this issue Sep 9, 2024 · 0 comments

Comments

@zagzhang
Copy link

zagzhang commented Sep 9, 2024

root@zag:/huaweicloud-sdk-cpp-v3/build# cmake -DBUILD_SERVICE=kvs -DENABLE_BSON=ON -DLIBBSON_DIR=/root/bson-1.0 ..
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: random system thread filesystem chrono atomic date_time regex
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: filesystem thread system regex date_time program_options
-- Build all Services
-- Configuring done
-- Generating done
-- Build files have been written to: /root/huaweicloud-sdk-cpp-v3/build
root@zag:
/huaweicloud-sdk-cpp-v3/build#
root@zag:/huaweicloud-sdk-cpp-v3/build#
root@zag:
/huaweicloud-sdk-cpp-v3/build# make
Consolidate compiler generated dependencies of target core
[ 0%] Building CXX object core/CMakeFiles/core.dir/src/Client.cpp.o
In file included from /root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Types.h:33,
from /root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Builder.h:25,
from /root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/utils/ModelBase.h:37,
from /root/huaweicloud-sdk-cpp-v3/core/src/Client.cpp:24:
/root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Decimal128.h:43:29: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
43 | explicit operator const bson_decimal128_t *() const {
| ^~~~~~~~~~~~~~~~~
/root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Decimal128.h:43:14: error: ‘operator const int’ does not name a type
43 | explicit operator const bson_decimal128_t *() const {
| ^~~~~~~~
/root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Decimal128.h:63:5: error: ‘bson_decimal128_t’ does not name a type
63 | bson_decimal128_t value_{0, 0};
| ^~~~~~~~~~~~~~~~~
/root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Decimal128.h: In constructor ‘HuaweiCloud::Sdk::Core::Bson::Decimal128::Decimal128(uint64_t, uint64_t)’:
/root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Decimal128.h:39:9: error: ‘value_’ was not declared in this scope
39 | value_.high = high;
| ^~~~~~
/root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Decimal128.h: In member function ‘uint64_t HuaweiCloud::Sdk::Core::Bson::Decimal128::high() const’:
/root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Decimal128.h:50:16: error: ‘value_’ was not declared in this scope
50 | return value_.high;
| ^~~~~~
/root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Decimal128.h: In member function ‘uint64_t HuaweiCloud::Sdk::Core::Bson::Decimal128::low() const’:
/root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Decimal128.h:54:16: error: ‘value_’ was not declared in this scope
54 | return value_.low;
| ^~~~~~
In file included from /root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Builder.h:25,
from /root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/utils/ModelBase.h:37,
from /root/huaweicloud-sdk-cpp-v3/core/src/Client.cpp:24:
/root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Types.h: At global scope:
/root/huaweicloud-sdk-cpp-v3/core/include/huaweicloud/core/bson/Types.h:479:80: warning: ignoring attributes on template argument ‘bool(const bson_value_t&, const HuaweiCloud::Sdk::Core::Bson::Element&)’ {aka ‘bool(const bson_value_t&, const HuaweiCloud::Sdk::Core::Bson::Element&)’} [-Wignored-attributes]
479 | static std::map<int, std::function<bool(const bson_value_t&, const Element&)>> condition_map
;
| ^
make[2]: *** [core/CMakeFiles/core.dir/build.make:76: core/CMakeFiles/core.dir/src/Client.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:134: core/CMakeFiles/core.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant