aws / aws-lc-rs

aws-lc-rs is a cryptographic library using AWS-LC for its cryptographic operations. The library strives to be API-compatible with the popular Rust library named ring.
Other
236 stars 40 forks source link

Build fails for iOS simulator on x86_64 #373

Closed tomleavy closed 2 months ago

tomleavy commented 3 months ago

Problem:

When I try to compile the latest version for iOS simulator on my M1 mac, it will build successfully when targeting the aarch64 simulator but not the x86_64 one. We need the x86_64 simulator slice to be able to run unit tests in our CI. I have also confirmed that AWS-LC does compile for the x86_64 simulator when using standalone CMake on the C library.

Relevant details

AWS-LC for Rust versions or commit: aws-lc-sys/v0.13.3

System information: for linux, below info can be collected by running uname -srvmp

Build log:

warning: use of deprecated type alias toml_edit::Document: Replaced with DocumentMut --> links-testing/build.rs:51:41 | 51 | let cargo_toml = cargo_toml.parse::().unwrap(); | ^^^^^^^^

warning: links-testing (build script) generated 2 warnings Compiling aws-lc-sys v0.14.0 (/Users/tomleavy/git/aws-lc-rs/aws-lc-sys) Compiling aws-lc-fips-sys v0.12.5 (/Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys) error: failed to run custom build command for aws-lc-sys v0.14.0 (/Users/tomleavy/git/aws-lc-rs/aws-lc-sys)

Caused by: process didn't exit successfully: /Users/tomleavy/git/aws-lc-rs/target/debug/build/aws-lc-sys-9a95abfa6d31adb3/build-script-main (exit status: 101) --- stdout cargo:rustc-cfg=use_bindgen_generated CMAKE_TOOLCHAIN_FILE_x86_64-apple-ios = None CMAKE_TOOLCHAIN_FILE_x86_64_apple_ios = None TARGET_CMAKE_TOOLCHAIN_FILE = None CMAKE_TOOLCHAIN_FILE = None CMAKE_GENERATOR_x86_64-apple-ios = None CMAKE_GENERATOR_x86_64_apple_ios = None TARGET_CMAKE_GENERATOR = None CMAKE_GENERATOR = None CMAKE_PREFIX_PATH_x86_64-apple-ios = None CMAKE_PREFIX_PATH_x86_64_apple_ios = None TARGET_CMAKE_PREFIX_PATH = None CMAKE_PREFIX_PATH = None CMAKE_x86_64-apple-ios = None CMAKE_x86_64_apple_ios = None TARGET_CMAKE = None CMAKE = Some("cmake") running: cd "/Users/tomleavy/git/aws-lc-rs/target/x86_64-apple-ios/debug/build/aws-lc-sys-0814bc827fceafc2/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/Users/tomleavy/git/aws-lc-rs/aws-lc-sys" "-DBUILD_SHARED_LIBS=0" "-DCMAKE_BUILD_TYPE=debug" "-DBORINGSSL_PREFIX=aws_lc_0_140" "-DBORINGSSL_PREFIX_HEADERS=/Users/tomleavy/git/aws-lc-rs/aws-lc-sys/generated-include" "-DBUILD_TESTING=OFF" "-DBUILD_LIBSSL=OFF" "-DDISABLE_PERL=ON" "-DDISABLE_GO=ON" "-DCMAKE_SYSTEM_NAME=iOS" "-DCMAKE_INSTALL_PREFIX=/Users/tomleavy/git/aws-lc-rs/target/x86_64-apple-ios/debug/build/aws-lc-sys-0814bc827fceafc2/out" "-DCMAKE_C_FLAGS= -fPIC -m64 --target=x86_64-apple-ios -m64 -mios-simulator-version-min=17.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk" "-DCMAKE_C_COMPILER=/usr/bin/clang" "-DCMAKE_CXX_FLAGS= -fPIC -m64 --target=x86_64-apple-ios -m64 -mios-simulator-version-min=17.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk" "-DCMAKE_CXX_COMPILER=/usr/bin/clang++" "-DCMAKE_ASM_FLAGS= -fPIC -m64 --target=x86_64-apple-ios -m64 -mios-simulator-version-min=17.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk" "-DCMAKE_ASM_COMPILER=/usr/bin/clang" "--no-warn-unused-cli" Not searching for unused variables given on the command line. -- Go not found. Disabling some code generation and using pre-generated code in generated-src/ -- Perl not found. Disabling some code generation and using pre-generated code in generated-src/ -- stdalign_check.c probe is negative, NOT enabling AWS_LC_STDALIGN_AVAILABLE: -- Change Dir: '/Users/tomleavy/git/aws-lc-rs/target/x86_64-apple-ios/debug/build/aws-lc-sys-0814bc827fceafc2/out/build/aws-lc/CMakeFiles/CMakeTmp'

Run Build Command(s): /opt/homebrew/Cellar/cmake/3.28.1/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_477fa/fast /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_477fa.dir/build.make CMakeFiles/cmTC_477fa.dir/build Building C object CMakeFiles/cmTC_477fa.dir/stdalign_check.c.o /usr/bin/clang -fPIC -m64 --target=x86_64-apple-ios -m64 -mios-simulator-version-min=17.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk -std=c99 -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Werror -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wwrite-strings -Wformat-security -Wunused-result -Wvla -Wtype-limits -Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -ggdb -Wall -fvisibility=hidden -fno-common -Wnewline-eof -fcolor-diagnostics -Wstring-concatenation -Wimplicit-fallthrough -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk -Werror -MD -MT CMakeFiles/cmTC_477fa.dir/stdalign_check.c.o -MF CMakeFiles/cmTC_477fa.dir/stdalign_check.c.o.d -o CMakeFiles/cmTC_477fa.dir/stdalign_check.c.o -c /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:32: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/cdefs.h:1010:2: error: Unsupported architecture

error Unsupported architecture

^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:33: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported

error architecture not supported

^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:55:9: error: unknown type name 'int64_t' typedef __int64_t darwin_blkcnt_t; / total blocks / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:56:9: error: unknown type name 'int32_t' typedef __int32_t darwin_blksize_t; / preferred block size / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:57:9: error: unknown type name 'int32_t' typedef __int32_t darwin_dev_t; / dev_t / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:60:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_gid_t; / [???] process and group IDs / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:61:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_id_t; / [XSI] pid_t, uid_t, or gid_t/ ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:62:9: error: unknown type name 'uint64_t'; did you mean 'uint64_t'? typedef uint64_t darwin_ino64_t; / [???] Used for 64 bit inodes / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here typedef unsigned long long uint64_t; ^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:68:9: error: unknown type name 'darwin_natural_t' typedef darwin_natural_t __darwin_mach_port_name_t; / Used by mach / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:70:9: error: unknown type name 'uint16_t' typedef uint16_t __darwin_mode_t; / [???] Some file attributes / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:71:9: error: unknown type name 'int64_t' typedef int64_t __darwin_off_t; / [???] Used for file sizes / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:72:9: error: unknown type name 'int32_t' typedef int32_t __darwin_pid_t; / [???] process and group IDs / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:73:9: error: unknown type name 'uint32_t' typedef uint32_t __darwin_sigset_t; / [???] signal set / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:74:9: error: unknown type name 'int32_t' typedef int32_t __darwin_suseconds_t; / [???] microseconds / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:75:9: error: unknown type name 'uint32_t' typedef uint32_t __darwin_uid_t; / [???] user IDs / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:76:9: error: unknown type name 'uint32_t' typedef __uint32_t __darwin_useconds_t; / [???] microseconds / ^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:53: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types/_intptr_t.h:30: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/machine/types.h:37:2: error: architecture not supported

error architecture not supported

^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:53: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error: unknown type name 'darwin_intptr_t' typedef darwin_intptr_t intptr_t; ^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:10: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdlib.h:64: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/_types.h:43:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_wctype_t; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[1]: [CMakeFiles/cmTC_477fa.dir/stdalign_check.c.o] Error 1 make: [cmTC_477fa/fast] Error 2

-- builtin_swap_check.c probe is negative, NOT enabling AWS_LC_BUILTIN_SWAP_SUPPORTED: -- Change Dir: '/Users/tomleavy/git/aws-lc-rs/target/x86_64-apple-ios/debug/build/aws-lc-sys-0814bc827fceafc2/out/build/aws-lc/CMakeFiles/CMakeTmp'

Run Build Command(s): /opt/homebrew/Cellar/cmake/3.28.1/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_3ddee/fast /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_3ddee.dir/build.make CMakeFiles/cmTC_3ddee.dir/build Building C object CMakeFiles/cmTC_3ddee.dir/builtin_swap_check.c.o /usr/bin/clang -fPIC -m64 --target=x86_64-apple-ios -m64 -mios-simulator-version-min=17.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk -std=c99 -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Werror -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wwrite-strings -Wformat-security -Wunused-result -Wvla -Wtype-limits -Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -ggdb -Wall -fvisibility=hidden -fno-common -Wnewline-eof -fcolor-diagnostics -Wstring-concatenation -Wimplicit-fallthrough -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk -Werror -MD -MT CMakeFiles/cmTC_3ddee.dir/builtin_swap_check.c.o -MF CMakeFiles/cmTC_3ddee.dir/builtin_swap_check.c.o.d -o CMakeFiles/cmTC_3ddee.dir/builtin_swap_check.c.o -c /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:32: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/cdefs.h:1010:2: error: Unsupported architecture

error Unsupported architecture

^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:33: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported

error architecture not supported

^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:55:9: error: unknown type name 'int64_t' typedef __int64_t darwin_blkcnt_t; / total blocks / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:56:9: error: unknown type name 'int32_t' typedef __int32_t darwin_blksize_t; / preferred block size / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:57:9: error: unknown type name 'int32_t' typedef __int32_t darwin_dev_t; / dev_t / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:60:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_gid_t; / [???] process and group IDs / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:61:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_id_t; / [XSI] pid_t, uid_t, or gid_t/ ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:62:9: error: unknown type name 'uint64_t'; did you mean 'uint64_t'? typedef uint64_t darwin_ino64_t; / [???] Used for 64 bit inodes / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here typedef unsigned long long uint64_t; ^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:68:9: error: unknown type name 'darwin_natural_t' typedef darwin_natural_t darwin_mach_port_name_t; / Used by mach / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:70:9: error: unknown type name 'uint16_t' typedef __uint16_t darwin_mode_t; / [???] Some file attributes / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:71:9: error: unknown type name 'int64_t' typedef __int64_t darwin_off_t; / [???] Used for file sizes / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:72:9: error: unknown type name 'int32_t' typedef __int32_t darwin_pid_t; / [???] process and group IDs / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:73:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_sigset_t; / [???] signal set / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:74:9: error: unknown type name 'int32_t' typedef __int32_t darwin_suseconds_t; / [???] microseconds / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:75:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_uid_t; / [???] user IDs / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:76:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_useconds_t; / [???] microseconds / ^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:53: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types/_intptr_t.h:30: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/machine/types.h:37:2: error: architecture not supported

error architecture not supported

^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:53: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error: unknown type name 'darwin_intptr_t' typedef darwin_intptr_t intptr_t; ^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:9: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdlib.h:64: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/_types.h:43:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_wctype_t; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[1]: [CMakeFiles/cmTC_3ddee.dir/builtin_swap_check.c.o] Error 1 make: [cmTC_3ddee/fast] Error 2

-- Configuring incomplete, errors occurred!

--- stderr cargo:rerun-if-env-changed=AWS_LC_SYS_INTERNAL_NO_PREFIX cargo:rerun-if-env-changed=AWS_LC_RUST_INTERNAL_BINDGEN cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC cargo:rerun-if-env-changed=AWS_LC_SYS_INCLUDES cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at aws-lc/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Error at aws-lc/CMakeLists.txt:703 (elseif): given arguments:

  "STREQUAL" "riscv64"

Unknown arguments specified

thread 'main' panicked at /Users/tomleavy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:

command did not execute successfully, got: exit status: 1

build script failed, must exit now note: run with RUST_BACKTRACE=1 environment variable to display a backtrace warning: build failed, waiting for other jobs to finish... error: failed to run custom build command for aws-lc-fips-sys v0.12.5 (/Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys)

Caused by: process didn't exit successfully: /Users/tomleavy/git/aws-lc-rs/target/debug/build/aws-lc-fips-sys-021df60f973f7d1f/build-script-main (exit status: 101) --- stdout cargo:rustc-cfg=use_bindgen_generated CMAKE_TOOLCHAIN_FILE_x86_64-apple-ios = None CMAKE_TOOLCHAIN_FILE_x86_64_apple_ios = None TARGET_CMAKE_TOOLCHAIN_FILE = None CMAKE_TOOLCHAIN_FILE = None CMAKE_GENERATOR_x86_64-apple-ios = None CMAKE_GENERATOR_x86_64_apple_ios = None TARGET_CMAKE_GENERATOR = None CMAKE_GENERATOR = None CMAKE_PREFIX_PATH_x86_64-apple-ios = None CMAKE_PREFIX_PATH_x86_64_apple_ios = None TARGET_CMAKE_PREFIX_PATH = None CMAKE_PREFIX_PATH = None CMAKE_x86_64-apple-ios = None CMAKE_x86_64_apple_ios = None TARGET_CMAKE = None CMAKE = Some("cmake") running: cd "/Users/tomleavy/git/aws-lc-rs/target/x86_64-apple-ios/debug/build/aws-lc-fips-sys-9e3b325de1149101/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys" "-DBUILD_SHARED_LIBS=1" "-DCMAKE_BUILD_TYPE=debug" "-DBORINGSSL_PREFIX=aws_lc_fips_0_125" "-DBORINGSSL_PREFIX_HEADERS=/Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/generated-include" "-DBUILD_TESTING=OFF" "-DBUILD_LIBSSL=OFF" "-DCMAKE_SYSTEM_NAME=iOS" "-DFIPS=1" "-DCMAKE_INSTALL_PREFIX=/Users/tomleavy/git/aws-lc-rs/target/x86_64-apple-ios/debug/build/aws-lc-fips-sys-9e3b325de1149101/out" "-DCMAKE_C_FLAGS= -fPIC -m64 --target=x86_64-apple-ios -m64 -mios-simulator-version-min=17.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk" "-DCMAKE_C_COMPILER=/usr/bin/clang" "-DCMAKE_CXX_FLAGS= -fPIC -m64 --target=x86_64-apple-ios -m64 -mios-simulator-version-min=17.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk" "-DCMAKE_CXX_COMPILER=/usr/bin/clang++" "-DCMAKE_ASM_FLAGS= -fPIC -m64 --target=x86_64-apple-ios -m64 -mios-simulator-version-min=17.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk" "-DCMAKE_ASM_COMPILER=/usr/bin/clang" "--no-warn-unused-cli" Not searching for unused variables given on the command line. -- stdalign_check.c probe is negative, NOT enabling AWS_LC_STDALIGN_AVAILABLE: -- Change Dir: '/Users/tomleavy/git/aws-lc-rs/target/x86_64-apple-ios/debug/build/aws-lc-fips-sys-9e3b325de1149101/out/build/aws-lc/CMakeFiles/CMakeTmp'

Run Build Command(s): /opt/homebrew/Cellar/cmake/3.28.1/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_37c68/fast /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_37c68.dir/build.make CMakeFiles/cmTC_37c68.dir/build Building C object CMakeFiles/cmTC_37c68.dir/stdalign_check.c.o /usr/bin/clang -fPIC -m64 --target=x86_64-apple-ios -m64 -mios-simulator-version-min=17.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk -fno-function-sections -fno-data-sections -std=c99 -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Werror -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wwrite-strings -Wformat-security -Wunused-result -Wvla -Wtype-limits -Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -ggdb -Wall -fvisibility=hidden -fno-common -Wnewline-eof -fcolor-diagnostics -Wstring-concatenation -Wimplicit-fallthrough -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk -Werror -MD -MT CMakeFiles/cmTC_37c68.dir/stdalign_check.c.o -MF CMakeFiles/cmTC_37c68.dir/stdalign_check.c.o.d -o CMakeFiles/cmTC_37c68.dir/stdalign_check.c.o -c /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:32: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/cdefs.h:1010:2: error: Unsupported architecture

error Unsupported architecture

^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:33: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported

error architecture not supported

^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:55:9: error: unknown type name 'int64_t' typedef __int64_t darwin_blkcnt_t; / total blocks / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:56:9: error: unknown type name 'int32_t' typedef __int32_t darwin_blksize_t; / preferred block size / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:57:9: error: unknown type name 'int32_t' typedef __int32_t darwin_dev_t; / dev_t / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:60:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_gid_t; / [???] process and group IDs / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:61:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_id_t; / [XSI] pid_t, uid_t, or gid_t/ ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:62:9: error: unknown type name 'uint64_t'; did you mean 'uint64_t'? typedef uint64_t darwin_ino64_t; / [???] Used for 64 bit inodes / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here typedef unsigned long long uint64_t; ^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:68:9: error: unknown type name 'darwin_natural_t' typedef darwin_natural_t __darwin_mach_port_name_t; / Used by mach / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:70:9: error: unknown type name 'uint16_t' typedef uint16_t __darwin_mode_t; / [???] Some file attributes / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:71:9: error: unknown type name 'int64_t' typedef int64_t __darwin_off_t; / [???] Used for file sizes / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:72:9: error: unknown type name 'int32_t' typedef int32_t __darwin_pid_t; / [???] process and group IDs / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:73:9: error: unknown type name 'uint32_t' typedef uint32_t __darwin_sigset_t; / [???] signal set / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:74:9: error: unknown type name 'int32_t' typedef int32_t __darwin_suseconds_t; / [???] microseconds / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:75:9: error: unknown type name 'uint32_t' typedef uint32_t __darwin_uid_t; / [???] user IDs / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:76:9: error: unknown type name 'uint32_t' typedef __uint32_t __darwin_useconds_t; / [???] microseconds / ^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:53: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types/_intptr_t.h:30: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/machine/types.h:37:2: error: architecture not supported

error architecture not supported

^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:53: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error: unknown type name 'darwin_intptr_t' typedef darwin_intptr_t intptr_t; ^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/stdalign_check.c:10: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdlib.h:64: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/_types.h:43:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_wctype_t; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[1]: [CMakeFiles/cmTC_37c68.dir/stdalign_check.c.o] Error 1 make: [cmTC_37c68/fast] Error 2

-- builtin_swap_check.c probe is negative, NOT enabling AWS_LC_BUILTIN_SWAP_SUPPORTED: -- Change Dir: '/Users/tomleavy/git/aws-lc-rs/target/x86_64-apple-ios/debug/build/aws-lc-fips-sys-9e3b325de1149101/out/build/aws-lc/CMakeFiles/CMakeTmp'

Run Build Command(s): /opt/homebrew/Cellar/cmake/3.28.1/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_fb297/fast /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_fb297.dir/build.make CMakeFiles/cmTC_fb297.dir/build Building C object CMakeFiles/cmTC_fb297.dir/builtin_swap_check.c.o /usr/bin/clang -fPIC -m64 --target=x86_64-apple-ios -m64 -mios-simulator-version-min=17.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk -fno-function-sections -fno-data-sections -std=c99 -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Werror -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wwrite-strings -Wformat-security -Wunused-result -Wvla -Wtype-limits -Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -ggdb -Wall -fvisibility=hidden -fno-common -Wnewline-eof -fcolor-diagnostics -Wstring-concatenation -Wimplicit-fallthrough -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk -Werror -MD -MT CMakeFiles/cmTC_fb297.dir/builtin_swap_check.c.o -MF CMakeFiles/cmTC_fb297.dir/builtin_swap_check.c.o.d -o CMakeFiles/cmTC_fb297.dir/builtin_swap_check.c.o -c /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:32: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/cdefs.h:1010:2: error: Unsupported architecture

error Unsupported architecture

^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:33: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported

error architecture not supported

