Boost C++ Libraries: Ticket #13241: thread/pthread/timespec.hpp compilation failure on OSX El Capitan (1.65.1) https://svn.boost.org/trac10/ticket/13241 <p> We are getting compilation failures on Travis with osx, default compilers, using brew to install boost. full log is here <a class="ext-link" href="https://api.travis-ci.org/jobs/282405991/log.txt?deansi=true"><span class="icon">​</span>https://api.travis-ci.org/jobs/282405991/log.txt?deansi=true</a> but the error is </p> <pre class="wiki">In file included from /Users/travis/build/CCPPETMR/SIRF-SuperBuild/Gadgetron/toolboxes/python/python_toolbox.cpp:11: In file included from /usr/local/include/boost/thread/mutex.hpp:16: In file included from /usr/local/include/boost/thread/pthread/mutex.hpp:22: /usr/local/include/boost/thread/pthread/timespec.hpp:79:12: error: no member named 'clock_gettime' in the global namespace; did you mean 'ACE_OS::clock_gettime'? if ( ::clock_gettime( CLOCK_MONOTONIC, &amp;ts ) ) ^~ /usr/local/include/ace/OS_NS_time.inl:58:9: note: 'ACE_OS::clock_gettime' declared here ACE_OS::clock_gettime (clockid_t clockid, struct timespec *ts) </pre><p> Everything was fine with boost 1.63.0. timespec seems to have been changed in 1.64.0. Possibly the preprocessor logic in the config is wrong? </p> <p> sorry, I don't have a Mac so cannot test this fully. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13241 Trac 1.4.3 viboes Wed, 04 Oct 2017 21:46:00 GMT owner, status changed https://svn.boost.org/trac10/ticket/13241#comment:1 https://svn.boost.org/trac10/ticket/13241#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> It is weird. I develop Boost.Thread using OSX El Capitan 10.11.4 and I never had any similar issue. </p> <p> Thanks for the information about when this was working and when not. </p> <p> Oh, I see it now </p> <p> the code is </p> <pre class="wiki">#if defined BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC inline timespec timespec_now_monotonic() { timespec ts; if ( ::clock_gettime( CLOCK_MONOTONIC, &amp;ts ) ) { ts.tv_sec = 0; ts.tv_nsec = 0; BOOST_ASSERT(0 &amp;&amp; "Boost::Thread - Internal Error"); } return ts; } #endif </pre><p> This was a failed trial to use condition variables with monotonic clocks. BTW, Mac Os doesn't provide condition variables with monotonic clocks </p> <p> Are you defining BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC? If yes, please don't do it :) </p> <p> The code should work as before introducing this regression. </p> <p> We are working on this, see <a class="ext-link" href="https://github.com/boostorg/thread/pull/142"><span class="icon">​</span>https://github.com/boostorg/thread/pull/142</a>. Hopping we will have this ready for boost-1.66. </p> Ticket viboes Mon, 09 Oct 2017 23:12:31 GMT type changed https://svn.boost.org/trac10/ticket/13241#comment:2 https://svn.boost.org/trac10/ticket/13241#comment:2 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Support Requests</span> </li> </ul> <p> Moved to support until we know the context. Are you defining BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC? </p> Ticket viboes Tue, 14 Nov 2017 20:46:32 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/13241#comment:3 https://svn.boost.org/trac10/ticket/13241#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">obsolete</span> </li> </ul> <p> Closed as there is no follow up. </p> <p> You will need to wait for Boost 1.67 as the cited branch is not yet ready. </p> Ticket