Undefined symbol "boost::this_thread::interruption_point()"

Open
#376 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp

Research direction

Start with the examples/sip_client build and the reported boost::this_thread::sleep call, then inspect the CMake link configuration for the Boost versions and macOS environment described. Reproduce the x86_64 linker failure and verify that the sip_client example links and builds successfully without the undefined symbols.

Written by the indexing model from the issue text.

Description

I'm using this library:
https://docs.websocketpp.org/faq.html

All the examples will build except one (https://github.com/zaphoyd/websocketpp/tree/master/examples/sip_client).
The one that does not build has one line it fails on which is the following line:

boost::this_thread::sleep(boost::posix_time::milliseconds(100));

Which gives the following error:

Undefined symbols for architecture x86_64:
  "boost::this_thread::interruption_point()", referenced from:
      boost::condition_variable::wait(boost::unique_lock<boost::mutex>&) in sip_client.cpp.o
      boost::condition_variable::do_wait_until(boost::unique_lock<boost::mutex>&, boost::detail::real_platform_timepoint const&) in sip_client.cpp.o
  "boost::detail::get_current_thread_data()", referenced from:
      boost::detail::interruption_checker::interruption_checker(_opaque_pthread_mutex_t*, _opaque_pthread_cond_t*) in sip_client.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/sip_client] Error 1
make[1]: *** [examples/sip_client/CMakeFiles/sip_client.dir/all] Error 2
make: *** [all] Error 2

I tried it with boost 1_39_0, 1_46_1 and 1_80_0.

I'm on OSX 10.15.7. Let me know if I can help in any way.

Dominant language
C++
Stars
213
Forks
171
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/thread

All issues in boostorg/thread

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.