-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSX: Building with xcode8 / 10.12 results in missing clock_gettime symbol #3297
Comments
With #3284 merged, I guess this is solved? Closing under this assumption. Feel free to re-open otherwise. |
Could you follow up and check upstream with Boost if they're aware of the issue? |
Replicated this locally on OS X 10.11 with xcode8:
And this testcase: #include <iostream>
#include <boost/interprocess/detail/os_thread_functions.hpp>
int main() {
boost::interprocess::ipcdetail::get_current_system_highres_count();
std::clog << "hello" << "\n";
return 0;
} Compiled liked: $ clang++ -o t t.cpp -Imason_packages/headers/boost/1.61.0/include/ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -Wl,-bind_at_load
$ ./t
dyld: Symbol not found: _clock_gettime
Referenced from: /Users/dane/projects/osrm-backend/./t (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib
in /Users/dane/projects/osrm-backend/./t
Trace/BPT trap: 5 There are a few workarounds I've found so far:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d3dc45..88342fd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -296,8 +296,7 @@ endif()
# Configuring other platform dependencies
if(APPLE)
- set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10")
- execute_process(COMMAND xcrun --sdk macosx --show-sdk-path OUTPUT_VARIABLE CMAKE_OSX_SYSROOT OUTPUT_STRIP_TRAILING_WHITESPACE)
+ unset(CMAKE_OSX_DEPLOYMENT_TARGET)
set(CMAKE_OSX_ARCHITECTURES "x86_64")
message(STATUS "Set Architecture to x64 on OS X")
exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION) |
Because this problem goes away when upgrading to OS X 10.12 I think this is low priority. But if I have time I'll try to patch boost interprocess to see if that is another way to workaround. |
#3347 solves this. Low priority to merge, but seems like a good idea to ensure we are working okay on 10.12 (as users start upgrading to it). |
Tracked upstream: https://svn.boost.org/trac/boost/ticket/12617 |
Closing as not actionable on our side. |
I'll also note: this only impacts the compile/link of |
Back here to say:
Looks like this can also impact downstream deps like node-osrm per Project-OSRM/node-osrm#303
This bug looks fixed 4 weeks ago, so perhaps when boost 1.64 comes out we'll have another workaround. But overall I don't see this as critical to fix and okay to keep closed. |
Using
osx_image: xcode8
instead ofosx_image: xcode7.3
on travis will trigger this error:The text was updated successfully, but these errors were encountered: