facebook-ios-sdk icon indicating copy to clipboard operation
facebook-ios-sdk copied to clipboard

Xcode 15 linker warnings

Open pastey opened this issue 1 year ago • 1 comments

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 avatar Aug 23 '23 08:08 pastey

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

chwo avatar Sep 22 '23 07:09 chwo