Closed bkloppenborg closed 11 years ago
This is a problem with the compiler rather than with liboi. We'll attempt to find a workaround.
The issue causing this is related to the development status of clang
. Clang 3.1x variants do not appear to have full support for the C++11 features liboi
uses. The solution for now is to use the features we need from libboost
rather than C++11. Once llvm-clang
3.2 is released and Apple clang / Xcode are updated, the workaround I discuss below will no longer be required.
Workaround (implemented in 18614ed8fa86d6f042c0b6e040c4c2693147c6f0):
Conditionally compile and link with libboost_threads
and libboost_system
to get access to boost::thread, boost:mutex, boost::shared_ptr
.
I have verified that the code compiles and executes correctly (via. unit tests) with llvm-clang
3.0, and boost 1.5.
Until Clang on Apple is updated to the latest development branch, the workaround is to use GCC 4.7x installed through macports. Documentation in the readme has been updated (thanks, Fabien!).
Report from Fabien. liboi will not compile using Xcode 4.5 on Mac OS 10.7. The version of
clang
that is shipped with Xcode does not appear to support the fullc++11
features required for liboi.Compiling with
clang --std=c++11 and --stdlib=libc++
gives:Compiling with
clang --std=c++11 and --stdlib=libc++
gives: