Problems when try compiler for iOS on Apple M1
Environment Details (include every applicable attribute)
- Operating System+version: macos mojave m1 processor
- Compiler+version: clang 13
- Conan version: latest
- Python version: 3.9
Steps to reproduce (Include if Applicable)
git clone https://github.com/nativium/nativium.git
cd nativium
python3 nativium.py conan setup
python3 nativium.py target ios setup
python3 nativium.py target ios build
Logs (Executed commands with output) (Include/Attach if Applicable)
Hi, i have some problems when try use conan in M1. I don't know if is a conan problem or cmake problem. I tried different cmake versions, but the error is the same:
python3 nativium.py target ios build
[INFO] Running "build" on target "ios"...
[INFO] Building for: armv7/Debug...
Using lockfile: '/Users/paulo/Developer/workspaces/nativium/build/ios/Debug/ios/armv7/conan/conan.lock'
Using cached profile from lockfile
conanfile.py (nativium/None): Calling build()
CMake Error at /opt/homebrew/Cellar/cmake/3.23.2/share/cmake/Modules/Platform/iOS-Initialize.cmake:4 (message):
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
is not an iOS SDK
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.23.2/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:21 (include)
CMakeLists.txt:53 (project)
-- Configuring incomplete, errors occurred!
See also "/Users/paulo/Developer/workspaces/nativium/build/ios/Debug/ios/armv7/target/CMakeFiles/CMakeOutput.log".
ERROR: conanfile.py (nativium/None): Error in build() method, line 91
cmake.configure()
ConanException: Error 1 while executing cd '/Users/paulo/Developer/workspaces/nativium/build/ios/Debug/ios/armv7/target' && cmake -G "Xcode" -DCMAKE_OSX_ARCHITECTURES="armv7" -DCMAKE_SYSTEM_NAME="iOS" -DCMAKE_SYSTEM_VERSION="9.0" -DCMAKE_OSX_DEPLOYMENT_TARGET="9.0" -DCONAN_IN_LOCAL_CACHE="OFF" -DCONAN_COMPILER="apple-clang" -DCONAN_COMPILER_VERSION="13" -DCONAN_LIBCXX="libc++" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/Users/paulo/Developer/workspaces/nativium/build/ios/Debug/ios/armv7/target/package" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCONAN_CMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="BOTH" -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE="BOTH" -DNATIVIUM_DEPLOYMENT_TARGET="9.0" -DNATIVIUM_PLATFORM_ARCH="armv7" -DCMAKE_BUILD_TYPE="Debug" -DNATIVIUM_PROJECT_NAME="nativium" -DNATIVIUM_PRODUCT_NAME="Nativium" -DNATIVIUM_ARCH="armv7" -DNATIVIUM_GROUP="ios" -DNATIVIUM_TARGET="ios" -DNATIVIUM_BUILD_TYPE="Debug" -DNATIVIUM_VERSION="1.0.0" -DNATIVIUM_VERSION_CODE="1" -DNATIVIUM_ENTRYPOINT="" -Wno-dev '/Users/paulo/Developer/workspaces/nativium'
COMMAND: conan build /Users/paulo/Developer/workspaces/nativium/conan/recipe/conanfile.py --source-folder /Users/paulo/Developer/workspaces/nativium --build-folder /Users/paulo/Developer/workspaces/nativium/build/ios/Debug/ios/armv7/target --install-folder /Users/paulo/Developer/workspaces/nativium/build/ios/Debug/ios/armv7/conan
WORKING DIR: /Users/paulo/Developer/workspaces/nativium/build/ios/Debug/ios/armv7/target
[ERROR] Command execution has failed
I tried from cmake 3.20 to latest (3.23) and the error is the same.
I works on every machine x86_64, and this problem only start happen now on our new macbook with Apple M1 (armv8) processor.
Thanks for any help.