bootstrap/iOS: CMake Error while checking type size
Attempting to bootstrap cmake on iOS 14.5.1 with root access (jailbroken), all size check failed like this:
-- Performing Curl Test HAVE_FSETXATTR_6 - Success
-- Check size of sa_family_t
CMake Error at Modules/CheckTypeSize.cmake:148 (try_compile):
Cannot copy output executable
''
to destination specified by COPY_FILE:
'/buildroot/cmake-3.25.2/CMakeFiles/CheckTypeSize/SIZEOF_SA_FAMILY_T.bin'
Recorded try_compile output location doesn't exist:
/buildroot/cmake-3.25.2/CMakeFiles/CMakeScratch/TryCompile-vWOvyt/cmTC_23101
Call Stack (most recent call first):
Modules/CheckTypeSize.cmake:278 (__check_type_size_impl)
Utilities/cmcurl/CMakeLists.txt:1271 (check_type_size)
Using LLVM 14 Clang
iPad:/buildroot/cmake-3.25.2 root# $CC -v
clang version 14.0.0 (https://github.com/apple/llvm-project 3dade082a9b1989207a7fa7f3975868485d16a49)
Target: arm64-apple-ios13.0
Thread model: posix
InstalledDir: /usr/lib/llvm-14/bin
I have already checked other similar issues but didn't find a proper solution for that
Steps to reproduce:
- get source tarbal and change working directory
./bootstrap --prefix=/usr --no-system-libs --datadir=/share/cmake --parallel=4 --docdir=/share/doc/cmake --mandir=/share/man --system-zlib --system-bzip2 -- -DCMake_INSTALL_BASH_COMP_DIR=/usr/share/bash-completion/completions -DCMake_BUILD_LTO=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_INSTALL_SYSCONFDIR=/etc