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

Duplicate library warning in Xcode 15 Beta #1574

Open
rzulkoski opened this issue Aug 23, 2023 · 7 comments
Open

Duplicate library warning in Xcode 15 Beta #1574

rzulkoski opened this issue Aug 23, 2023 · 7 comments
Labels
bug Confirmed bug

Comments

@rzulkoski
Copy link

Describe the bug

When building a project that brings in Bugsnag through SPM in Xcode 15 the following warning is shown:
Screenshot 2023-08-23 at 12 18 16 PM

Steps to reproduce

  1. Open a project that brings in Bugsnag through SPM in Xcode 15
  2. Build the project
  3. See warnings

Environment

  • Bugsnag version: 6.27.2
  • iOS/tvOS/macOS version(s): iOS 17.0 beta 7
  • Simulator or physical device: Both
  • Xcode version: Xcode 15.0 Beta 7 (15A5229h)
  • Swift version (if applicable): 5.9
Error messages:
ld: warning: ignoring duplicate libraries: '-lc++', '-lz'
@rzulkoski
Copy link
Author

Sentry appears to have fixed these warnings by removing the linker settings from their Package.swift.

getsentry/sentry-cocoa#3122 (comment)

@mclack
Copy link

mclack commented Aug 29, 2023

Hi @rzulkoski
Thanks for bringing this to our attention. We are currently investigating this and will look to get it fixed. We'll make sure to post any updates on this thread.

@mclack mclack added bug Confirmed bug backlog We hope to fix this feature/bug in the future labels Aug 29, 2023
@jnozzi
Copy link

jnozzi commented Sep 18, 2023

Hi there! Is there any update on this? I imagine I'm not the only one running afoul of "warnings as errors" in the CI process. 😆

@clr182
Copy link

clr182 commented Sep 20, 2023

Hi @jnozzi
We have no update on this just yet, however we will be sure to update this thread when we have more information to share.

@chickdan
Copy link

chickdan commented Sep 22, 2023

FYI I'm also seeing this warning via Cocoapods in Xcode 15.

@mclack
Copy link

mclack commented Oct 2, 2023

Thank you all for your patience while we've been looking into this.

This issue looks to be caused by an incompatibility of the current GCC compiler and Xcode 15. It has been raised here, and a fix has been promised.

After investigating possible changes we could make to our project files, it currently seems highly unlikely we'll find an appropriate resolution before getting a fix from Homebrew.

Because of the above, the short term workarounds we recommend are either of the following:

  1. Use version 14 of the Xcode Command Line Tools.
  2. Update each target that reports the warning to add "-Wl -ld_classic" to the OTHER_LINKER_FLAGS build setting.

As this is just a warning, these immediate workarounds will only be required for those of you who treat warnings as errors.

@mclack mclack removed the backlog We hope to fix this feature/bug in the future label Oct 2, 2023
@jnozzi
Copy link

jnozzi commented Oct 2, 2023

I’ve just discovered that the more sharply-focused -Xlinker -no_warn_duplicate_libraries in OTHER_LINKER_FLAGS is sufficient under XC15.

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

No branches or pull requests

5 participants