Can not compile on Mac
killme2008 opened this issue · 1 comments
killme2008 commented
Show error as below:
$ make
==> erlang_multi_pollset (clean)
==> erlang_multi_pollset (compile)
c++ -g -Wall -O2 -fno-strict-aliasing -DEV_STANDALONE -I./ -I/usr/local/Cellar/erlang/19.1/lib/erlang/erts-8.1/include -fPIC -dynamiclib -undefined dynamic_lookup -c raw_socket.cpp
clang: warning: argument unused during compilation: '-dynamiclib'
clang: warning: argument unused during compilation: '-undefined dynamic_lookup'
raw_socket.cpp:751:40: error: use of undeclared identifier 'SOCK_CLOEXEC'
fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0);
^
raw_socket.cpp:1189:37: error: use of undeclared identifier 'MSG_NOSIGNAL'
int sent = send(fd, p, len, MSG_NOSIGNAL);
^
raw_socket.cpp:1356:37: error: use of undeclared identifier 'MSG_NOSIGNAL'
sent = sendmsg(fd, &msghdr, MSG_NOSIGNAL);
^
raw_socket.cpp:2351:38: error: target exception specification is not superset of source
ev_set_loop_release_cb(ps->loop, l_release, l_acquire);
^
4 errors generated.
make[1]: *** [raw_socket.o] Error 1
ERROR: Command [compile] failed!
make: *** [compile] Error 1
yy-chen commented
mac use clang, you should use gcc.