Skip to content

Instantly share code, notes, and snippets.

@a4z
Created August 10, 2020 08:04
Show Gist options
  • Save a4z/39c5f4c5bdaa92d4d680032cb8e9fad3 to your computer and use it in GitHub Desktop.
Save a4z/39c5f4c5bdaa92d4d680032cb8e9fad3 to your computer and use it in GitHub Desktop.
[settings]
os=iOS
arch=armv8
compiler=apple-clang
compiler.version=11.0
compiler.cppstd=17
build_type=Release
os.version=10.0
compiler.libcxx=libc++
[options]
ios-cmake:ios_target=OS64
paho-mqtt-c:asynchronous=True
paho-mqtt-c:ssl=True
paho-mqtt-cpp:ssl=True
[build_requires]
ios-cmake/3.1.2@
[env]
openssl:CFLAGS=-fembed-bitcode
CONAN_CMAKE_GENERATOR=Xcode
[settings]
os=Macos
os_build=Macos
arch=x86_64
arch_build=x86_64
compiler=apple-clang
compiler.version=11.0
compiler.libcxx=libc++
build_type=Release
[options]
[build_requires]
cmake/3.18.1@
[env]
# if the cmake-ios package is not used, cmake fails and shows an error with a path to the system howmebrew cmake
conan create --profile:build ecpbuildOSX --profile:host ecp2ios64 conan-center-index/recipes/paho-mqtt-cpp/all/ paho-mqtt-cpp/1.1@ --build missing --test-folder None
Exporting package recipe
paho-mqtt-cpp/1.1 exports: File 'conandata.yml' found. Exporting it...
paho-mqtt-cpp/1.1 exports: Copied 1 '.yml' file: conandata.yml
paho-mqtt-cpp/1.1 exports_sources: Copied 1 '.txt' file: CMakeLists.txt
paho-mqtt-cpp/1.1 exports_sources: Copied 5 '.patch' files
paho-mqtt-cpp/1.1: The stored package has not changed
paho-mqtt-cpp/1.1: Using the exported files summary hash as the recipe revision: d953314bdfa45ddfc52fb91e91fe3296
paho-mqtt-cpp/1.1: Exported revision: d953314bdfa45ddfc52fb91e91fe3296
Configuration (profile_host):
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=17
compiler.libcxx=libc++
compiler.version=11.0
os=iOS
os.version=10.0
[options]
ios-cmake:ios_target=OS64
paho-mqtt-c:asynchronous=True
paho-mqtt-c:ssl=True
paho-mqtt-cpp:ssl=True
[build_requires]
[env]
CONAN_CMAKE_GENERATOR=Xcode
openssl:CFLAGS=-fembed-bitcode
Configuration (profile_build):
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=11.0
os=Macos
os_build=Macos
[options]
[build_requires]
*: cmake/3.18.1
[env]
Installing package: paho-mqtt-cpp/1.1
Requirements
openssl/1.1.1g from local cache - Cache
paho-mqtt-c/1.3.1 from local cache - Cache
paho-mqtt-cpp/1.1 from local cache - Cache
Packages
openssl/1.1.1g:35ce17d25ab739fd2871e48e16b7fa0bce9c0697 - Cache
paho-mqtt-c/1.3.1:3bb4abf26216687100d12a390d36ad06f5e794b6 - Cache
paho-mqtt-cpp/1.1:e16053fbfc9cf754dd0447e682e98bca4532c943 - Build
Cross-build from 'Macos:x86_64' to 'iOS:armv8'
Installing (downloading, building) binaries...
openssl/1.1.1g: Already installed!
paho-mqtt-c/1.3.1: Already installed!
paho-mqtt-cpp/1.1: Copying sources to build folder
paho-mqtt-cpp/1.1: Building your package in /Users/a4z/.devconenv/dev/.conan/data/paho-mqtt-cpp/1.1/_/_/build/e16053fbfc9cf754dd0447e682e98bca4532c943
paho-mqtt-cpp/1.1: Generator cmake created conanbuildinfo.cmake
paho-mqtt-cpp/1.1: Calling build()
-- The C compiler identification is AppleClang 11.0.3.11030032
-- The CXX compiler identification is AppleClang 11.0.3.11030032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - broken
CMake Error at /usr/local/Cellar/cmake/3.18.0/share/cmake/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/a4z/.devconenv/dev/.conan/data/paho-mqtt-cpp/1.1/_/_/build/e16053fbfc9cf754dd0447e682e98bca4532c943/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/xcodebuild -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_3a7b1 -configuration Debug -hideShellScriptEnvironment && Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_3a7b1 -configuration Debug -hideShellScriptEnvironment
User defaults from command line:
HideShellScriptEnvironment = YES
Prepare build
note: Using legacy build system
=== BUILD TARGET cmTC_3a7b1 OF PROJECT CMAKE_TRY_COMPILE WITH CONFIGURATION Debug ===
Check dependencies
target specifies product type 'com.apple.product-type.tool', but there's no such product type for the 'iphoneos' platform
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "/Users/a4z/.devconenv/dev/.conan/data/paho-mqtt-cpp/1.1/_/_/build/e16053fbfc9cf754dd0447e682e98bca4532c943/CMakeFiles/CMakeOutput.log".
See also "/Users/a4z/.devconenv/dev/.conan/data/paho-mqtt-cpp/1.1/_/_/build/e16053fbfc9cf754dd0447e682e98bca4532c943/CMakeFiles/CMakeError.log".
paho-mqtt-cpp/1.1:
paho-mqtt-cpp/1.1: ERROR: Package 'e16053fbfc9cf754dd0447e682e98bca4532c943' build failed
paho-mqtt-cpp/1.1: WARN: Build folder /Users/a4z/.devconenv/dev/.conan/data/paho-mqtt-cpp/1.1/_/_/build/e16053fbfc9cf754dd0447e682e98bca4532c943
ERROR: paho-mqtt-cpp/1.1: Error in build() method, line 74
cmake = self._configure_cmake()
while calling '_configure_cmake', line 68
self._cmake.configure()
ConanException: Error 1 while executing cd '/Users/a4z/.devconenv/dev/.conan/data/paho-mqtt-cpp/1.1/_/_/build/e16053fbfc9cf754dd0447e682e98bca4532c943' && cmake -G "Xcode" -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk" -DCMAKE_SYSTEM_NAME="Darwin" -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.0" -DCONAN_CMAKE_CXX_STANDARD="17" -DCONAN_CMAKE_CXX_EXTENSIONS="OFF" -DCONAN_STD_CXX_FLAG="-std=c++17" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="apple-clang" -DCONAN_COMPILER_VERSION="11.0" -DCONAN_LIBCXX="libc++" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/Users/a4z/.devconenv/dev/.conan/data/paho-mqtt-cpp/1.1/_/_/package/e16053fbfc9cf754dd0447e682e98bca4532c943" -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" -DPAHO_BUILD_DOCUMENTATION="False" -DPAHO_BUILD_SAMPLES="False" -DPAHO_BUILD_STATIC="True" -DPAHO_BUILD_SHARED="False" -DPAHO_WITH_SSL="True" -Wno-dev '/Users/a4z/.devconenv/dev/.conan/data/paho-mqtt-cpp/1.1/_/_/build/e16053fbfc9cf754dd0447e682e98bca4532c943'
# The working part
conan create --profile:build ecpbuildOSX --profile:host ecp2ios64 conan-center-index/recipes/paho-mqtt-cpp/all/ paho-mqtt-cpp/1.1@ --build missing --test-folder None
# Now generate some cmake problem,
# Remove in ecp2ios64 the ios-cmake/3.1.2@
# I end up with (an expected) error
# but the message says
CMake Error at /usr/local/Cellar/cmake/3.18.0/share/cmake/Modules/CMakeTestCCompiler.cmake:66 (message):
# and now I wonder, why the path points to the cmake that comes with homebrew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment