Can not compile the tests, on Mac Big Sur, clang v12, CMake 3.19.1, boost v1.74.0
- Dominant language
- C++
- Stars
- 639
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
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(other._control))
```
maybe the wrong cxx flags ?
but i confirmed that CMAKE_CXX_FLAGS has -std=c++17
Contributor guide
Research direction
Start by reproducing the reported command with the listed Mac Big Sur, Clang 12, CMake 3.19.1, and Boost 1.74.0 setup. Read tests/quantum_coro_ranges_tests.cpp and quantum/impl/quantum_contiguous_pool_manager_impl.h around the reported error, then verify the QuantumTests target builds and ctest completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, macos
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100