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

Xcode 12 Beta Archive issue #3240

Closed
kamzab95 opened this issue Jun 24, 2020 · 36 comments
Closed

Xcode 12 Beta Archive issue #3240

kamzab95 opened this issue Jun 24, 2020 · 36 comments
Assignees
Labels

Comments

@kamzab95
Copy link

kamzab95 commented Jun 24, 2020

Since Xcode 12 is available in beta I've had to give it a try. There is some issue when trying to archive Alamofire.

Undefined symbols for architecture armv7: "type metadata for Swift._StringObject.Variant", referenced from: outlined init with take of Swift._StringObject.Variant in HTTPHeaders.o ld: symbol(s) not found for architecture armv7

When it comes to this issue I am aware that it may be fault of new Xcode, I just would like to start the discussion on this topic.

What did you do?

I've tried to archive Alamofire using new Xcode12-beta

What did you expect to happen?

Successful archive.

What happened instead?

Archive failed with error
Undefined symbols for architecture armv7: "type metadata for Swift._StringObject.Variant", referenced from: outlined init with take of Swift._StringObject.Variant in HTTPHeaders.o ld: symbol(s) not found for architecture armv7

Alamofire Environment

Alamofire version: 5.2.1
Xcode version: 12-beta
Swift version: 5.3 (swiftlang-1200.0.16.9 clang-1200.0.22.5)
Platform(s) running Alamofire: iOS
macOS version running Xcode: 10.15.4

@yuyedaidao
Copy link

I have the same issue

@marcelofabri
Copy link

