Description
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
- Add AEP framework(s)
- Compile with XCode 15
- 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.