Thanks

Compilation should be successful in both environments.
I've created a jira ticket
https://issues.apache.org/jira/browse/IGNITE-27223.


On Mon, 1 Dec 2025 at 21:03, Johan <[email protected]> wrote:

> Hello,
>
> I tried on another host, a debian 12.12 with gcc 12.2.0 and cmake 3.25,
> compilation is fine.
>
> On my host, just including <algorithm> is the only thing needed to make
> compilation successful. Weird.
>
>  I did not create a ticket, but would be happy to participate if i can.
>
> Regards
>
> Le 30 novembre 2025 19:27:49 GMT+01:00, Eduard Rakhmankulov <
> [email protected]> a écrit :
> >Hello Johan!
> >
> >In my case compilation is successful. I checked and I see that std_algo.h
> >was included through another standard header <functional> which was
> >included through cluster_connection.h. It could be somehow version or/and
> >environment related (I checked with gcc 13.3 on Ubuntu 24). Anyway, the
> >proper way to deal with this is to include this header explicitly.
> >
> >Have you created a corresponding ticket in Jira, if not I will create it
> >myself.
> >
> >Thank you!
> >
> >
> >P.S. Regarding the Go client: I don't have an answer but  you might want
> to
> >repeat your question with the correct email subject.
> >
> >On Sat, 29 Nov 2025 at 13:22, Johan <[email protected]> wrote:
> >
> >> Hello,
> >>
> >> I have this environment :
> >> Debian 13.2, gcc 14.2.0-19, cmake 3.31.6-2
> >>
> >> And I try to compile ignite 3.1.0 cpp client with the following :
> >> git clone https://github.com/apache/ignite-3.git
> >> cd ignite-3 && git checkout 3.1.0
> >> cd /modules/platforms/cpp/
> >> mkdir cmake-build-release && cd cmake-build-release
> >> cmake .. -DCMAKE_BUILD_TYPE=Release
> >> cmake --build . -j8
> >>
> >> The build crash with this error :
> >>
> ~/ignite-3/modules/platforms/cpp/ignite/client/detail/cluster_connection.cpp:
> >> In member function ‘virtual void
> >> ignite::detail::cluster_connection::on_message_received(uint64_t,
> >> ignite::bytes_view)’:
> >>
> ~/ignite-3/modules/platforms/cpp/ignite/client/detail/cluster_connection.cpp:171:24:
> >> error: no matching function for call to
> >> ‘find(std::vector<ignite::uuid>::const_iterator,
> >> std::vector<ignite::uuid>::const_iterator, ignite::uuid&)’
> >>   171 |     auto it = std::find(cluster_ids.begin(), cluster_ids.end(),
> >> *current_cluster_id);
> >>       |
> >>  ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>
> >> I have no ease with c++ ; but asking help to AI, we came up with this,
> >> which made client compile successfully :
> >>
> >>
> -------------------------------------------------------------------------------
> >> --- a/modules/platforms/cpp/ignite/client/detail/cluster_connection.cpp
> >> +++ b/modules/platforms/cpp/ignite/client/detail/cluster_connection.cpp
> >> @@ -26,6 +26,7 @@
> >>  #include "ignite/protocol/writer.h"
> >>
> >>  #include <iterator>
> >> +#include <algorithm>
> >>
> >>  namespace ignite::detail {
> >>
> >> @@ -168,7 +169,15 @@ void
> cluster_connection::on_message_received(uint64_t
> >> id, bytes_view msg) {
> >>      }
> >>
> >>      const auto &cluster_ids = context.get_cluster_ids();
> >> -    auto it = std::find(cluster_ids.begin(), cluster_ids.end(),
> >> *current_cluster_id);
> >> +    auto it = cluster_ids.end();
> >> +
> >> +    const ignite::uuid& target = current_cluster_id.value();
> >> +
> >> +    it = std::find_if(cluster_ids.begin(), cluster_ids.end(),
> >> +                        [&target](const ignite::uuid& id) {
> >> +                            return id == target;
> >> +                        });
> >> +
> >>      if (it == cluster_ids.end()) {
> >>          std::stringstream message;
> >>          message << "Node from unknown cluster: current_cluster_id=" <<
> >> *current_cluster_id << ", node_cluster_ids=["
> >>
> >>
> -------------------------------------------------------------------------------
> >>
> >> What do you think ? Could this be included upstream, or is there a
> cleaner
> >> way to fix the build?
> >>
> >> As a background, i am trying to have a golang way to use ignite-3
> client.
> >> Maybe using cgo, or native, we'll see.
> >> I worked on https://github.com/yo000/ignite-go-client and use it in
> some
> >> tools with ignite 2.17 instances.
> >> Do you know of any golang work in progress ?
> >>
> >> Regards
>

Reply via email to