[bug] Macos build with generator Xcode throw error
See original GitHub issueEnvironment Details (include every applicable attribute)
- Operating System+version: macos catalina
- Compiler+version: 12
- Conan version: 1.33.1
- Python version: 3.7
Steps to reproduce (Include if Applicable)
Calling build()
Re-run cmake no build system arguments
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
CMake Error at CMakeLists.txt:20 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:20 (project):
No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred!
See also "/Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/build/macos_app/Debug/x86_64/target/CMakeFiles/CMakeOutput.log".
ERROR: conanfile.py (macos_app/1.0.0): Error in build() method, line 61
cmake.configure()
ConanException: Error 1 while executing cd '/Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/build/macos_app/Debug/x86_64/target' && cmake -G "Xcode" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk" -DCMAKE_SYSTEM_VERSION="10.9" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.9" -DCONAN_IN_LOCAL_CACHE="OFF" -DCONAN_COMPILER="apple-clang" -DCONAN_COMPILER_VERSION="12.0" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libc++" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/build/macos_app/Debug/x86_64/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_BUILD_TYPE="Debug" -DPROJECT_CONFIG_NAME="ubook" -DPROJECT_CONFIG_VERSION="2.0.7" -DPROJECT_CONFIG_ARCH="x86_64" -Wno-dev '/Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/files/targets/macos_app/cmake'
COMMAND: conan build /Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/files/targets/macos_app/conan/recipe/conanfile.py --source-folder /Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/files/targets/macos_app/cmake --build-folder /Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/build/macos_app/Debug/x86_64/target --install-folder /Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/build/macos_app/Debug/x86_64/conan
WORKING DIR: /Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/build/macos_app/Debug/x86_64/target
[ERROR] Command execution has failed
My conanfile:
def build(self):
cmake = CMake(self, generator='Xcode')
cmake.configure()
cmake.build()
If i removed “, generator=‘Xcode’” it works.
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (13 by maintainers)
Top Results From Across the Web
help!! can not generate code for intents in xcode13 beta
Please try installing Xcode 13 beta 2, and compiling one of our sample code projects. If that still fails, please file a bug...
Read more >CPPLib_log error when building with Xcode - Swift Forums
I'm trying to build Swift with Xcode following the Getting Started Guide. ... The error I get is the following: ... macOS BigSur...
Read more >MacPorts Guide
MacPorts is an easy to use system for compiling, installing, and managing open source software. MacPorts may be conceptually divided into two main...
Read more >xcode - Build ceres-solver as static library for Mac Catalyst
My cmake configuration was correct however apparently there is a bug with using XCode as the code generator (in here -G"$GENERATOR_NAME" ).
Read more >Getting Started with the LLVM System
This is an example workflow and configuration to get and build the LLVM source ... On macOS, you should have a sufficiently modern...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi,
I have installed cmake exactly 3.19.0:
Set the minimum to 3.19.
And it work:
But what the problem?
It works with CMake 3.19. I will close.