Bumping the deployment target fixed it for me (I raised it to 12, which is my app's deployment target, but maybe a lower value would be enough).

@jshier
Copy link
Contributor

jshier commented Jun 24, 2020

Which platforms were you archiving for?

@jshier jshier self-assigned this Jun 24, 2020
@kamzab95
Copy link
Author

just for iOS

@jshier
Copy link
Contributor

jshier commented Jun 24, 2020

@marcelofabri A deployment target of iOS 11 should work, since that's the version that dropped support for armv7.

I'll report this as a bug.

@jshier
Copy link
Contributor

jshier commented Jun 24, 2020

I've filed FB7764057, so if everyone else seeing this issue could file their own issue and cite this first feedback, we should be able to get this fixed.

@marcelofabri
Copy link

Should we open a report in bugs.swift.org for visibility?

@jshier
Copy link
Contributor

jshier commented Jun 24, 2020

Is there any way to reproduce the issue without Xcode? I don't think so, as SPM can't build for iOS, so there's no way to see this issue without using Xcode. If that's the case I'm not sure a Swift bug is appropriate. I've request a lab session to discuss the issue with an Apple engineer, so I'll update afterward to see if we need more visibility.

@dingtianran
Copy link

I believe it is a system/beta issue as I saw it building against simulator as well: outlined init with take of Swift._StringObject.Variant in HTTPHeaders.o ld: symbol(s) not found for architecture i386

And people discussed this in apple forum: https://developer.apple.com/forums/thread/649918

@letiendungbk
Copy link

We can consider to remove armv7 from all Valid Architectures (main project, pods project) because armv7 is only used for old devices

@tattn
Copy link

tattn commented Jun 29, 2020

I added the workaround to avoid the archive issue (#3247)
Please try the following if you use Carthage:

github "tattn/Alamofire" "hotfix-xcode12"

@mtangoo
Copy link

mtangoo commented Jun 29, 2020

I added the workaround to avoid the archive issue (#3247)
Please try the following if you use Carthage:
github "tattn/Alamofire" "hotfix-xcode12"

This makes the build stage pass!

@dingtianran
Copy link

Encountered this at Xcode 12 beta 2 as well :(

@dingtianran
Copy link

Error persists at Xcode 12 beta 3 (12A8169g)

@jshier
Copy link
Contributor

jshier commented Jul 22, 2020

I urge everyone who is seeing this issue to file reports with Apple so they can prioritize a fix. Feel free to duplicate my initial report, FB7764057.

@gbreen12
Copy link

How can I file a report with Apple? I've never done that

@jshier
Copy link
Contributor

jshier commented Jul 22, 2020

@gbreen12 Use the Feedback Assistant app on macOS or follow these directions.

@ko7tya
Copy link

ko7tya commented Jul 28, 2020

Increase iOS version in deployment info of alamofire target in Pods project, from 8.0 to 12.0 helps me to resolve this issue

@HatsuneMikuV
Copy link

HatsuneMikuV commented Jul 29, 2020

podfile

post_install do |pi|
    pi.pods_project.targets.each do |t|
      t.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
      end
    end
end

I hope to help you solve the problem

@jshier
Copy link
Contributor

jshier commented Jul 29, 2020

Yes, any deployment target of iOS 11 and above should avoid the 32-bit compilation issues, as that's the first version that dropped support.

@gbreen12
Copy link

gbreen12 commented Aug 4, 2020

Anyone try this on beta 4 yet?

@jshier
Copy link
Contributor

jshier commented Aug 4, 2020

I was able to archive the framework using Xcode 12b4, but I'll let one of the other reporters confirm before closing this issue.

@dingtianran
Copy link

🤯
Xcode 12.0 beta 4 (12A8179i) passed, finally

@gbreen12
Copy link

gbreen12 commented Aug 4, 2020

It's still failing for me. I'm using Alamofire in a project with Carthage. Not sure if there is some difference there.

@jshier
Copy link
Contributor

jshier commented Aug 4, 2020

@gbreen12 Make sure to clear your Carthage dependencies and rebuild with the new version of Xcode.

@gbreen12
Copy link

gbreen12 commented Aug 4, 2020

It's weird I am getting this error:
Build Failed
Task failed with exit code 1:
/usr/bin/xcrun lipo -create /Users/garett/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A8179i/Alamofire/5.2.2/Build/Intermediates.noindex/ArchiveIntermediates/Alamofire\ iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework/Alamofire /Users/garett/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A8179i/Alamofire/5.2.2/Build/Products/Release-iphonesimulator/Alamofire.framework/Alamofire -output /Users/garett/src/cuwcd/mobilehelpers.data/Carthage/Build/iOS/Alamofire.framework/Alamofire

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/p0/d977974s4vq_3xqjv71sc1gm0000gn/T/carthage-xcodebuild.KMmG6X.log

But when I look at the log file it says it succeeded...

carthage-xcodebuild.KMmG6X.log

@jshier
Copy link
Contributor

jshier commented Aug 4, 2020

@gbreen12 Perhaps an issue with Carthage, make sure you're running the latest version.

@gbreen12
Copy link

gbreen12 commented Aug 4, 2020

Looks like it is a problem with Carthage: Carthage/Carthage#3019

I tried to archive the Alamofire project that got downloaded via Carthage and it archived fine so seems like this issue can be closed to me.

@jshier
Copy link
Contributor

jshier commented Aug 7, 2020

Looks like this is fixed in Xcode 12b4, so I'm closing this issue. Thanks for the input everyone!

@shubhendu-shukla
Copy link

I am getting the error while compiling on Xcode 12 beta 5. I am using Carthage

@jshier
Copy link
Contributor

jshier commented Aug 24, 2020

@shubhendu-shukla You need to rebuild your dependencies using the newer Xcode 12 to see the fix. Additionally, there are Carthage issues with Xcode 12 in general, so you might need to investigate those as well.

@shubhendu-shukla
Copy link

@shubhendu-shukla You need to rebuild your dependencies using the newer Xcode 12 to see the fix. Additionally, there are Carthage issues with Xcode 12 in general, so you might need to investigate those as well.

I am already compiling with Xcode 12. But Alamofire is breaking while compiling Carthage.

@jshier
Copy link
Contributor

jshier commented Aug 25, 2020

What error are you getting exactly?

@shubhendu-shukla
Copy link

shubhendu-shukla commented Aug 25, 2020

What error are you getting exactly?


Building scheme "Alamofire iOS" in Alamofire.xcworkspace
Build Failed
	Task failed with exit code 1:
	/usr/bin/xcrun lipo -create /Users/shubhendushukla/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A8189h/Alamofire/hotfix-xcode12/Build/Intermediates.noindex/ArchiveIntermediates/Alamofire\ iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework/Alamofire /Users/shubhendushukla/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A8189h/Alamofire/hotfix-xcode12/Build/Products/Release-iphonesimulator/Alamofire.framework/Alamofire -output /Users/shubhendushukla/Documents/Carousell-iOS/Carthage/Build/iOS/Alamofire.framework/Alamofire
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/0v/r7qdvvjd4nzf3hh34xdm4l2m0000gn/T/carthage-xcodebuild.FUGEYW.log
make: *** [carthage-install] Error 1

carthage-xcodebuild.FUGEYW.log

@jshier
Copy link
Contributor

jshier commented Aug 25, 2020

That's not the actual error. You need to read the actual build log to find it. However, that looks like the Carthage error mentioned above, so you should keep track of that issue to see when it's fixed.

@jbarros35
Copy link

it doesn't work anymore. Xcode 12 is official but previous projects won't compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests