Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Build fails in Xcode 13.3.1 #142

@jeff-groove

Description

@jeff-groove

Describe the bug
Project is unable to build when using the LaunchDarkly client SDK and Xcode 13.3.1. Build always fails with error ld: symbol(s) not found for architecture .... LaunchDarkly-specific context in logs below.

To reproduce
Attempt to build a React Native project with the LaunchDarkly client SDK as a dependency using Xcode 13.3.1.

Expected behavior
The project should successfully build.

Logs

Undefined symbols for architecture x86_64:
  "_swift_stdlib_isStackAllocationSafe", referenced from:
      function signature specialization <Arg[1] = Owned To Guaranteed> of generic specialization <Swift.String, Swift._NativeSet<Swift.String>> of Swift._NativeSet.genericIntersection<A where A == A1.Element, A1: Swift.Sequence>(A1) -> Swift._NativeSet<A> in libLaunchDarkly.a(FlagChangeNotifier.o)
      function signature specialization <Arg[1] = Owned To Guaranteed> of generic specialization <Swift.String> of Swift._NativeSet.intersection(Swift._NativeSet<A>) -> Swift._NativeSet<A> in libLaunchDarkly.a(FlagChangeNotifier.o)
      function signature specialization <Arg[1] = Owned To Guaranteed, Arg[2] = Owned To Guaranteed> of function signature specialization <Arg[0] = [Closure Propagated : closure #1 (Swift.String) -> Swift.Bool in LaunchDarkly.FlagChangeNotifier.(findChangedFlagKeys in _AAE936965AC09485A5BF28D82C960463)(oldFlags: Swift.Dictionary<Swift.String, LaunchDarkly.FeatureFlag>, newFlags: Swift.Dictionary<Swift.String, LaunchDarkly.FeatureFlag>) -> Swift.Array<Swift.String>, Argument Types : [[Swift.String : LaunchDarkly.FeatureFlag][Swift.String : LaunchDarkly.FeatureFlag]]> of generic specialization <Swift.String> of Swift._NativeSet.filter((A) throws -> Swift.Bool) throws -> Swift._NativeSet<A> in libLaunchDarkly.a(FlagChangeNotifier.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

SDK version
6.2.0

Language version, developer tools
Xcode 13.3.1

OS/platform
Builds attempted on Macbook Pro and CI/CD environment running a macOS image, failing in both locations.

Additional context
Possibly related to open issue #140, however none of our build environments utilize M1 chips. Also this appears to only happen in "Release" builds, "Debug" builds are still able to be created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions