Project

General

Profile

Actions

Bug #2082

closed

WebSocket-related code cannot compile on OS X Yosemite

Added by Wentao Shang over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Faces
Target version:
Start date:
10/20/2014
Due date:
% Done:

100%

Estimated time:

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.

Actions #1

Updated by Junxiao Shi over 9 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.

Actions #2

Updated by Alex Afanasyev over 9 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.

Actions #3

Updated by Wentao Shang over 9 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}

Actions #4

Updated by Alex Afanasyev over 9 years ago

Is this make_shared(*io_service) part of websocket?

if so, try to add ref() around *io_service

Actions #5

Updated by Wentao Shang over 9 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?

Actions #6

Updated by Wentao Shang over 9 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.

Actions #7

Updated by Wentao Shang over 9 years ago

  • Status changed from New to Code review
  • % Done changed from 0 to 50
Actions #8

Updated by Wentao Shang over 9 years ago

  • Assignee set to Wentao Shang
Actions #9

Updated by Junxiao Shi over 9 years ago

This issue affects OSX 10.9 as well. The patch 306df5eeac997fec0f19d7f5a16249e3a5ebb19d fixes the problem.

Actions #10

Updated by Junxiao Shi over 9 years ago

  • Status changed from Code review to Closed
  • % Done changed from 50 to 100
Actions

Also available in: Atom PDF