You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ghoshkaj noticed that include/util/indexed_data.hpp will not compile with clang++ via xcode 7 on circleci's OS X infrastructure over at Project-OSRM/node-osrm#296 (comment). The workaround was to upgrade to xcode 8 on circle. This issue stands to track the underlying issue and decide how to avoid it in the future.
The problem appears that code which landed in #3585 will not compile on all versions of OS X.
$ clang++ testcase.cpp
testcase.cpp:16:61: error: invalid use of non-static data member 'offset'returnstd::numeric_limits<decltype(BlockReference::offset)>::max();
~~~~~~~~~~~~~~~~^~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:605:36: note: expanded from macro 'decltype'# define decltype(__x) __decltype(__x)
^~~
1 error generated.
I can workaround by adding the -std=c++1y or -std=c++11 flag.
I see this behavior with this version of clang++ and xcode:
$ clang++ -v
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ xcodebuild -version
Xcode 8.2.1
Build version 8C1002
I presume what is happening is that despite the -std=c++1y being added in the osrm-backend builds, the clang++ version in xcode 7 must be missing some C++11 support.
Next steps:
Run this test on older OS X, narrow down the issue
Consider adding a cmake configure check to ensure a working clang++/xcode version is available, rather than suffering from a compiler error later on
@ghoshkaj noticed that
include/util/indexed_data.hpp
will not compile with clang++ via xcode 7 on circleci's OS X infrastructure over at Project-OSRM/node-osrm#296 (comment). The workaround was to upgrade to xcode 8 on circle. This issue stands to track the underlying issue and decide how to avoid it in the future.The problem appears that code which landed in #3585 will not compile on all versions of OS X.
I was able to replicate with this testcase:
I can workaround by adding the
-std=c++1y
or-std=c++11
flag.I see this behavior with this version of clang++ and xcode:
I presume what is happening is that despite the
-std=c++1y
being added in the osrm-backend builds, the clang++ version in xcode 7 must be missing some C++11 support.Next steps:
/cc @danpat
The text was updated successfully, but these errors were encountered: