Skip to content

How to ignore duplicate symbols error in a lib file? #29827

@rexlow

Description

@rexlow

We are trying to integrating a .a static lib file into a React Native project. During build time, we encountered an error where a symbol (constant) is found declared multiple times in the single .a file.

We also try to integrate it into a normal Xcode project while having largely the same build configuration. Xcode would only emit warnings about the duplicate symbols and the build was successful.

The screenshot below shows the linker flags we are using in the react-native project. Xcode would treat the warning as errors and will not allow the build to proceed. We suspect it was the inherited linker flags that came from other required react-native pods that cause this issue. Is there a way to ignore this error or to build them separately?

eee

Environment

System:
    OS: macOS 10.15.5
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 744.55 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.18.2 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.5 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 23, 28, 29, 30
      Build Tools: 26.0.2, 28.0.3, 29.0.2, 30.0.0
      System Images: android-30 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 11.6/11E708 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_252 - /usr/bin/javac
    Python: 2.7.16 - /Users/rexlow/.pyenv/shims/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: 0.63.2 => 0.63.2
  npmGlobalPackages:
    *react-native*: Not Found

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: AttentionIssues where the author has responded to feedback.Needs: Environment InfoPlease run `react-native info` and edit your issue with that command's output.Resolution: For Stack OverflowA question for Stack Overflow. Applying this label will cause issue to be closed.Resolution: LockedThis issue was locked by the bot.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions