[zeromq-dev] Build fails on Solaris / Sun C++: multimap::insert in socket_base.cpp:550

Ivan Pechorin ivan.pechorin at gmail.com
Sun May 20 14:36:12 CEST 2012


libzmq master fails to compile with Sun C++ on Solaris. I used just
./autogen.sh && ./configure && gmake

The error is:

"socket_base.cpp", line 550: Error: Could not find a match for
std::multimap<std::string, zmq::own_t*, std::less<std::string>,
std::allocator<std::pair<const std::string,
zmq::own_t*>>>::insert(std::pair<std::string, zmq::own_t*>) needed in
zmq::socket_base_t::add_endpoint(const char*, zmq::own_t*).

Please, see config.log and full build output here:

It seems like the solution is to use insert(endpoints_t::value_type(first,
second)) instead of insert(std::make_pair(first, second))
Please, see pull request https://github.com/zeromq/libzmq/pull/342

--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -547,7 +547,7 @@ void zmq::socket_base_t::add_endpoint (const char
*addr_, own_t *endpoint_)
    //  Activate the session. Make it a child of this socket.
    launch_child (endpoint_);
-   endpoints.insert (std::make_pair (std::string (addr_), endpoint_));
+   endpoints.insert (endpoints_t::value_type (std::string (addr_),

int zmq::socket_base_t::term_endpoint (const char *addr_)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120520/85174ace/attachment.htm>

More information about the zeromq-dev mailing list