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

Armv7 related crash on build using SPM #7235

Closed
Umar-M-Haroon opened this issue Dec 31, 2020 · 7 comments
Closed

Armv7 related crash on build using SPM #7235

Umar-M-Haroon opened this issue Dec 31, 2020 · 7 comments

Comments

@Umar-M-Haroon
Copy link

Step 0: Are you in the right place?

  • For issues or feature requests related to the code in this repository
    file a Github issue.
    • If this is a feature request please use the Feature Request template.
  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general (non-iOS) Firebase discussion, use the firebase-talk
    google group.
  • For backend issues, console issues, and other non-SDK help that does not fall under one
    of the above categories, reach out to
    Firebase Support.
  • Once you've read this section and determined that your issue is appropriate for
    this repository, please delete this section.

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.3
  • Firebase SDK version: 7.31.0
  • Installation method: Swift Package Manager (select one)
  • Firebase Component: Firestore (Auth, Core, Database, Firestore, Messaging, Storage, etc)

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.

Relevant Code:

Hi! Sorry for the vagueness here, I'm trying to look towards a more reproducible method.

In short, I was working on archiving my app, which uses SPM and has Firestore, Dynamic Links, Messaging, Auth, and Storage onto a framework target. The main app uses the framework and usually runs fine. As I compiled for MacCatalyst, I had no issues, but when I compiled for any iOS device, I got the error

scattered reloc r_address too large for architecture armv7

I've tried setting armv7 as an excluded arch everywhere, but no avail. I'm wondering why it's even compiling for armv7 though. My deployment target is iOS 13.0+ so shouldn't it only need arm64? I found an old tweet regarding a similar bug, but for i386 that recommended a refactor due to the project being too large, but their project was about 100x bigger than mine.

@paulb777
Copy link
Member

From googling the error, it looks like a long-standing Xcode issue related to the size of the app.

As to why, Xcode is building armv7 when the deployment target is iOS 13, that seems like an Xcode/SPM bug. There's no reason to build and link dependencies arm7 if the app has something higher, even if the dependencies support iOS 10.

Perhaps worth asking at https://forums.swift.org/c/development/SwiftPM/ ?

I'll leave this open for discussion for awhile, but this is unlikely to be a Firebase issue.

@Umar-M-Haroon
Copy link
Author

Interesting, I'll definitely post there and hope to get a better result. I'm hoping it's not some weird size bug, as my app is only 10K LOC

@Umar-M-Haroon
Copy link
Author

here's an update, if I connect my device, select that as a run destination, then hit archive, then it succeeds.

@paulb777
Copy link
Member

paulb777 commented Jan 5, 2021

@paulb777
Copy link
Member

We'll likely need a reproducible example to provide additional assistance here.

@google-oss-bot
Copy link

Hey @Umar-M-Haroon. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link

Since there haven't been any recent updates here, I am going to close this issue.

@Umar-M-Haroon if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@firebase firebase locked and limited conversation to collaborators Mar 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants