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 warnings (linker) #970

Open
3 tasks done
MasekHJ opened this issue Oct 12, 2023 · 1 comment
Open
3 tasks done

Xcode 15 warnings (linker) #970

MasekHJ opened this issue Oct 12, 2023 · 1 comment
Labels
bug Something isn't working. Used by issue templates

Comments

@MasekHJ
Copy link

MasekHJ commented Oct 12, 2023

Prerequisites

  • This is not a Security Disclosure, otherwise please follow the guidelines in Security Policy.
  • I have searched in this repository's issues to see if it has already been reported.
  • I have updated to the latest released version of the SDK and the issue still persists.

Bug summary

Compiling with AEP frameworks generate warnings about duplicate LC_RPATH and other linker warnings.

ld: warning: ignoring duplicate libraries: '-lc++', '-lz'
ld: warning: duplicate LC_RPATH are deprecated ('/usr/lib/swift')
ld: warning: duplicate LC_RPATH are deprecated ('@executable_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('@loader_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('/usr/lib/swift')
ld: warning: duplicate LC_RPATH are deprecated ('@executable_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('@loader_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('/usr/lib/swift')
ld: warning: duplicate LC_RPATH are deprecated ('@executable_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('@loader_path/Frameworks')

Initially Xcode doesn't specify which binary generates this warning -> used command to find 'culprits':

/Applications/Xcode-15.0.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -t -target arm64-apple-ios15.0 -isysroot (notice the -t parameter)

Output:

products/redacted/AEPAnalytics.framework/AEPAnalytics
ld: warning: duplicate LC_RPATH are deprecated ('/usr/lib/swift')
ld: warning: duplicate LC_RPATH are deprecated ('@executable_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('@loader_path/Frameworks')
/Users/redacted/Library/Developer/Xcode/DerivedData/redacted-fzmivokzgbblbzfrttwrzrjkfzjf/Build/Products/redacted/AEPCore.framework/AEPCore
ld: warning: duplicate LC_RPATH are deprecated ('/usr/lib/swift')
ld: warning: duplicate LC_RPATH are deprecated ('@executable_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('@loader_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('/usr/lib/swift')
ld: warning: duplicate LC_RPATH are deprecated ('@executable_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('@loader_path/Frameworks')

and so on

Then manual check of the output to confirm the issue (found culprits - aepcore, aepanalytics mainly):

otool -arch arm64 -l AEPCore.xcframework/ios-arm64_armv7/AEPCore.framework/AEPCore

Output (you can see multiple path loads):

Load command 34
          cmd LC_RPATH
      cmdsize 32
         path /usr/lib/swift (offset 12)
Load command 35
          cmd LC_RPATH
      cmdsize 32
         path /usr/lib/swift (offset 12)
Load command 36
          cmd LC_RPATH
      cmdsize 40
         path @executable_path/Frameworks (offset 12)
Load command 37
          cmd LC_RPATH
      cmdsize 40
         path @loader_path/Frameworks (offset 12)

Environment

OS: irrelevant (happens during compile time)
SDKs(s): AEPCore 3.7.0 (and possibly others like AEPAnalytics and other AEP frameworks)
IDE: Xcode 15 (15A240d)

Steps to reproduce

  1. Add AEP framework(s)
  2. Compile with XCode 15
  3. Warnings about duplicate LC_RPATH show up

Current behavior

Compiling AEP frameworks produce duplicate errors with new Xcode 15 linker.

Expected behavior

Frameworks do not generate duplicate warnings during compile time

Anything else?

Similar issues can be found with other SDK(s) like firebase, facebook. Might be needed to be changed on Apple's side, however we should check if thats the case.

@MasekHJ MasekHJ added bug Something isn't working. Used by issue templates triage-required Triage required on a new issue logged for this project. Used by issue templates labels Oct 12, 2023
@cdhoffmann
Copy link
Contributor

Hey @MasekHJ. Thanks for reporting this issue. It appears to be a bug with Xcode 15 as reported by many users here. We will keep an eye on it and update this issue as necessary.

@praveek praveek removed the triage-required Triage required on a new issue logged for this project. Used by issue templates label Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. Used by issue templates
Projects
None yet
Development

No branches or pull requests

3 participants