facebook / facebook/facebook-ios-sdk
Bazel 5.4.0 error import static xcframework
- 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
15.2
### Facebook iOS SDK version
v18.0.0
### Dependency Manager
Other / I don't know
### SDK Framework
Core
### Goals
Import static xcframework in Bazel 5.4.0
### Expected results
Import static xcframework in project with bazel
### Actual results
ld: warning: ignoring duplicate libraries: '-lc++'
ld: warning: Could not find or use auto-linked library 'swiftXPC': library 'swiftXPC' not found
ld: warning: Could not find or use auto-linked library 'swift_Builtin_float': library 'swift_Builtin_float' not found
ld: warning: Could not find or use auto-linked library 'swift_errno': library 'swift_errno' not found
ld: warning: Could not find or use auto-linked library 'swift_math': library 'swift_math' not found
ld: warning: Could not find or use auto-linked library 'swift_signal': library 'swift_signal' not found
ld: warning: Could not find or use auto-linked library 'swift_stdio': library 'swift_stdio' not found
ld: warning: Could not find or use auto-linked library 'swift_time': library 'swift_time' not found
ld: warning: Could not find or use auto-linked library 'swiftsys_time': library 'swiftsys_time' not found
ld: warning: Could not find or use auto-linked library 'swiftunistd': library 'swiftunistd' not found
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
__swift_FORCE_LOAD_$_swiftXPC, referenced from:
__swift_FORCE_LOAD_$_swiftXPC_$_FBAEMKit in FBAEMKit[x86_64][3](AEMAdvertiserMultiEntryRule.o)
__swift_FORCE_LOAD_$_swiftXPC_$_FBSDKCoreKit in FBSDKCoreKit[x86_64][123](AEMNetworker.o)
__swift_FORCE_LOAD_$_swiftXPC_$_FBSDKShareKit in FBSDKShareKit[x86_64][4](AppInviteContent.o)
__swift_FORCE_LOAD_$_swift_Builtin_float, referenced from:
__swift_FORCE_LOAD_$_swift_Builtin_float_$_FBAEMKit in FBAEMKit[x86_64][3](AEMAdvertiserMultiEntryRule.o)
__swift_FORCE_LOAD_$_swift_Builtin_float_$_FBSDKCoreKit in FBSDKCoreKit[x86_64][123](AEMNetworker.o)
__swift_FORCE_LOAD_$_swift_Builtin_float_$_FBSDKShareKit in FBSDKShareKit[x86_64][4](AppInviteContent.o)
__swift_FORCE_LOAD_$_swift_errno, referenced from:
__swift_FORCE_LOAD_$_swift_errno_$_FBAEMKit in FBAEMKit[x86_64][3](AEMAdvertiserMultiEntryRule.o)
__swift_FORCE_LOAD_$_swift_errno_$_FBSDKCoreKit in FBSDKCoreKit[x86_64][123](AEMNetworker.o)
__swift_FORCE_LOAD_$_swift_errno_$_FBSDKShareKit in FBSDKShareKit[x86_64][4](AppInviteContent.o)
__swift_FORCE_LOAD_$_swift_math, referenced from:
__swift_FORCE_LOAD_$_swift_math_$_FBAEMKit in FBAEMKit[x86_64][3](AEMAdvertiserMultiEntryRule.o)
__swift_FORCE_LOAD_$_swift_math_$_FBSDKCoreKit in FBSDKCoreKit[x86_64][123](AEMNetworker.o)
__swift_FORCE_LOAD_$_swift_math_$_FBSDKShareKit in FBSDKShareKit[x86_64][4](AppInviteContent.o)
__swift_FORCE_LOAD_$_swift_signal, referenced from:
__swift_FORCE_LOAD_$_swift_signal_$_FBAEMKit in FBAEMKit[x86_64][3](AEMAdvertiserMultiEntryRule.o)
__swift_FORCE_LOAD_$_swift_signal_$_FBSDKCoreKit in FBSDKCoreKit[x86_64][123](AEMNetworker.o)
__swift_FORCE_LOAD_$_swift_signal_$_FBSDKShareKit in FBSDKShareKit[x86_64][4](AppInviteContent.o)
__swift_FORCE_LOAD_$_swift_stdio, referenced from:
__swift_FORCE_LOAD_$_swift_stdio_$_FBAEMKit in FBAEMKit[x86_64][3](AEMAdvertiserMultiEntryRule.o)
__swift_FORCE_LOAD_$_swift_stdio_$_FBSDKCoreKit in FBSDKCoreKit[x86_64][123](AEMNetworker.o)
__swift_FORCE_LOAD_$_swift_stdio_$_FBSDKShareKit in FBSDKShareKit[x86_64][4](AppInviteContent.o)
__swift_FORCE_LOAD_$_swift_time, referenced from:
__swift_FORCE_LOAD_$_swift_time_$_FBAEMKit in FBAEMKit[x86_64][3](AEMAdvertiserMultiEntryRule.o)
__swift_FORCE_LOAD_$_swift_time_$_FBSDKCoreKit in FBSDKCoreKit[x86_64][123](AEMNetworker.o)
__swift_FORCE_LOAD_$_swift_time_$_FBSDKShareKit in FBSDKShareKit[x86_64][4](AppInviteContent.o)
__swift_FORCE_LOAD_$_swiftsys_time, referenced from:
__swift_FORCE_LOAD_$_swiftsys_time_$_FBAEMKit in FBAEMKit[x86_64][3](AEMAdvertiserMultiEntryRule.o)
__swift_FORCE_LOAD_$_swiftsys_time_$_FBSDKCoreKit in FBSDKCoreKit[x86_64][123](AEMNetworker.o)
__swift_FORCE_LOAD_$_swiftsys_time_$_FBSDKShareKit in FBSDKShareKit[x86_64][4](AppInviteContent.o)
__swift_FORCE_LOAD_$_swiftunistd, referenced from:
__swift_FORCE_LOAD_$_swiftunistd_$_FBAEMKit in FBAEMKit[x86_64][3](AEMAdvertiserMultiEntryRule.o)
__swift_FORCE_LOAD_$_swiftunistd_$_FBSDKCoreKit in FBSDKCoreKit[x86_64][123](AEMNetworker.o)
__swift_FORCE_LOAD_$_swiftunistd_$_FBSDKShareKit in FBSDKShareKit[x86_64][4](AppInviteContent.o)
_swift_willThrowTypedImpl, referenced from:
(extension in FBSDKShareKit):__C.PHImageManager.fb_findImage(for: __C.PHAsset) throws -> __C.UIImage in FBSDKShareKit[x86_64][16](PHImageManager+MediaLibrarySearching.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
### Steps to reproduce
_No response_
### Code samples & details
```swift
load(
"@build_bazel_rules_apple//apple:apple.bzl",
"apple_static_xcframework_import",
)
#============================================================
apple_static_xcframework_import(
name = "FBSDKFrameworks.FBAEMKit",
xcframework_imports = glob([
"FBAEMKit.xcframework/**",
]),
visibility = ["//visibility:public"],
)
#============================================================
apple_static_xcframework_import(
name = "FBSDKFrameworks.FBSDKCoreKit_Basics",
xcframework_imports = glob([
"FBSDKCoreKit_Basics.xcframework/**",
]),
visibility = ["//visibility:public"],
)
#============================================================
apple_static_xcframework_import(
name = "FBSDKFrameworks.FBSDKCoreKit",
xcframework_imports = glob([
"FBSDKCoreKit.xcframework/**",
]),
visibility = ["//visibility:public"],
)
#============================================================
apple_static_xcframework_import(
name = "FBSDKFrameworks.FBSDKLoginKit",
xcframework_imports = glob([
"FBSDKLoginKit.xcframework/**",
]),
visibility = ["//visibility:public"],
)
#============================================================
apple_static_xcframework_import(
name = "FBSDKFrameworks.FBSDKShareKit",
xcframework_imports = glob([
"FBSDKShareKit.xcframework/**",
]),
visibility = ["//visibility:public"],
)
```
Contributor guide
Assessment
This issue has not been assessed yet.