Build C++ Driver Failed on Mac

46 views
Skip to first unread message

Aaron Benz

unread,
Jan 22, 2015, 12:21:04 PM1/22/15
to cpp-dri...@lists.datastax.com
Running Yosemite. Installed dependencies with homebrew fine, and ran cmake, but make fails.

Aarons-MacBook-Pro-2:cpp-driver Aaron$ cmake .
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.8.9.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Aaron/myProgs/cpp-driver
Aarons-MacBook-Pro-2:cpp-driver Aaron$ make
[ 1%] Building CXX object CMakeFiles/cassandra.dir/src/address.cpp.o
/Users/Aaron/myProgs/cpp-driver/src/address.cpp:35:46: error: member reference base type 'int' is not a
structure or union
if (uv_inet_pton(AF_INET, ip.c_str(), &buf).code == UV_OK) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/Users/Aaron/myProgs/cpp-driver/src/address.cpp:35:55: error: use of undeclared identifier 'UV_OK'
if (uv_inet_pton(AF_INET, ip.c_str(), &buf).code == UV_OK) {
^
/Users/Aaron/myProgs/cpp-driver/src/address.cpp:37:33: error: no matching function for call to 'uv_ip4_addr'
struct sockaddr_in addr = uv_ip4_addr(ip.c_str(), port);
^~~~~~~~~~~
/usr/local/include/uv.h:1323:15: note: candidate function not viable: requires 3 arguments, but 2 were
provided
UV_EXTERN int uv_ip4_addr(const char* ip, int port, struct sockaddr_in* addr);
^
/Users/Aaron/myProgs/cpp-driver/src/address.cpp:41:54: error: member reference base type 'int' is not a
structure or union
} else if (uv_inet_pton(AF_INET6, ip.c_str(), &buf).code == UV_OK) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/Users/Aaron/myProgs/cpp-driver/src/address.cpp:41:63: error: use of undeclared identifier 'UV_OK'
} else if (uv_inet_pton(AF_INET6, ip.c_str(), &buf).code == UV_OK) {
^
/Users/Aaron/myProgs/cpp-driver/src/address.cpp:43:34: error: no matching function for call to 'uv_ip6_addr'
struct sockaddr_in6 addr = uv_ip6_addr(ip.c_str(), port);
^~~~~~~~~~~
/usr/local/include/uv.h:1324:15: note: candidate function not viable: requires 3 arguments, but 2 were
provided
UV_EXTERN int uv_ip6_addr(const char* ip, int port, struct sockaddr_in6* addr);
^
/Users/Aaron/myProgs/cpp-driver/src/address.cpp:59:33: error: no matching function for call to 'uv_ip4_addr'
struct sockaddr_in addr = uv_ip4_addr(buf, port);
^~~~~~~~~~~
/usr/local/include/uv.h:1323:15: note: candidate function not viable: requires 3 arguments, but 2 were
provided
UV_EXTERN int uv_ip4_addr(const char* ip, int port, struct sockaddr_in* addr);
^
/Users/Aaron/myProgs/cpp-driver/src/address.cpp:66:34: error: no matching function for call to 'uv_ip6_addr'
struct sockaddr_in6 addr = uv_ip6_addr(buf, port);
^~~~~~~~~~~
/usr/local/include/uv.h:1324:15: note: candidate function not viable: requires 3 arguments, but 2 were
provided
UV_EXTERN int uv_ip6_addr(const char* ip, int port, struct sockaddr_in6* addr);
^
8 errors generated.
make[2]: *** [CMakeFiles/cassandra.dir/src/address.cpp.o] Error 1
make[1]: *** [CMakeFiles/cassandra.dir/all] Error 2
make: *** [all] Error 2

Michael Penick

unread,
Jan 22, 2015, 1:40:48 PM1/22/15
to cpp-dri...@lists.datastax.com
It looks like you're building against libuv 1.0. Currently, the driver only support libuv 0.10. The OS X build instructions have been slightly out of date since the release of libuv 1.0. If you're using homebrew you can run the following:

sudo brew unlink libuv
sudo brew install libuv0

We will support both libuv 0.10 and libuv 1.0 in the next release. 

Mike

To unsubscribe from this group and stop receiving emails from it, send an email to cpp-driver-us...@lists.datastax.com.

Aaron Benz

unread,
Jan 22, 2015, 2:29:17 PM1/22/15
to cpp-dri...@lists.datastax.com
Perfect!!! That fixed it!
Reply all
Reply to author
Forward
0 new messages