Cannot build properly on MacOS Big Sur 11.2.3 (Apple M1)
xwu64 opened this issue · 0 comments
xwu64 commented
Operating sytem: macOS Big Sure v11.2.3
CPU: Apple M1
Compiler:
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: arm64-apple-darwin20.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Commands and output:
> cmake -DCMAKE_BUILD_TYPE=RELEASE [PATH_OF_SOURCE_CODE]
> make -j4
[ 8%] Building CXX object CMakeFiles/cds.dir/src/urcu_sh.cpp.o
[ 8%] Building CXX object CMakeFiles/cds-s.dir/src/dhp.cpp.o
[ 16%] Building CXX object CMakeFiles/cds.dir/src/hp_thread_local.cpp.o
[ 12%] Building CXX object CMakeFiles/cds-s.dir/src/hp_thread_local.cpp.o
clang: warning: argument unused during compilation: '-mcx16' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mcx16' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mcx16' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mcx16' [-Wunused-command-line-argument]
/Users/xiaoliangwu/Workspace/libcds_source_code/src/hp_thread_local.cpp:39:46: error: invalid operands to binary expression
('cds::OS::posix::ThreadId' (aka '_opaque_pthread_t *') and 'int')
if (cds::OS::get_current_thread_id() % 2 == 0) { // % 2 with ThreadId structure?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
/Users/xiaoliangwu/Workspace/libcds_source_code/src/hp_thread_local.cpp:47:46: error: invalid operands to binary expression
('cds::OS::posix::ThreadId' (aka '_opaque_pthread_t *') and 'int')
if (cds::OS::get_current_thread_id() % 2 == 0) { // % 2 with ThreadId structure?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
/Users/xiaoliangwu/Workspace/libcds_source_code/src/hp_thread_local.cpp:39:46: error: invalid operands to binary expression
('cds::OS::posix::ThreadId' (aka '_opaque_pthread_t *') and 'int')
if (cds::OS::get_current_thread_id() % 2 == 0) { // % 2 with ThreadId structure?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
/Users/xiaoliangwu/Workspace/libcds_source_code/src/hp_thread_local.cpp:47:46: error: invalid operands to binary expression
('cds::OS::posix::ThreadId' (aka '_opaque_pthread_t *') and 'int')
if (cds::OS::get_current_thread_id() % 2 == 0) { // % 2 with ThreadId structure?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
2 errors generated.
2 errors generated.
make[2]: *** [CMakeFiles/cds-s.dir/src/hp_thread_local.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/cds.dir/src/hp_thread_local.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 20%] Building CXX object CMakeFiles/cds-s.dir/src/urcu_gp.cpp.o
clang: warning: argument unused during compilation: '-mcx16' [-Wunused-command-line-argument]
[ 25%] Building CXX object CMakeFiles/cds.dir/src/thread_data.cpp.o
clang: warning: argument unused during compilation: '-mcx16' [-Wunused-command-line-argument]
make[1]: *** [CMakeFiles/cds-s.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/cds.dir/all] Error 2
make: *** [all] Error 2