Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

compile error in sdbusplus source #14

@lbbxsxlz

Description

@lbbxsxlz

when I use "cmake -DBUILD_STANDALONE=ON -DMCTPD_BUILD_UT=ON ../" to build the repo, I find some compile errors in sdbusplus project.

Gcc infomation:
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.4.0-1ubuntu120.04.1' --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-Av3uEd/gcc-9-9.4.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.4.0 (Ubuntu 9.4.0-1ubuntu1
20.04.1)

error information:
Making install in example
CXX calculator_server-calculator-server.o
calculator-server.cpp:9:61: error: ‘server’ is not a member of ‘sdbusplus::net::poettering’; did you mean ‘sdbusplus::server’?
9 | sdbusplus::server::object_tsdbusplus::net::poettering::server::Calculator;
| ^~~~~~
In file included from ../sdbusplus/server.hpp:3,
from calculator-server.cpp:5:
../sdbusplus/bus.hpp:20:11: note: ‘sdbusplus::server’ declared here
20 | namespace server
| ^~~~~~
calculator-server.cpp:9:79: error: template argument 1 is invalid
9 | sdbusplus::server::object_tsdbusplus::net::poettering::server::Calculator;
| ^
calculator-server.cpp:13:1: error: expected class-name before ‘{’ token
13 | {
| ^
calculator-server.cpp:21:13: error: ‘int64_t Calculator::multiply(int64_t, int64_t)’ marked ‘override’, but does not override
21 | int64_t multiply(int64_t x, int64_t y) override
| ^~~~~~~~
calculator-server.cpp:30:13: error: ‘int64_t Calculator::divide(int64_t, int64_t)’ marked ‘override’, but does not override
30 | int64_t divide(int64_t x, int64_t y) override
| ^~~~~~
calculator-server.cpp:43:10: error: ‘void Calculator::clear()’ marked ‘override’, but does not override
43 | void clear() override
| ^~~~~
calculator-server.cpp: In constructor ‘Calculator::Calculator(sdbusplus::bus::bus&, const char*)’:
calculator-server.cpp:16:9: error: class ‘Calculator’ does not have any field named ‘Calculator_inherit’
16 | Calculator_inherit(bus, path)
| ^~~~~~~~~~~~~~~~~~
calculator-server.cpp: In member function ‘int64_t Calculator::multiply(int64_t, int64_t)’:
calculator-server.cpp:23:16: error: ‘lastResult’ was not declared in this scope
23 | return lastResult(x * y);
| ^~~~~~~~~~
calculator-server.cpp: In member function ‘int64_t Calculator::divide(int64_t, int64_t)’:
calculator-server.cpp:35:20: error: ‘State’ has not been declared
35 | status(State::Error);
| ^~~~~
calculator-server.cpp:35:13: error: ‘status’ was not declared in this scope; did you mean ‘static’?
35 | status(State::Error);
| ^~~~~~
| static
calculator-server.cpp:39:16: error: ‘lastResult’ was not declared in this scope
39 | return lastResult(x / y);
| ^~~~~~~~~~
calculator-server.cpp: In member function ‘void Calculator::clear()’:
calculator-server.cpp:45:18: error: ‘lastResult’ was not declared in this scope
45 | auto v = lastResult();
| ^~~~~~~~~~
calculator-server.cpp:47:9: error: ‘cleared’ was not declared in this scope; did you mean ‘clear’?
47 | cleared(v);
| ^~~~~~~
| clear
calculator-server.cpp: In function ‘int main()’:
calculator-server.cpp:60:38: error: ‘interface’ is not a member of ‘Calculator’
60 | std::string_view(Calculator::interface));
| ^~~~~~~~~
make[5]: *** [Makefile:580: calculator_server-calculator-server.o] Error 1
make[4]: *** [Makefile:737: install] Error 2
make[3]: *** [Makefile:819: install-recursive] Error 1
make[2]: *** [CMakeFiles/sdbusplus-project.dir/build.make:103: sdbusplus-project-prefix/src/sdbusplus-project-stamp/sdbusplus-project-install] Error 2
make[1]: *** [CMakeFiles/Makefile2:123: CMakeFiles/sdbusplus-project.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
CMake Error at CMakeLists.txt:159 (find_package):
Could not find a package configuration file provided by "GTest" with any of
the following names:

GTestConfig.cmake
gtest-config.cmake

Add the installation prefix of "GTest" to CMAKE_PREFIX_PATH or set
"GTest_DIR" to a directory containing one of the above files. If "GTest"
provides a separate development package or SDK, be sure it has been
installed.

-- Configuring incomplete, errors occurred!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions