Skip to content

Linking FirebaseInstallation fails with lld #10071

Closed
@sebastianv1

Description

@sebastianv1

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 13.4.1
  • Firebase SDK version: 8.7.0
  • Installation method: Zip file (select one)
  • Firebase Component: Analytics
  • Target platform(s): All

[REQUIRED] Step 2: Describe the problem

When linking our app using lld, we receive the following error:

error: framework not found for -framework FBLPromises

We discovered that this is coming from FirebaseInstallation whose LC_LINKER_OPTIONS includes FBLPromises as a load command

...
  string #1 -framework
  string #2 FBLPromises
Load command 5
     cmd LC_LINKER_OPTION
...

It appears that FBLPromises was renamed to PromisesObjC and is a dependency of FirebaseInstallation & included in the zipped release of frameworks. We do link PromisesObjC into our bundle, but my guess is that the distribution step still links against the old FBLPromises name?

This doesn't throw an error in ld though since it'll ignore invalid frameworks included by the LC_LINKER_OPTIONS flag (llvm/llvm-project#56939).

Steps to reproduce:

Link an app using lld against FirebaseInstallation + dependencies.

What happened? How can we make the problem occur?
error: framework not found for -framework FBLPromises

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    zipIssues related to binary distribution (zip file)zip-builderTools related to building the zip file.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions