facebook / facebook/facebook-ios-sdk

Xcode 15 warnings

Open
#2,248 5 comments 8 reactions 0 assignees View on GitHub
bug needs-triage
Dominant language
Swift
Stars
8.1k
Forks
3.7k
PR merge metrics
No merged PRs in 30d

Description

### Checklist before submitting a bug report

- [X] I've updated to the latest released version of the SDK
- [X] I've searched for existing [GitHub issues](https://github.com/facebook/facebook-ios-sdk/issues)
- [X] I've looked for existing answers on [Stack Overflow](https://facebook.stackoverflow.com), the [Facebook Developer Community Forum](https://developers.facebook.com/community/) and the [Facebook Developers Group](https://www.facebook.com/groups/fbdevelopers)
- [X] I've read the [Code of Conduct](https://github.com/facebook/facebook-ios-sdk/blob/main/CODE_OF_CONDUCT.md)
- [X] This issue is not security related and can safely be disclosed publicly on GitHub

### Xcode version

Xcode 15.0 Beta 6 (15A5219j)

### Facebook iOS SDK version

16.1.3

### Dependency Manager

CocoaPods

### SDK Framework

Login

### Goals

Warning-free compilation

### Expected results

Compilation completes without warnings

### Actual results

Compilation competes with following warnings:
```
ld: warning: duplicate LC_RPATH are deprecated ('@executable_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('@loader_path/Frameworks')
```

### Steps to reproduce

1. Integrate FBSDKLoginKit to iOS project via CocoaPods
2. Compile project with Xcode 15 Beta 6
3. After compilation completes get warnings in compile target linking step
image

Initially Xcode doesn't specify which binary generates this warning, to find out it I copy target linking command from Xcode's build log and run it directly in the terminal, adding argument for additional linker logging:
`-t Logs each file (object, archive, or dylib) the linker loads. Useful for debugging problems with search paths where the wrong library is loaded.`
```sh
/Applications/Xcode-15.0.0-Beta.6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -t ....very long args list....
```
Output:
```sh
...
/Users/kattouf/Library/Developer/Xcode/DerivedData/MyApp-cwrffmwjdlzeiyarzpcebcovosub/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/FBAEMKit/FBAEMKit.framework/FBAEMKit
ld: warning: duplicate LC_RPATH are deprecated ('@executable_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('@loader_path/Frameworks')
...
/Users/kattouf/Library/Developer/Xcode/DerivedData/MyApp-cwrffmwjdlzeiyarzpcebcovosub/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/FBSDKCoreKit/FBSDKCoreKit.framework/FBSDKCoreKit
ld: warning: duplicate LC_RPATH are deprecated ('@executable_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('@loader_path/Frameworks')
...
/Users/kattouf/Library/Developer/Xcode/DerivedData/MyApp-cwrffmwjdlzeiyarzpcebcovosub/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/FBSDKCoreKit_Basics/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics
ld: warning: duplicate LC_RPATH are deprecated ('@executable_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('@loader_path/Frameworks')
...
/Users/kattouf/Library/Developer/Xcode/DerivedData/MyApp-cwrffmwjdlzeiyarzpcebcovosub/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/FBSDKLoginKit/FBSDKLoginKit.framework/FBSDKLoginKit
ld: warning: duplicate LC_RPATH are deprecated ('@executable_path/Frameworks')
ld: warning: duplicate LC_RPATH are deprecated ('@loader_path/Frameworks')
...
```

Then I manually checked one of arm64 binary to confirm the warning by printing load commands:
```sh
otool -arch arm64 -l Pods/FBSDKLoginKit/XCFrameworks/FBSDKLoginKit.xcframework/ios-arm64/FBSDKLoginKit.framework/FBSDKLoginKit | rg -A 2 -B 1 LC_RPATH
```
And got output, where we see that `@executable_path/Frameworks` and `@loader_path/Frameworks` are defined twice:
```sh
Load command 36
cmd LC_RPATH
cmdsize 32
path /usr/lib/swift (offset 12)
Load command 37
cmd LC_RPATH
cmdsize 40
path @executable_path/Frameworks (offset 12)
Load command 38
cmd LC_RPATH
cmdsize 40
path @loader_path/Frameworks (offset 12)
Load command 39
cmd LC_RPATH
cmdsize 40
path @executable_path/Frameworks (offset 12)
Load command 40
cmd LC_RPATH
cmdsize 40
path @loader_path/Frameworks (offset 12)
```

### Code samples & details

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.