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

Bazel 5.4.0 error import static xcframework #2547

Open
5 tasks done
havdiOS opened this issue Feb 13, 2025 · 1 comment
Open
5 tasks done

Bazel 5.4.0 error import static xcframework #2547

havdiOS opened this issue Feb 13, 2025 · 1 comment

Comments

@havdiOS
Copy link

havdiOS commented Feb 13, 2025

Checklist before submitting a bug report

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
_swift_FORCE_LOAD$swiftXPC$_FBSDKCoreKit in FBSDKCoreKit[x86_64]123
_swift_FORCE_LOAD$swiftXPC$_FBSDKShareKit in FBSDKShareKit[x86_64]4
_swift_FORCE_LOAD$_swift_Builtin_float, referenced from:
_swift_FORCE_LOAD$swift_Builtin_float$_FBAEMKit in FBAEMKit[x86_64]3
_swift_FORCE_LOAD$swift_Builtin_float$_FBSDKCoreKit in FBSDKCoreKit[x86_64]123
_swift_FORCE_LOAD$swift_Builtin_float$_FBSDKShareKit in FBSDKShareKit[x86_64]4
_swift_FORCE_LOAD$_swift_errno, referenced from:
_swift_FORCE_LOAD$swift_errno$_FBAEMKit in FBAEMKit[x86_64]3
_swift_FORCE_LOAD$swift_errno$_FBSDKCoreKit in FBSDKCoreKit[x86_64]123
_swift_FORCE_LOAD$swift_errno$_FBSDKShareKit in FBSDKShareKit[x86_64]4
_swift_FORCE_LOAD$_swift_math, referenced from:
_swift_FORCE_LOAD$swift_math$_FBAEMKit in FBAEMKit[x86_64]3
_swift_FORCE_LOAD$swift_math$_FBSDKCoreKit in FBSDKCoreKit[x86_64]123
_swift_FORCE_LOAD$swift_math$_FBSDKShareKit in FBSDKShareKit[x86_64]4
_swift_FORCE_LOAD$_swift_signal, referenced from:
_swift_FORCE_LOAD$swift_signal$_FBAEMKit in FBAEMKit[x86_64]3
_swift_FORCE_LOAD$swift_signal$_FBSDKCoreKit in FBSDKCoreKit[x86_64]123
_swift_FORCE_LOAD$swift_signal$_FBSDKShareKit in FBSDKShareKit[x86_64]4
_swift_FORCE_LOAD$_swift_stdio, referenced from:
_swift_FORCE_LOAD$swift_stdio$_FBAEMKit in FBAEMKit[x86_64]3
_swift_FORCE_LOAD$swift_stdio$_FBSDKCoreKit in FBSDKCoreKit[x86_64]123
_swift_FORCE_LOAD$swift_stdio$_FBSDKShareKit in FBSDKShareKit[x86_64]4
_swift_FORCE_LOAD$_swift_time, referenced from:
_swift_FORCE_LOAD$swift_time$_FBAEMKit in FBAEMKit[x86_64]3
_swift_FORCE_LOAD$swift_time$_FBSDKCoreKit in FBSDKCoreKit[x86_64]123
_swift_FORCE_LOAD$swift_time$_FBSDKShareKit in FBSDKShareKit[x86_64]4
_swift_FORCE_LOAD$_swiftsys_time, referenced from:
_swift_FORCE_LOAD$swiftsys_time$_FBAEMKit in FBAEMKit[x86_64]3
_swift_FORCE_LOAD$swiftsys_time$_FBSDKCoreKit in FBSDKCoreKit[x86_64]123
_swift_FORCE_LOAD$swiftsys_time$_FBSDKShareKit in FBSDKShareKit[x86_64]4
_swift_FORCE_LOAD$_swiftunistd, referenced from:
_swift_FORCE_LOAD$swiftunistd$_FBAEMKit in FBAEMKit[x86_64]3
_swift_FORCE_LOAD$swiftunistd$_FBSDKCoreKit in FBSDKCoreKit[x86_64]123
_swift_FORCE_LOAD$swiftunistd$_FBSDKShareKit in FBSDKShareKit[x86_64]4
_swift_willThrowTypedImpl, referenced from:
(extension in FBSDKShareKit):__C.PHImageManager.fb_findImage(for: __C.PHAsset) throws -> __C.UIImage in FBSDKShareKit[x86_64]16
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Steps to reproduce

No response

Code samples & details

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"],
)
@YunzeGao
Copy link

YunzeGao commented Mar 7, 2025

Did you solve the problem?

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

No branches or pull requests

2 participants