Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation for iOS in release mode fails #33

Closed
2 tasks done
0ax1 opened this issue Aug 29, 2021 · 4 comments · Fixed by #34
Closed
2 tasks done

Compilation for iOS in release mode fails #33

0ax1 opened this issue Aug 29, 2021 · 4 comments · Fixed by #34
Labels
bug Something isn't working
Milestone

Comments

@0ax1
Copy link

0ax1 commented Aug 29, 2021

swift-atomics doesn't compile for iOS in release mode when building with Xcode (but succeeds in debug).

Information

  • Package version: main / 46a69523595b5142b30b20f922a1324586bdc96f
  • Platform version: 11.5.2
  • Swift version: swift-driver version: 1.26.7 Apple Swift version 5.5 (swiftlang-1300.0.27.6 clang-1300.0.27.2) Target: x86_64-apple-macosx11.0
  • Xcode version: 13.0 beta 4 (13A5201i)

Checklist

  • If possible, I've reproduced the issue using the main branch of this package.
  • I've searched for existing reports of the same issue.

Steps to Reproduce

Create a new iOS project from the App template in Xcode, add the swift-atomics package as a dependency under Package Dependencies (using branch: main) and set the build configuration in Edit Scheme... to Release.

Expected behavior

The build for iOS in release mode succeeds.

Actual behavior

The build for iOS in release mode fails with the following 2 errors:

1.)
CompileC /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/_AtomicsShims.build/Objects-normal/i386/_AtomicsShims.o /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/SourcePackages/checkouts/swift-atomics/Sources/_AtomicsShims/src/_AtomicsShims.c normal i386 c com.apple.compilers.llvm.clang.1_0.compiler (in target '_AtomicsShims' from project 'swift-atomics')
    cd /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/SourcePackages/checkouts/swift-atomics
    export LANG\=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -target i386-apple-ios9.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fmodules -gmodules -fmodules-cache-path\=/Users/lx/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/lx/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -fmodule-name\=_AtomicsShims -fapplication-extension -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DSWIFT_PACKAGE -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -I/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Products/Release-iphonesimulator/include -I/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/SourcePackages/checkouts/swift-atomics/Sources/_AtomicsShims/include -I/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/_AtomicsShims.build/DerivedSources-normal/i386 -I/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/_AtomicsShims.build/DerivedSources/i386 -I/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/_AtomicsShims.build/DerivedSources -F/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Products/Release-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -iframework /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk/Developer/Library/Frameworks -DXcode -MMD -MT dependencies -MF /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/_AtomicsShims.build/Objects-normal/i386/_AtomicsShims.d --serialize-diagnostics /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/_AtomicsShims.build/Objects-normal/i386/_AtomicsShims.dia -c /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/SourcePackages/checkouts/swift-atomics/Sources/_AtomicsShims/src/_AtomicsShims.c -o /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/_AtomicsShims.build/Objects-normal/i386/_AtomicsShims.o

In file included from /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/SourcePackages/checkouts/swift-atomics/Sources/_AtomicsShims/src/_AtomicsShims.c:13:
/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/SourcePackages/checkouts/swift-atomics/Sources/_AtomicsShims/include/_AtomicsShims.h:339:28: error: unknown type name '__uint128_t'
_sa_dword _sa_decode_dword(__uint128_t value) {
                           ^
1 error generated.
2.)
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'Atomics' from project 'swift-atomics')
    cd /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/SourcePackages/checkouts/swift-atomics
    export DEVELOPER_DIR\=/Applications/Xcode.app/Contents/Developer
    export SDKROOT\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name Atomics -O -whole-module-optimization -enforce-exclusivity\=checked @/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/Atomics.build/Objects-normal/arm64/Atomics.SwiftFileList -DSWIFT_PACKAGE -DXcode -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk -target arm64-apple-ios9.0-simulator -g -module-cache-path /Users/lx/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -application-extension -swift-version 5 -I /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Products/Release-iphonesimulator -I /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/lib -F /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Products/Release-iphonesimulator/PackageFrameworks -F /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Products/Release-iphonesimulator -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk/Developer/Library/Frameworks -c -num-threads 8 -output-file-map /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/Atomics.build/Objects-normal/arm64/Atomics-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/Atomics.build/Objects-normal/arm64/Atomics.swiftmodule -Xcc -I/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/Atomics.build/swift-overrides.hmap -Xcc -I/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/SourcePackages/checkouts/swift-atomics/Sources/_AtomicsShims/include -Xcc -I/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Products/Release-iphonesimulator/include -Xcc -I/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/Atomics.build/DerivedSources-normal/arm64 -Xcc -I/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/Atomics.build/DerivedSources/arm64 -Xcc -I/Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/Atomics.build/DerivedSources -Xcc -DSWIFT_PACKAGE -emit-objc-header -emit-objc-header-path /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/Build/Intermediates.noindex/swift-atomics.build/Release-iphonesimulator/Atomics.build/Objects-normal/arm64/Atomics-Swift.h -working-directory /Users/lx/Library/Developer/Xcode/DerivedData/ldsdhs-bzmdchssanulrqdlkqewpmdcmpmq/SourcePackages/checkouts/swift-atomics

remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
Command CompileSwiftSources failed with a nonzero exit code
@0ax1 0ax1 added the bug Something isn't working label Aug 29, 2021
@lorentey
Copy link
Member

Ah, this is a regression introduced in #26. It seems we will need to beef up CI coverage.

@0ax1
Copy link
Author

0ax1 commented Aug 30, 2021

Thanks so much for looking into it, much appreciated!

@lorentey
Copy link
Member

Submitted a PR with the fix -- apologies for not catching this earlier.

@lorentey lorentey added this to the 1.0.1 milestone Aug 30, 2021
@0ax1
Copy link
Author

0ax1 commented Aug 31, 2021

Awesome, that was a super fast fix, thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants