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 15 linker warnings #2251

Open
5 tasks done
pastey opened this issue Aug 23, 2023 · 1 comment
Open
5 tasks done

Xcode 15 linker warnings #2251

pastey opened this issue Aug 23, 2023 · 1 comment

Comments

@pastey
Copy link

pastey commented Aug 23, 2023

Checklist before submitting a bug report

Xcode version

15.0 beta 7

Facebook iOS SDK version

16.1.3

Dependency Manager

SPM

SDK Framework

Core

Goals

Get rid of linker warnings

Expected results

No linker warings

Actual results

Ignoring duplicate libraries: '-lc++', '-lz'

Steps to reproduce

Please find the sample project attached. SampleApp.zip

Xcode 15 beta 7.
App that links with 'z' and 'c++' libraries.
Integrate the latest Facebook SDK using SPM.

This setup results in linker waring:
Ignoring duplicate libraries: '-lc++', '-lz'

The issues is that linkerSettings used in Package.swift and the existing project settings produce duplicate '-lc++' and '-lz' with .

extension LinkerSetting {
    static let cPlusPlusLibrary = linkedLibrary("c++")
    static let zLibrary = linkedLibrary("z")
    static let accelerateFramework = linkedFramework("Accelerate")
}

...

static let core = target(
        name: .core,
        dependencies: [.aem, .Prefixed.basics, .Prefixed.core],
        linkerSettings: [
            .cPlusPlusLibrary,
            .zLibrary,
            .accelerateFramework,
        ]
)

This sounds more like the issue for Apple, and I've file one.
But maybe you would consider removing these linkerSettings?
I understand that this might be not that easy:

  • clients will have to link with the necessary SDK dependencies themselves
  • one possible solution is to specify the type of the library produced by the package, so that it will be dynamic framework that links with it's own dependencies

Code samples & details

No response

@pastey pastey changed the title Xcode 15 linker warings Xcode 15 linker warnings Aug 23, 2023
@chwo
Copy link

chwo commented Sep 22, 2023

Now that Xcode 15 is officially released can you give an ETA when this will be fixed?

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

No branches or pull requests

2 participants