^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:55:9: error: unknown type name 'int64_t' typedef __int64_t darwin_blkcnt_t; / total blocks / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:56:9: error: unknown type name 'int32_t' typedef __int32_t darwin_blksize_t; / preferred block size / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:57:9: error: unknown type name 'int32_t' typedef __int32_t darwin_dev_t; / dev_t / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:60:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_gid_t; / [???] process and group IDs / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:61:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_id_t; / [XSI] pid_t, uid_t, or gid_t/ ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:62:9: error: unknown type name 'uint64_t'; did you mean 'uint64_t'? typedef uint64_t darwin_ino64_t; / [???] Used for 64 bit inodes / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here typedef unsigned long long uint64_t; ^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:52: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:68:9: error: unknown type name 'darwin_natural_t' typedef darwin_natural_t darwin_mach_port_name_t; / Used by mach / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:70:9: error: unknown type name 'uint16_t' typedef __uint16_t darwin_mode_t; / [???] Some file attributes / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:71:9: error: unknown type name 'int64_t' typedef __int64_t darwin_off_t; / [???] Used for file sizes / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:72:9: error: unknown type name 'int32_t' typedef __int32_t darwin_pid_t; / [???] process and group IDs / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:73:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_sigset_t; / [???] signal set / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:74:9: error: unknown type name 'int32_t' typedef __int32_t darwin_suseconds_t; / [???] microseconds / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:75:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_uid_t; / [???] user IDs / ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types.h:76:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_useconds_t; / [???] microseconds / ^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:53: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types/_intptr_t.h:30: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/machine/types.h:37:2: error: architecture not supported

error architecture not supported

^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:8: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdint.h:53: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error: unknown type name 'darwin_intptr_t' typedef darwin_intptr_t intptr_t; ^ In file included from /Users/tomleavy/git/aws-lc-rs/aws-lc-fips-sys/aws-lc/tests/compiler_features_tests/builtin_swap_check.c:9: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/stdlib.h:64: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/_types.h:43:9: error: unknown type name 'uint32_t' typedef __uint32_t darwin_wctype_t; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[1]: [CMakeFiles/cmTC_fb297.dir/builtin_swap_check.c.o] Error 1 make: [cmTC_fb297/fast] Error 2

-- Configuring incomplete, errors occurred!

--- stderr cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_STATIC cargo:rerun-if-env-changed=AWS_LC_RUST_INTERNAL_BINDGEN cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_INCLUDES cargo:rerun-if-env-changed=AWS_LC_FIPS_SYS_STATIC CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at aws-lc/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Error at aws-lc/CMakeLists.txt:711 (elseif): given arguments:

  "STREQUAL" "riscv64"

Unknown arguments specified

thread 'main' panicked at /Users/tomleavy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:

command did not execute successfully, got: exit status: 1

build script failed, must exit now note: run with RUST_BACKTRACE=1 environment variable to display a backtrace ...

justsmth commented 3 months ago

I'm able to reproduce the problem you report, and I've made progress correcting our build setup. But I'm still having trouble determining how to remedy the SDK's header files only supporting ARM-based architectures:

 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/usr/include/sys/cdefs.h:1010:2: error: Unsupported architecture
  #error Unsupported architecture

I'm curious about how you built AWS-LC for x86_64-apple-ios. I can reach out to you directly for details.

tomleavy commented 3 months ago

Hey @justsmth

So in the C library we do use a toolchain file in the main CMake for our library, and then we import AWS_LC as a subproject and forward some of the CMake flags that it provides. https://github.com/WickrInc/wickr-crypto-c/blob/9889f70940132757adc4b9527cb42c6513047c04/third-party/openssl/aws-lc/CMakeLists.txt#L7

I just temporarily injected a print when it determines what to pass to CMake args and get this

-DFIPS=OFF;-DBUILD_TESTING=OFF;-DBUILD_SHARED_LIBS=ON;-DCMAKE_BUILD_TYPE=Release;-DCMAKE_INSTALL_PREFIX=/Users/tomleavy/git/wickr-crypto-c/build_sim/third-party/openssl/aws-lc;-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk;-DCMAKE_OSX_DEPLOYMENT_TARGET=13.0;-DCMAKE_OSX_ARCHITECTURES=x86_64;-DCMAKE_SYSTEM_NAME=iOS

Looking at the line you posted above it seems that the problem is that for the x86_64-apple-ios and aarch64-apple-ios-sim targets you should be using the iPhoneSimulator.platform directory instead of the iPhoneOS.platform directory when choosing the SDK path. It is a little confusing but x86_64-apple-ios is a simulator only target