Bug #2082
closedWebSocket-related code cannot compile on OS X Yosemite
100%
Description
This is due to a bug in the websocketpp library that causes compatibility problem with Yosemite. The development branch of the library fixed the problem but it is not merged to the release branch yet.
Updated by Junxiao Shi about 10 years ago
- Subject changed from WebSocket-related code cannot compile on Mac OS X Yosemite to WebSocket-related code cannot compile on OS X Yosemite
- Category set to Faces
- Target version set to v0.3
Yosemite is not yet a supported platform, but it soon will be.
For this issue, I think we'd just wait for websocket++ to merge that commit.
Updated by Alex Afanasyev about 10 years ago
I would suggest that we:
- fork websockets repo to named-data (so, in case code in zyphond's branch will be deleted, we will not be affected)
- point to the development commit, so the code compiles on OS X Yosemite
I wouldn't expect it to be merged anytime soon, given the previous release cycle. We have used unreleased code in the past, and no reason to wait for the release when/if the fix is already available.
Updated by Wentao Shang about 10 years ago
I tried to update websocketpp to the latest commit but still could not compile NFD on Yosemite. Here is the error output:
In file included from :178:
In file included from /Users/wentao/Github/NFD/build/../common.hpp:49:
In file included from /usr/local/include/ndn-cxx/common.hpp:113:
In file included from /opt/local/include/boost/make_shared.hpp:15:
In file included from /opt/local/include/boost/smart_ptr/make_shared.hpp:15:
/opt/local/include/boost/smart_ptr/make_shared_object.hpp:808:17: error: no matching constructor for initialization of 'boost::asio::basic_stream_socket >'
::new( pv ) T( a1 );
^ ~~
/Users/wentao/Github/NFD/websocketpp/websocketpp/transport/asio/security/none.hpp:167:25: note: in instantiation of function template specialization 'boost::make_shared >, boost::asio::io_service>' requested here
m_socket = lib::make_sharedboost::asio::ip::tcp::socket(*service);
^
/opt/local/include/boost/asio/basic_stream_socket.hpp:46:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const boost::asio::io_service' to 'const boost::asio::basic_stream_socket >' for 1st argument
class basic_stream_socket
^
/opt/local/include/boost/asio/basic_stream_socket.hpp:72:12: note: candidate constructor not viable: 1st argument ('const boost::asio::io_service') would lose const qualifier
explicit basic_stream_socket(boost::asio::io_service& io_service)
^
/opt/local/include/boost/asio/basic_stream_socket.hpp:89:3: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
basic_stream_socket(boost::asio::io_service& io_service,
^
/opt/local/include/boost/asio/basic_stream_socket.hpp:110:3: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
basic_stream_socket(boost::asio::io_service& io_service,
^
/opt/local/include/boost/asio/basic_stream_socket.hpp:130:3: note: candidate constructor not viable: requires 3 arguments, but 1 was provided
basic_stream_socket(boost::asio::io_service& io_service,
^
1 error generated.
Waf: Leaving directory `/Users/wentao/Github/NFD/build'
Build failed
-> task in 'daemon-objects' failed (exit status 1):
{task 4396349136: cxx face-manager.cpp -> face-manager.cpp.3.o}
Updated by Alex Afanasyev about 10 years ago
Is this make_shared(*io_service) part of websocket?
if so, try to add ref() around *io_service
Updated by Wentao Shang about 10 years ago
Interesting thing is, I have almost the same code in wsproxy-cpp and it compiled well on Yosemite. I suspect there is namespace collision going on: both websocketpp and ndn-cxx defined "lib::make_shared". Will that be a (potential) cause of the problem?
Updated by Wentao Shang about 10 years ago
After talking with Alex, I think the problem may go away once we switched to use C++11 standard. I'll wait for changes 1335 and 1191 to be merged and then test again.
Updated by Wentao Shang about 10 years ago
- Status changed from New to Code review
- % Done changed from 0 to 50
Updated by Junxiao Shi about 10 years ago
This issue affects OSX 10.9 as well. The patch 306df5eeac997fec0f19d7f5a16249e3a5ebb19d
fixes the problem.
Updated by Junxiao Shi about 10 years ago
- Status changed from Code review to Closed
- % Done changed from 50 to 100