conan-io / conan-package-tools

Conan Package Tools. Helps with massive package creation and CI integration (Travis CI, Appveyor...)
MIT License
165 stars 70 forks source link

Cross-compile xz_utils for iOS Simulator #612

Open TheSlackOne opened 1 year ago

TheSlackOne commented 1 year ago

Description of Problem, Request, or Question

Cannot cross-compile xz_utils/5.2.5 for iOS Simulator (iphonesimulator) from my Macos M1. Got the conanfile.py from Conan Center.

Here my cross-compiling setting:

builder.add(settings={
        "compiler.cppstd": "17",
        "os": "iOS",
        "os.sdk": "iphoneos",
        "os.version": "14.0",
        "arch": "armv8",
        "build_type": "Release",
        "compiler": "apple-clang",
        "compiler.version": "13.0",
        "compiler.libcxx": libcxx, #"libc++",
        "os_build": "11.0",
        "arch_build": "armv8"
    }, options={}, env_vars={}, build_requires={})

Log snippet:

Initializing Automake:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /Users/ernesto.messina/.conan/data/xz_utils/5.2.5/local/workbench/build/38e651fff637f3a9b555ffd1af2445f2c15f7a9b/src/build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether ln -s works... yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/ernesto.messina/.conan/data/xz_utils/5.2.5/local/workbench/build/38e651fff637f3a9b555ffd1af2445f2c15f7a9b/build-debug':
configure: error: C compiler cannot create executables
See `config.log' for more details
xz_utils/5.2.5@local/workbench:
xz_utils/5.2.5@local/workbench: ERROR: Package '38e651fff637f3a9b555ffd1af2445f2c15f7a9b' build failed
xz_utils/5.2.5@local/workbench: WARN: Build folder /Users/ernesto.messina/.conan/data/xz_utils/5.2.5/local/workbench/build/38e651fff637f3a9b555ffd1af2445f2c15f7a9b/build-debug

config.log

## ----------- ##
## Core tests. ##
## ----------- ##

configure:2983: checking build system type
configure:2997: result: arm-apple-darwin21.6.0
configure:3017: checking host system type
configure:3030: result: arm-apple-darwin21.6.0
configure:3090: checking if debugging code should be compiled
configure:3100: result: yes
configure:3146: checking which encoders to build
configure:3237: result: lzma1 lzma2 delta x86 powerpc ia64 arm armthumb sparc
configure:3241: checking which decoders to build
configure:3332: result: lzma1 lzma2 delta x86 powerpc ia64 arm armthumb sparc
configure:3671: checking which match finders to build
configure:3722: result: hc3 hc4 bt2 bt3 bt4
configure:3740: checking which integrity checks to build
configure:3782: result: crc32 crc64 sha256
configure:3814: checking if external SHA-256 should be used
configure:3830: result: no
configure:3839: checking if assembler optimizations should be used
configure:3863: result: no
configure:3894: checking if small size is preferred over speed
configure:3912: result: no
configure:3928: checking if threading support is wanted
configure:3954: result: yes, posix
configure:3987: checking how much RAM to assume if the real amount is unknown
configure:4002: result: 128 MiB
configure:4135: checking if library symbol versioning should be used
configure:4158: result: no
configure:4174: checking if sandboxing should be used
configure:4185: result: maybe (autodetect)
configure:4242: checking for a shell that conforms to POSIX
configure:4283: result: /bin/sh
configure:4324: checking for a BSD-compatible install
configure:4392: result: /usr/bin/install -c
configure:4403: checking whether build environment is sane
configure:4458: result: yes
configure:4609: checking for a thread-safe mkdir -p
configure:4648: result: /Users/ernesto.messina/.conan/data/xz_utils/5.2.5/local/workbench/build/38e651fff637f3a9b555ffd1af2445f2c15f7a9b/src/build-aux/install-sh -c -d
configure:4655: checking for gawk
configure:4685: result: no
configure:4655: checking for mawk
configure:4685: result: no
configure:4655: checking for nawk
configure:4685: result: no
configure:4655: checking for awk
configure:4671: found /usr/bin/awk
configure:4682: result: awk
configure:4693: checking whether make sets $(MAKE)
configure:4715: result: yes
configure:4744: checking whether make supports nested variables
configure:4761: result: yes
configure:4887: checking whether ln -s works
configure:4891: result: yes
configure:4903: checking whether make supports the include directive
configure:4918: make -f confmf.GNU && cat confinc.out
this is the am__doit target
configure:4921: $? = 0
configure:4940: result: yes (GNU style)
configure:5010: checking for gcc
configure:5026: found /usr/bin/gcc
configure:5037: result: gcc
configure:5266: checking for C compiler version
configure:5275: gcc --version >&5
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode_13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:5286: $? = 0
configure:5275: gcc -v >&5
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode_13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:5286: $? = 0
configure:5275: gcc -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:5286: $? = 1
configure:5275: gcc -qversion >&5
clang: error: unknown argument '-qversion'; did you mean '--version'?
clang: error: no input files
configure:5286: $? = 1
configure:5306: checking whether the C compiler works
configure:5328: gcc  -m64 -fPIC -g -mios-simulator-version-min=14.0   -m64 -mios-simulator-version-min=14.0 conftest.c  >&5
clang: warning: using sysroot for 'MacOSX' but targeting 'iPhone' [-Wincompatible-sysroot]
ld: building for iOS Simulator, but linking in .tbd built for macOS/Mac Catalyst, file '/Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:5332: $? = 1
configure:5370: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "XZ Utils"
| #define PACKAGE_TARNAME "xz"
| #define PACKAGE_VERSION "5.2.5"
| #define PACKAGE_STRING "XZ Utils 5.2.5"
| #define PACKAGE_BUGREPORT "lasse.collin@tukaani.org"
| #define PACKAGE_URL "https://tukaani.org/xz/"
| #define HAVE_ENCODER_LZMA1 1
| #define HAVE_ENCODER_LZMA2 1
| #define HAVE_ENCODER_DELTA 1
| #define HAVE_ENCODER_X86 1
| #define HAVE_ENCODER_POWERPC 1
| #define HAVE_ENCODER_IA64 1
| #define HAVE_ENCODER_ARM 1
| #define HAVE_ENCODER_ARMTHUMB 1
| #define HAVE_ENCODER_SPARC 1
| #define HAVE_ENCODERS 1
| #define HAVE_DECODER_LZMA1 1
| #define HAVE_DECODER_LZMA2 1
| #define HAVE_DECODER_DELTA 1
| #define HAVE_DECODER_X86 1
| #define HAVE_DECODER_POWERPC 1
| #define HAVE_DECODER_IA64 1
| #define HAVE_DECODER_ARM 1
| #define HAVE_DECODER_ARMTHUMB 1
| #define HAVE_DECODER_SPARC 1
| #define HAVE_DECODERS 1
| #define HAVE_MF_HC3 1
| #define HAVE_MF_HC4 1
| #define HAVE_MF_BT2 1
| #define HAVE_MF_BT3 1
| #define HAVE_MF_BT4 1
| #define HAVE_CHECK_CRC32 1
| #define HAVE_CHECK_CRC64 1
| #define HAVE_CHECK_SHA256 1
| #define ASSUME_RAM 128
| #define PACKAGE "xz"
| #define VERSION "5.2.5"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:5375: error: in `/Users/ernesto.messina/.conan/data/xz_utils/5.2.5/local/workbench/build/38e651fff637f3a9b555ffd1af2445f2c15f7a9b/build-debug':
configure:5377: error: C compiler cannot create executables
See `config.log' for more details