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

dnf5 fails to build against sdbus-cpp 2.0 #1866

Open
dollierp opened this issue Nov 15, 2024 · 1 comment
Open

dnf5 fails to build against sdbus-cpp 2.0 #1866

dollierp opened this issue Nov 15, 2024 · 1 comment

Comments

@dollierp
Copy link

When trying to build dnf5-5.2.7.0 (on ArchLinux), I get errors related to sdbus-cpp during the build.

IIUC, they are related to the recent move from sdbus-cpp 1.5.0 to 2.0.0 in ArchLinux repositories:

[ 73%] Building CXX object dnf5daemon-client/CMakeFiles/dnf5daemon-client.dir/callbacks.cpp.o
/build/dnf5/src/dnf5-5.2.7.0/dnf5daemon-server/advisory.cpp: In function ‘dnfdaemon::KeyValueMapList dnfdaemon::collections_to_list(const libdnf5::advisory::Advisory&, const std::unordered_map<std::__cxx11::basic_string<char>, libdnf5::rpm::Package>&)’:
/build/dnf5/src/dnf5-5.2.7.0/dnf5daemon-server/advisory.cpp:74:28: error: no match for ‘operator=’ (operand types are ‘std::map<std::__cxx11::basic_string<char>, sdbus::Variant>::mapped_type’ {aka ‘sdbus::Variant’} and ‘std::__cxx11::basic_string<char>’)
   74 |             package["n"] = name;
      |                            ^~~~
In file included from /usr/include/sdbus-c++/ConvenienceApiClasses.h:32,
                 from /usr/include/sdbus-c++/IObject.h:30,
                 from /usr/include/sdbus-c++/sdbus-c++.h:28,
                 from /build/dnf5/src/dnf5-5.2.7.0/dnf5daemon-server/dbus.hpp:23,
                 from /build/dnf5/src/dnf5-5.2.7.0/dnf5daemon-server/advisory.hpp:23,
                 from /build/dnf5/src/dnf5-5.2.7.0/dnf5daemon-server/advisory.cpp:20:
/usr/include/sdbus-c++/Types.h:55:11: note: candidate: ‘sdbus::Variant& sdbus::Variant::operator=(const sdbus::Variant&)’
   55 |     class Variant
      |           ^~~~~~~
/usr/include/sdbus-c++/Types.h:55:11: note:   no known conversion for argument 1 from ‘std::__cxx11::basic_string<char>’ to ‘const sdbus::Variant&’
/usr/include/sdbus-c++/Types.h:55:11: note: candidate: ‘sdbus::Variant& sdbus::Variant::operator=(sdbus::Variant&&)’
/usr/include/sdbus-c++/Types.h:55:11: note:   no known conversion for argument 1 from ‘std::__cxx11::basic_string<char>’ to ‘sdbus::Variant&&’
[...]
REDACTED
[...]
make[2]: *** [dnf5daemon-client/CMakeFiles/dnf5daemon-client.dir/build.make:93: dnf5daemon-client/CMakeFiles/dnf5daemon-client.dir/commands/advisory/advisory.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3967: dnf5daemon-client/CMakeFiles/dnf5daemon-client.dir/all] Error 2
@m-blaha
Copy link
Member

m-blaha commented Nov 15, 2024

Yeah, I'm working on it in this branch: https://github.com/rpm-software-management/dnf5/tree/mblaha/sdbus-cpp-2
Hopefully I'll be ready to prepare a PR in near future.

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

2 participants