Skip to content
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

Can not compile the tests, on Mac Big Sur, clang v12, CMake 3.19.1, boost v1.74.0 #140

Open
kylelee opened this issue Nov 27, 2020 · 2 comments

Comments

@kylelee
Copy link

kylelee commented Nov 27, 2020

Can not compile on Mac Big Sur, clang v12, CMake 3.19.1
I tried to fix it, but i failed.
The document should update:

 cmake -Bbuild -DQUANTUM_ENABLE_TESTS=ON   .
-- CMAKE_CXX_FLAGS = -Wall -Wextra -O0 -m64 -std=c++17 -ftemplate-backtrace-limit=0 -faligned-new
-- Doxygen configuration files have not been generated. Use QUANTUM_BUILD_DOC=ON to generate them.
-- Boost include dir: /usr/local/include
-- Boost library dir: /usr/local/lib
-- Boost use static libs: ON
-- Boost is multi-threaded: ON
-- Boost libraries: Boost::context
-- Adding target 'quantum_tests' to build output
-- SOURCE_FILES = /Users/kyle/projects/quantum/tests/quantum_coro_ranges_tests.cpp;/Users/kyle/projects/quantum/tests/quantum_id_tests.cpp;/Users/kyle/projects/quantum/tests/quantum_locks_tests.cpp;/Users/kyle/projects/quantum/tests/quantum_sequencer_tests.cpp;/Users/kyle/projects/quantum/tests/quantum_tests.cpp
-- INCLUDE_DIRECTORIES = /usr/local/include;/Users/kyle/projects/quantum;/Users/kyle/projects/quantum/tests;/usr/local/include
-- LINK_DIRECTORIES = /usr/local/lib;/usr/local/lib
-- PROJECT_SOURCE_DIR = /Users/kyle/projects/quantum/
-- CMAKE_INSTALL_PREFIX = /usr/local
-- QUANTUM_PKGCONFIG_DIR = share/pkgconfig
-- BOOST_ROOT =
-- REQUIRED BOOST_VERSION = 1.61
-- GTEST_ROOT =
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/kyle/projects/quantum/build

and I use the "fixed" make test command here :

make QuantumTests && ctest 

and I got those errors:

[ 16%] Building CXX object tests/CMakeFiles/QuantumTests.dir/quantum_coro_ranges_tests.cpp.o
In file included from /Users/kyle/projects/quantum/tests/quantum_coro_ranges_tests.cpp:17:
...
In file included from /Users/kyle/projects/quantum/quantum/quantum_contiguous_pool_manager.h:142:
/Users/kyle/projects/quantum/quantum/impl/quantum_contiguous_pool_manager_impl.h:44:19: error: no member named 'reinterpret_pointer_cast' in
      namespace 'std'
    _control(std::reinterpret_pointer_cast<Control>(other._control))

maybe the wrong cxx flags ?
but i confirmed that CMAKE_CXX_FLAGS has -std=c++17

@accelerated
Copy link
Contributor

@kylelee Sorry just saw this. Did you manage to get this working? I can take a look otherwise...

@sptrakesh
Copy link

sptrakesh commented Jun 13, 2021

Have the same issue on Catalina. std::reinterpret_pointer_cast is a C++20 feature and missing on Apple clang.

no template named 'reinterpret_pointer_cast' in namespace 'std'; did you mean 'boost::reinterpret_pointer_cast'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants