ios-cmake
ios-cmake copied to clipboard
build error
I downloaded the project,
cd example/example-lib mkdir build cd build cmake .. -G Xcode -DCMAKE_TOOLCHAIN_FILE=../../ios.toolchain.cmake -DPLATFORM=OS64
Terminal error:
-- [DEFAULTS] Using explicit named language support! E.g., enable_language(CXX) is needed in the project files. -- [DEFAULTS] Enabling bitcode support by default. ENABLE_BITCODE not provided! -- [DEFAULTS] Enabling ARC support by default. ENABLE_ARC not provided! -- [DEFAULTS] Hiding symbols visibility by default. ENABLE_VISIBILITY not provided! -- [DEFAULTS] Using NON-strict compiler checks by default. ENABLE_STRICT_TRY_COMPILE not provided! -- Not setting any manual command-line buildflags, since Xcode is selected as generator. Modifying the Xcode build-settings directly instead. -- Configuring iphoneos build for platform: OS64, architecture(s): arm64 -- Using SDK: -- Using C compiler: -- Using CXX compiler: -- Using libtool: -- Using install name tool: -- Autoconf target triple: aarch64-apple-ios11.0 -- Using minimum deployment version: 11.0 (SDK version: ) -- Merging integrated CMake 3.14+ iOS,tvOS,watchOS,macOS toolchain(s) with this toolchain! -- Using Xcode version: -- CMake version: 3.23.2 -- Using a data_ptr size of: 8 -- Bitcode: Enabled -- ARC: Enabled -- Hiding symbols: Enabled CMake Error at /usr/local/Cellar/cmake/3.23.2/share/cmake/Modules/Platform/iOS-Initialize.cmake:4 (message): is not an iOS SDK Call Stack (most recent call first): /usr/local/Cellar/cmake/3.23.2/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:21 (include) CMakeLists.txt:2 (project)
Xcode Version is 13.4.1
macOS Monterey 12.4
It seems you are missing either Xcode or Command line Tools on your system. No compilers/tools could be found, which means either one of those (unless you are rocking LLDB self-compiled) is missing.
It seems you are missing either Xcode or Command line Tools on your system. No compilers/tools could be found, which means either one of those (unless you are rocking LLDB self-compiled) is missing.
But I'm using Xcode , what should I do about it?
What does xcode-select -p return?
xcode-select -p
/Library/Developer/CommandLineTools
when i reinstall commandlinetools
xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Reinstalling Xcode and CommandlineTools also does not work, the same error. Version has been rolled back to Xcode 13
It looks like a similar problem, but the environment has been reset https://github.com/leetal/ios-cmake/issues/148
Try running xcode-select -r. That should reset the tools to their default values. Please also note that a reboot is required after doing the reset.
Try running
xcode-select -r. That should reset the tools to their default values. Please also note that a reboot is required after doing the reset.
-- [DEFAULTS] Using explicit named language support! E.g., enable_language(CXX) is needed in the project files. -- Targeting minimum SDK version 11.0. Dropping 32-bit support. -- [DEFAULTS] Enabling bitcode support by default. ENABLE_BITCODE not provided! -- [DEFAULTS] Enabling ARC support by default. ENABLE_ARC not provided! -- [DEFAULTS] Hiding symbols visibility by default. ENABLE_VISIBILITY not provided! -- [DEFAULTS] Using NON-strict compiler checks by default. ENABLE_STRICT_TRY_COMPILE not provided! -- Not setting any manual command-line buildflags, since Xcode is selected as generator. Modifying the Xcode build-settings directly instead. -- Configuring iphoneos build for platform: OS64, architecture(s): arm64 -- Using SDK: -- Using C compiler: -- Using CXX compiler: -- Using libtool: -- Using install name tool: -- Autoconf target triple: aarch64-apple-ios11.0 -- Using minimum deployment version: 11.0 (SDK version: iPhoneOS15.0.sdk - iOS 15.0 (iphoneos15.0) SDKVersion: 15.0 Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk PlatformVersion: 15.0 PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform BuildID: 84856584-0587-11EC-B99C-6807972BB3D4 ProductBuildVersion: 19A339 ProductCopyright: 1983-2021 Apple Inc. ProductName: iPhone OS ProductVersion: 15.0
iPhoneSimulator15.0.sdk - Simulator - iOS 15.0 (iphonesimulator15.0) SDKVersion: 15.0 Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk PlatformVersion: 15.0 PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform BuildID: 84856584-0587-11EC-B99C-6807972BB3D4 ProductBuildVersion: 19A339 ProductCopyright: 1983-2021 Apple Inc. ProductName: iPhone OS ProductVersion: 15.0
DriverKit20.4.sdk - DriverKit 20.4 (driverkit.macosx20.4) SDKVersion: 20.4 Path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit20.4.sdk PlatformVersion: 11.3 PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
MacOSX11.3.sdk - macOS 11.3 (macosx11.3) SDKVersion: 11.3 Path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk PlatformVersion: 11.3 PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform ProductBuildVersion: 20E214 ProductCopyright: 1983-2021 Apple Inc. ProductName: macOS ProductUserVisibleVersion: 11.3 ProductVersion: 11.3 iOSSupportVersion: 14.5
AppleTVOS15.0.sdk - tvOS 15.0 (appletvos15.0) SDKVersion: 15.0 Path: /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS15.0.sdk PlatformVersion: 15.0 PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform BuildID: D557EAE4-0542-11EC-8A22-FF5D38C70CDB ProductBuildVersion: 19J344 ProductCopyright: 1983-2021 Apple Inc. ProductName: Apple TVOS ProductVersion: 15.0
AppleTVSimulator15.0.sdk - Simulator - tvOS 15.0 (appletvsimulator15.0) SDKVersion: 15.0 Path: /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator15.0.sdk PlatformVersion: 15.0 PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform BuildID: D557EAE4-0542-11EC-8A22-FF5D38C70CDB ProductBuildVersion: 19J344 ProductCopyright: 1983-2021 Apple Inc. ProductName: Apple TVOS ProductVersion: 15.0
WatchOS8.0.sdk - watchOS 8.0 (watchos8.0) SDKVersion: 8.0 Path: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.0.sdk PlatformVersion: 8.0 PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform BuildID: AA2C862E-03C9-11EC-82DD-D220B91DFBD3 ProductBuildVersion: 19R341 ProductCopyright: 1983-2021 Apple Inc. ProductName: Watch OS ProductVersion: 8.0
WatchSimulator8.0.sdk - Simulator - watchOS 8.0 (watchsimulator8.0) SDKVersion: 8.0 Path: /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator8.0.sdk PlatformVersion: 8.0 PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform BuildID: AA2C862E-03C9-11EC-82DD-D220B91DFBD3 ProductBuildVersion: 19R341 ProductCopyright: 1983-2021 Apple Inc. ProductName: Watch OS ProductVersion: 8.0
Xcode 13.0 Build version 13A233) -- Merging integrated CMake 3.14+ iOS,tvOS,watchOS,macOS toolchain(s) with this toolchain! -- Using Xcode version: -- CMake version: 3.23.2 -- Using a data_ptr size of: 8 -- Bitcode: Enabled -- ARC: Enabled -- Hiding symbols: Enabled CMake Error at /usr/local/Cellar/cmake/3.23.2/share/cmake/Modules/Platform/iOS-Initialize.cmake:4 (message): is not an iOS SDK Call Stack (most recent call first): /usr/local/Cellar/cmake/3.23.2/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:21 (include) CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred! See also "/Users/xxxxxxxx/Downloads/ios-cmake-master/example/example-lib/build/CMakeFiles/CMakeOutput.log". CMake Warning: Value of CMAKE_SYSTEM_VERSION contained a newline; truncating
hello leetal,
sudo xcode-select --reset ,
error again
Did you rm -rf your build directory and rebuild? I solved it by clearing it.
sudo xcode-select --switch /Applications/Xcode.app