spotify / XCRemoteCache

Other
825 stars 50 forks source link

[WatchOS] Duplicate symbols for architecture x86_64 #187

Closed canhth closed 1 year ago

canhth commented 1 year ago

First of all, thanks for supporting us with this: https://github.com/spotify/XCRemoteCache/pull/185 🙇

This issue is a part of https://github.com/spotify/XCRemoteCache/issues/184

My integration setup [ x ] CocoaPods cocoapods-xcremotecache plugin

Minimal reproduction of the problem with instructions

Consumer Logs

....
Users/~/Library/Developer/Xcode/DerivedData/MyApp-hbydakxttvkkggdnfmcfqpdwplfx/Build/Products/Dev Debug-watchsimulator/SwiftyRSA-watchOS/SwiftyRSA.framework/SwiftyRSA(X509Certificate.o)
ld: 49994 duplicate symbols for architecture x86_64

Others If using the previous demo project, we will get another issue:

Screen Shot 2023-03-10 at 19 16 31

Fix the example with ['EXCLUDED_ARCHS[sdk=watchsimulator*]'] = 'arm64' for the Watch target seems working, but this solution doesn't work for my real project.

polac24 commented 1 year ago

Hi! thanks for a reproduciable project. I found that we don't mock lipo tool so to fix that, we have to add it, similarly to our existing libtool -> xclibtool.

The fix is simple, but because we need some e2e tests to cover, that will be able to look on that in a couple days.

canhth commented 1 year ago

Thanks a lot @polac24 for your quick response. 💯 I hope we will have the new release soon. Our CI machine's performance has reduced quite a lot since we got the issue with the Watch App. Once again, thank you for always supporting us.

polac24 commented 1 year ago

Sure, will release a new version right after merging it to the master.

So I assume, you had to disable the remote cache completely? I thought you just exclude it for the Watch App, by adding watch targets to the exclude_targets described here

canhth commented 1 year ago

I've tried to add the Watch target to exclude_targets list, but it didn't work. Maybe the Target contains space? Ex: "MyApp Watch App"

(There are no XCRC steps in Build Phases for the Watch target, but still getting the error duplicate symbols for architecture x86_64)