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

Wrong warning is emitted about the dSYMs architectures not matching when using XCFrameworks #10076

Closed
1 task done
radazzouz opened this issue Sep 21, 2020 · 8 comments
Closed
1 task done
Labels
help wanted Help from new or existing contributors would be greatly appreciated! r:xcframeworks Related to the support for XCFrameworks

Comments

@radazzouz
Copy link

Report

What did you do?

  • Download the attached sample project and unzip.
  • cd into Minimal-CocoaPods.
  • run pod install
  • Build the Minimal scheme on an iOS 14 simulator.

What did you expect to happen?

There should be no warnings.

What happened instead?

CocoaPods emits warnings about the dSYMs architectures not matching when using XCFrameworks:

warning: [CP] Vendored binary '/Users/radazzouz/Library/Developer/Xcode/DerivedData/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/PSPDFKit.build/DerivedSources/PSPDFKit.framework.ios-arm64.dSYM/Contents/Resources/DWARF/PSPDFKit' contains architectures (arm64) none of which match the current build architectures (x86_64).

This is an invalid warning because PSPDFKit.framework.ios-arm64.dSYM's binary is non-fat and it should not contain an x86_64 architecture.

lipo -info ~/Downloads/Minimal-CocoaPods/Pods/PSPDFKit/PSPDFKit.dSYMs/PSPDFKit.framework.ios-arm64.dSYM/Contents/Resources/DWARF/PSPDFKit 
Non-fat file: /Users/radazzouz/Downloads/Minimal-CocoaPods/Pods/PSPDFKit/PSPDFKit.dSYMs/PSPDFKit.framework.ios-arm64.dSYM/Contents/Resources/DWARF/PSPDFKit is architecture: arm64

And because, we're building in debug mode (Build for Active Architectures Only is enabled) on a simulator and not on an iOS devices.

CocoaPods Environment

Stack

   CocoaPods : 1.10.0.rc.1
        Ruby : ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19]
    RubyGems : 3.1.2
        Host : Mac OS X 10.15.6 (19G2021)
       Xcode : 12.0 (12A7209)
         Git : git version 2.24.3 (Apple Git-128)
Ruby lib dir : /Users/radazzouz/.rbenv/versions/2.7.1/lib
Repositories : master - git - https://github.com/CocoaPods/Specs.git @ 0c12aa8dab557001e64e7d47d86a5a9ae7e0c16d

               trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /Users/radazzouz/.rbenv/versions/2.7.1/bin/pod

Plugins

claide-plugins         : 0.9.2
cocoapods-deintegrate  : 1.0.4
cocoapods-dependencies : 1.3.0
cocoapods-plugins      : 1.0.0
cocoapods-search       : 1.0.0
cocoapods-stats        : 1.1.0
cocoapods-trunk        : 1.5.0
cocoapods-try          : 1.2.0
cocoapods_debug        : 0.1.0

Podfile

# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'

target 'Minimal' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  pod 'PSPDFKit', podspec:'https://customers.pspdfkit.com/pspdfkit-ios/nightly.podspec'
end

Project that demonstrates the issue

Minimal-CocoaPods.zip

Additional Information:

  1. The warning is only emitted when building on a Simulator or on Mac Catalyst. When building on an iOS real device, we are not getting the warning.
  2. Could be related to Issue with thinning dSYM files #7196, Pod lint fails when containing dynamic-frameworks without simulator architectures #5854, and Be more lenient when stripping frameworks and dSYMs for non fat binaries #7197
@dnkoutso
Copy link
Contributor

Thanks for the great report!

@dnkoutso dnkoutso added the help wanted Help from new or existing contributors would be greatly appreciated! label Sep 21, 2020
@dnkoutso dnkoutso added this to the 1.10.0 milestone Sep 21, 2020
@dnkoutso
Copy link
Contributor

We can fix for 1.10.0

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 2, 2020

@radazzouz fixed here #10114

I tried in your sample and for DEBUG builds I did not get the warning but for RELEASE I did which I think is correct.

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 2, 2020

@radazzouz if you want a take a look at the PR let me know if the fix appears correct.

@radazzouz
Copy link
Author

Thank you so much for the ping @dnkoutso! 👍 I just commented on the PR with my findings https://github.com/CocoaPods/CocoaPods/pull/10114/files#r498993350

@dnkoutso dnkoutso modified the milestones: 1.10.0, 1.11.0 Oct 20, 2020
@dnkoutso
Copy link
Contributor

@radazzouz I know this is a relatively old issue but I tried it again and it seems I got no warning. I am not sure however if its fixed by another PR in cocoapods or because the podspec was updated.

I am for now removing it from 1.11.0

@dnkoutso dnkoutso removed this from the 1.11.0 milestone Jul 22, 2021
@radazzouz
Copy link
Author

Thanks for the followup, @dnkoutso!

I just rested this in this slightly modified version of the sample project above and I can no longer reproduce it.

My guess is that this issue has been fixed by the changes in #10122 and the new XCFramework format that PSPDFKit uses. See https://pspdfkit.com/blog/2021/advances-in-xcframeworks/#cocoapods

@dnkoutso
Copy link
Contributor

awesome. thanks for confirming @radazzouz ! going to close for now we can re-open if something shows up or file a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Help from new or existing contributors would be greatly appreciated! r:xcframeworks Related to the support for XCFrameworks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants