Opened 5 years ago
Closed 5 years ago
#13241 closed Support Requests (obsolete)
thread/pthread/timespec.hpp compilation failure on OSX El Capitan (1.65.1)
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | thread |
Version: | Boost 1.65.0 | Severity: | Showstopper |
Keywords: | osx | Cc: |
Description
We are getting compilation failures on Travis with osx, default compilers, using brew to install boost. full log is here https://api.travis-ci.org/jobs/282405991/log.txt?deansi=true but the error is
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, &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)
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?
sorry, I don't have a Mac so cannot test this fully.
Change History (3)
comment:1 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 5 years ago
Type: | Bugs → Support Requests |
---|
Moved to support until we know the context. Are you defining BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC?
comment:3 by , 5 years ago
Resolution: | → obsolete |
---|---|
Status: | assigned → closed |
Closed as there is no follow up.
You will need to wait for Boost 1.67 as the cited branch is not yet ready.
It is weird. I develop Boost.Thread using OSX El Capitan 10.11.4 and I never had any similar issue.
Thanks for the information about when this was working and when not.
Oh, I see it now
the code is
This was a failed trial to use condition variables with monotonic clocks. BTW, Mac Os doesn't provide condition variables with monotonic clocks
Are you defining BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC? If yes, please don't do it :)
The code should work as before introducing this regression.
We are working on this, see https://github.com/boostorg/thread/pull/142. Hopping we will have this ready for boost-1.66.