Fix build on Apple Silicon Mac#219
Conversation
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
|
PTAL @yiwu-arbug |
| endif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le") | ||
|
|
||
| if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64") | ||
| if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64|arm64") |
There was a problem hiding this comment.
why the original PR of rocksdb doesn't have this problem?
There was a problem hiding this comment.
The developer of that PR uses an early DTK. The CPU of the DTK is different from an M1.
I don't know if it's due to system or CPU updates, however.
Signed-off-by: yiwu-arbug <yiwu@pingcap.com>
Signed-off-by: yiwu-arbug <yiwu@pingcap.com>
Signed-off-by: yiwu-arbug <yiwu@pingcap.com>
|
arm build fails, haven't check what's the cause. |
Do the same cmake change in tikv/rocksdb#219 Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
|
Backport facebook#5745 to fix the CI failure. |
This error still exists in upstream: facebook#6236. Can we ignore running platform-dependent tests on CI now like what upstream does? @yiwu-arbug |
|
Friendly ping @yiwu-arbug @Connor1996 |
|
Please merge this for Apple M1 🌚 |
Signed-off-by: Yilin CHen <sticnarf@gmail.com>
Signed-off-by: Yilin CHen <sticnarf@gmail.com>
6c42618 to
7f24690
Compare
|
The test failed on CI probably because Travis uses LXD for arm64 by default. Now I switch the arm64 tests to use virtual machine. The test should now pass. @yiwu-arbug PTAL again, thanks! |
1. Backport facebook#7714 from upstream. 2. `uname -m` on the new Apple Silicon Mac outputs `arm64`. The ARMv8 CRC check in the cmake file is changed. 3. Do not treat arm darwin as iOS. With this PR, ` cmake .. -DWITH_GFLAGS=OFF -DWITH_TESTS=OFF -DWITH_TOOLS=OFF` outputs: ``` -- The C compiler identification is AppleClang 12.0.0.12000032 -- The CXX compiler identification is AppleClang 12.0.0.12000032 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- The ASM compiler identification is Clang -- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- Found Git: /usr/bin/git (found version "2.24.3 (Apple Git-128)") -- Performing Test HAVE_OMIT_LEAF_FRAME_POINTER -- Performing Test HAVE_OMIT_LEAF_FRAME_POINTER - Success -- Performing Test HAS_ARMV8_CRC -- Performing Test HAS_ARMV8_CRC - Success -- HAS_ARMV8_CRC yes -- Performing Test HAVE_SSE42 -- Performing Test HAVE_SSE42 - Failed -- Performing Test HAVE_THREAD_LOCAL -- Performing Test HAVE_THREAD_LOCAL - Success -- Enabling RTTI in Debug builds only (default) -- Performing Test HAVE_FALLOCATE -- Performing Test HAVE_FALLOCATE - Failed -- Performing Test HAVE_SYNC_FILE_RANGE_WRITE -- Performing Test HAVE_SYNC_FILE_RANGE_WRITE - Failed -- Performing Test HAVE_PTHREAD_MUTEX_ADAPTIVE_NP -- Performing Test HAVE_PTHREAD_MUTEX_ADAPTIVE_NP - Failed -- Looking for malloc_usable_size -- Looking for malloc_usable_size - not found -- Looking for sched_getcpu -- Looking for sched_getcpu - not found -- Looking for getauxval -- Looking for getauxval - not found -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- JNI library is disabled -- Configuring done -- Generating done ``` And then, `make rocksdb -j4` succeeds. Signed-off-by: Yilin CHen <sticnarf@gmail.com> Co-authored-by: yiwu-arbug <yiwu@pingcap.com>
Do the same cmake change in tikv/rocksdb#219 Signed-off-by: Yilin Chen <sticnarf@gmail.com>
1. Backport facebook#7714 from upstream. 2. `uname -m` on the new Apple Silicon Mac outputs `arm64`. The ARMv8 CRC check in the cmake file is changed. 3. Do not treat arm darwin as iOS. With this PR, ` cmake .. -DWITH_GFLAGS=OFF -DWITH_TESTS=OFF -DWITH_TOOLS=OFF` outputs: ``` -- The C compiler identification is AppleClang 12.0.0.12000032 -- The CXX compiler identification is AppleClang 12.0.0.12000032 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- The ASM compiler identification is Clang -- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- Found Git: /usr/bin/git (found version "2.24.3 (Apple Git-128)") -- Performing Test HAVE_OMIT_LEAF_FRAME_POINTER -- Performing Test HAVE_OMIT_LEAF_FRAME_POINTER - Success -- Performing Test HAS_ARMV8_CRC -- Performing Test HAS_ARMV8_CRC - Success -- HAS_ARMV8_CRC yes -- Performing Test HAVE_SSE42 -- Performing Test HAVE_SSE42 - Failed -- Performing Test HAVE_THREAD_LOCAL -- Performing Test HAVE_THREAD_LOCAL - Success -- Enabling RTTI in Debug builds only (default) -- Performing Test HAVE_FALLOCATE -- Performing Test HAVE_FALLOCATE - Failed -- Performing Test HAVE_SYNC_FILE_RANGE_WRITE -- Performing Test HAVE_SYNC_FILE_RANGE_WRITE - Failed -- Performing Test HAVE_PTHREAD_MUTEX_ADAPTIVE_NP -- Performing Test HAVE_PTHREAD_MUTEX_ADAPTIVE_NP - Failed -- Looking for malloc_usable_size -- Looking for malloc_usable_size - not found -- Looking for sched_getcpu -- Looking for sched_getcpu - not found -- Looking for getauxval -- Looking for getauxval - not found -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- JNI library is disabled -- Configuring done -- Generating done ``` And then, `make rocksdb -j4` succeeds. Signed-off-by: Yilin CHen <sticnarf@gmail.com> Co-authored-by: yiwu-arbug <yiwu@pingcap.com>
uname -mon the new Apple Silicon Mac outputsarm64. The ARMv8 CRC check in the cmake file is changed.With this PR,
cmake .. -DWITH_GFLAGS=OFF -DWITH_TESTS=OFF -DWITH_TOOLS=OFFoutputs:And then,
make rocksdb -j4succeeds.