fltrdr icon indicating copy to clipboard operation
fltrdr copied to clipboard

Incompatible with lower version Macos(High Sierra)

Open hei-threebody opened this issue 6 years ago • 1 comments

/tmp/fltrdr/./src/ob/timer.hh:112:25: error: call to unavailable member function 'value': introduced in macOS 10.14 auto const t = pstr.value(); ~~~~~^~~~~ /usr/local/Cellar/llvm/8.0.0/bin/../include/c++/v1/optional:938:33: note: candidate function has been explicitly made unavailable constexpr value_type const& value() const& ^ /usr/local/Cellar/llvm/8.0.0/bin/../include/c++/v1/optional:947:27: note: candidate function not viable: 'this' argument has type 'const std::__1::optional<std::__1::vector<std::__1::basic_string, std::__1::allocator<std::__1::basic_string > > >', but method is not marked const constexpr value_type& value() & ^ /usr/local/Cellar/llvm/8.0.0/bin/../include/c++/v1/optional:956:28: note: candidate function not viable: 'this' argument has type 'const std::__1::optional<std::__1::vector<std::__1::basic_string, std::__1::allocator<std::__1::basic_string > > >', but method is not marked const constexpr value_type&& value() && ^ /usr/local/Cellar/llvm/8.0.0/bin/../include/c++/v1/optional:965:34: note: candidate function not viable: no known conversion from 'const optional<...>' to 'const optional<...>' for object argument constexpr value_type const&& value() const&& ^

hei-threebody avatar Oct 05 '19 22:10 hei-threebody

Hey @hei-threebody, it looks like the C++ standard library being used doesn't fully support C++17. Even though LLVM 8.0.0 supports C++17, I think it may still be linking to Apple's LLVM libc++ library, which doesn't support all of C++17. This is a known issue unfortunately with older versions of macOS.

If you don't mind installing GCC from Brew, try following the macOS build section of the README.md.

To use LLVM's libc++, you could try changing the following line in the CMakeLists.txt file:

# Replace <brew-prefix> with the result of running `brew --prefix` in a shell.
set (RELEASE_LINK_FLAGS "-s -O3 -flto -L<brew-prefix>/opt/llvm/lib -Wl,-rpath,<brew-prefix>/opt/llvm/lib")

I'd recommend the GCC way, as it has been confirmed to work for other macOS users. The second approach is based off of some quick research I did, but I don't have any way to test it.

Let me know how it goes and if you have any other questions!

octobanana avatar Oct 09 '19 00:10 octobanana