Sdbusplus Build Errors
zehra.ozdemir at inventron.com.tr
zehra.ozdemir at inventron.com.tr
Tue Jan 17 00:26:32 AEDT 2023
Hello,
I am trying to build sdbusplus for phosphor-ipmi-flash host-tool.
Currrently, the ubuntu version is 22.04 LTS, the gcc version is 12.1.0,
g++ and c++ versions are 11.3.0.
c++-20 is used in meson.build file and it is given as a parameter. There is
no latest version that i can install when i look at all c++ and g++ versions
in ubuntu 22.04. I got errors about some methods of cpp libraries when I run
ninja command :
[1/52] Compiling C++ object
example/calculator-server.p/calculator-server.cpp.o
FAILED: example/calculator-server.p/calculator-server.cpp.o
ccache c++ -Iexample/calculator-server.p -Iexample/gen -I../example/gen
-I../include -I/usr/include -fdiagnostics-color=always
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror
-std=c++20 -O2 -g -DBOOST_ASIO_DISABLE_THREADS -DBOOST_ALL_NO_LIB
-DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_ERROR_CODE_HEADER_ONLY
-DBOOST_COROUTINES_NO_DEPRECATION_WARNING -MD -MQ
example/calculator-server.p/calculator-server.cpp.o -MF
example/calculator-server.p/calculator-server.cpp.o.d -o
example/calculator-server.p/calculator-server.cpp.o -c
../example/calculator-server.cpp
In file included from ../include/sdbusplus/server.hpp:4,
from example/gen/net/poettering/Calculator/server.hpp:6,
from ../example/calculator-server.cpp:3:
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::sender(std::string_view)':
../include/sdbusplus/bus/match.hpp:126:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::sender(std::string_view)'
126 | inline constexpr auto sender(std::string_view s) noexcept
| ^~~~~~
In file included from /usr/include/c++/11/string:55,
from ../include/sdbusplus/exception.hpp:8,
from example/gen/net/poettering/Calculator/error.hpp:4,
from ../example/calculator-server.cpp:2:
/usr/include/c++/11/bits/basic_string.h:85:11: note:
'std::__cxx11::basic_string<char>' is not literal because:
85 | class basic_string
| ^~~~~~~~~~~~
/usr/include/c++/11/bits/basic_string.h:85:11: note:
'std::__cxx11::basic_string<char>' does not have 'constexpr' destructor
In file included from ../include/sdbusplus/server.hpp:4,
from example/gen/net/poettering/Calculator/server.hpp:6,
from ../example/calculator-server.cpp:3:
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::interface(std::string_view)':
../include/sdbusplus/bus/match.hpp:130:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::interface(std::string_view)'
130 | inline constexpr auto interface(std::string_view s) noexcept
| ^~~~~~~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::member(std::string_view)':
../include/sdbusplus/bus/match.hpp:134:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::member(std::string_view)'
134 | inline constexpr auto member(std::string_view s) noexcept
| ^~~~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::path(std::string_view)':
../include/sdbusplus/bus/match.hpp:138:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::path(std::string_view)'
138 | inline constexpr auto path(std::string_view s) noexcept
| ^~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::path_namespace(std::string_view)':
../include/sdbusplus/bus/match.hpp:142:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::path_namespace(std::string_view)'
142 | inline constexpr auto path_namespace(std::string_view s) noexcept
| ^~~~~~~~~~~~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::destination(std::string_view)':
../include/sdbusplus/bus/match.hpp:146:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::destination(std::string_view)'
146 | inline constexpr auto destination(std::string_view s) noexcept
| ^~~~~~~~~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::arg0namespace(std::string_view)':
../include/sdbusplus/bus/match.hpp:161:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::arg0namespace(std::string_view)'
161 | inline constexpr auto arg0namespace(std::string_view s) noexcept
| ^~~~~~~~~~~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr std::string
sdbusplus::bus::match::rules::interfacesAdded(std::string_view)':
../include/sdbusplus/bus/match.hpp:191:30: error: invalid return type
'std::string' {aka 'std::__cxx11::basic_string<char>'} of 'constexpr'
function 'constexpr std::string
sdbusplus::bus::match::rules::interfacesAdded(std::string_view)'
191 | inline constexpr std::string interfacesAdded(std::string_view p)
noexcept
| ^~~~~~~~~~~~~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr std::string
sdbusplus::bus::match::rules::interfacesRemoved(std::string_view)':
../include/sdbusplus/bus/match.hpp:196:30: error: invalid return type
'std::string' {aka 'std::__cxx11::basic_string<char>'} of 'constexpr'
function 'constexpr std::string
sdbusplus::bus::match::rules::interfacesRemoved(std::string_view)'
196 | inline constexpr std::string interfacesRemoved(std::string_view p)
noexcept
| ^~~~~~~~~~~~~~~~~
[2/52] Compiling C++ object
example/ca...net_poettering_Calculator_server.cpp.o
FAILED:
example/calculator-server.p/meson-generated_.._gen_net_poettering_Calculator
_server.cpp.o
ccache c++ -Iexample/calculator-server.p -Iexample/gen -I../example/gen
-I../include -I/usr/include -fdiagnostics-color=always
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror
-std=c++20 -O2 -g -DBOOST_ASIO_DISABLE_THREADS -DBOOST_ALL_NO_LIB
-DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_ERROR_CODE_HEADER_ONLY
-DBOOST_COROUTINES_NO_DEPRECATION_WARNING -MD -MQ
example/calculator-server.p/meson-generated_.._gen_net_poettering_Calculator
_server.cpp.o -MF
example/calculator-server.p/meson-generated_.._gen_net_poettering_Calculator
_server.cpp.o.d -o
example/calculator-server.p/meson-generated_.._gen_net_poettering_Calculator
_server.cpp.o -c example/gen/net/poettering/Calculator/server.cpp
In file included from ../include/sdbusplus/server.hpp:4,
from ../include/sdbusplus/sdbuspp_support/server.hpp:3,
from example/gen/net/poettering/Calculator/server.cpp:5:
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::sender(std::string_view)':
../include/sdbusplus/bus/match.hpp:126:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::sender(std::string_view)'
126 | inline constexpr auto sender(std::string_view s) noexcept
| ^~~~~~
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/c++/11/bits/ranges_algobase.h:36,
from /usr/include/c++/11/bits/ranges_algo.h:35,
from /usr/include/c++/11/algorithm:64,
from example/gen/net/poettering/Calculator/server.cpp:1:
/usr/include/c++/11/bits/basic_string.h:85:11: note:
'std::__cxx11::basic_string<char>' is not literal because:
85 | class basic_string
| ^~~~~~~~~~~~
/usr/include/c++/11/bits/basic_string.h:85:11: note:
'std::__cxx11::basic_string<char>' does not have 'constexpr' destructor
In file included from ../include/sdbusplus/server.hpp:4,
from ../include/sdbusplus/sdbuspp_support/server.hpp:3,
from example/gen/net/poettering/Calculator/server.cpp:5:
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::interface(std::string_view)':
../include/sdbusplus/bus/match.hpp:130:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::interface(std::string_view)'
130 | inline constexpr auto interface(std::string_view s) noexcept
| ^~~~~~~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::member(std::string_view)':
../include/sdbusplus/bus/match.hpp:134:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::member(std::string_view)'
134 | inline constexpr auto member(std::string_view s) noexcept
| ^~~~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::path(std::string_view)':
../include/sdbusplus/bus/match.hpp:138:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::path(std::string_view)'
138 | inline constexpr auto path(std::string_view s) noexcept
| ^~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::path_namespace(std::string_view)':
../include/sdbusplus/bus/match.hpp:142:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::path_namespace(std::string_view)'
142 | inline constexpr auto path_namespace(std::string_view s) noexcept
| ^~~~~~~~~~~~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::destination(std::string_view)':
../include/sdbusplus/bus/match.hpp:146:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::destination(std::string_view)'
146 | inline constexpr auto destination(std::string_view s) noexcept
| ^~~~~~~~~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr auto
sdbusplus::bus::match::rules::arg0namespace(std::string_view)':
../include/sdbusplus/bus/match.hpp:161:23: error: invalid return type
'std::__cxx11::basic_string<char>' of 'constexpr' function 'constexpr auto
sdbusplus::bus::match::rules::arg0namespace(std::string_view)'
161 | inline constexpr auto arg0namespace(std::string_view s) noexcept
| ^~~~~~~~~~~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr std::string
sdbusplus::bus::match::rules::interfacesAdded(std::string_view)':
../include/sdbusplus/bus/match.hpp:191:30: error: invalid return type
'std::string' {aka 'std::__cxx11::basic_string<char>'} of 'constexpr'
function 'constexpr std::string
sdbusplus::bus::match::rules::interfacesAdded(std::string_view)'
191 | inline constexpr std::string interfacesAdded(std::string_view p)
noexcept
| ^~~~~~~~~~~~~~~
../include/sdbusplus/bus/match.hpp: In function 'constexpr std::string
sdbusplus::bus::match::rules::interfacesRemoved(std::string_view)':
../include/sdbusplus/bus/match.hpp:196:30: error: invalid return type
'std::string' {aka 'std::__cxx11::basic_string<char>'} of 'constexpr'
function 'constexpr std::string
sdbusplus::bus::match::rules::interfacesRemoved(std::string_view)'
196 | inline constexpr std::string interfacesRemoved(std::string_view p)
noexcept
| ^~~~~~~~~~~~~~~~~
[3/52] Compiling C++ object libsdbusplus.so.1.0.0.p/src_async_match.cpp.o
FAILED: libsdbusplus.so.1.0.0.p/src_async_match.cpp.o
ccache c++ -Ilibsdbusplus.so.1.0.0.p -I. -I.. -I../include
-fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
-Wextra -Wpedantic -Werror -std=c++20 -O2 -g -fPIC -MD -MQ
libsdbusplus.so.1.0.0.p/src_async_match.cpp.o -MF
libsdbusplus.so.1.0.0.p/src_async_match.cpp.o.d -o
libsdbusplus.so.1.0.0.p/src_async_match.cpp.o -c ../src/async/match.cpp
In file included from ../include/sdbusplus/async/match.hpp:4,
from ../src/async/match.cpp:1...
I could not see any documentation that contains which versions must be used
to avoid getting these errors actually. Could you please give me some
information about it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20230116/7b484dba/attachment-0001.htm>
More information about the openbmc
mailing list