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

Duplicate Symbol resulting in link error #565

Open
shridhar48 opened this issue Nov 9, 2023 · 0 comments
Open

Duplicate Symbol resulting in link error #565

shridhar48 opened this issue Nov 9, 2023 · 0 comments

Comments

@shridhar48
Copy link

After installing react-native-sqlite-storage library I am unable to run ios app

Expected Behavior

Should be able to run iOS app

Current Behavior

When I run the npx react-native run-ios command the build fails with below error
iphonesimulator/libSQLite.a(SQLite.o)
ld: 8 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Possible Solution

Should be able to integrate the library

Steps to Reproduce (for bugs)

Create a react native cli app
Integrate react-native-sqlite-storage library
Try to run the app on iOS

Context

Due to this issue we are unable to run/build the app

Your Environment

  • React Native SQLite Storage Version used: ^6.0.1
  • React Native version used: 0.71.0
  • Operating System and version (simulator or device): iOS 17 simulator (iPhone 14)
  • IDE used: Visual Studio Code

Debug logs

duplicate symbol 'OBJC_IVAR$_SQLiteResult.status' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/react-native-sqlcipher/libreact-native-sqlcipher.a[x86_64]4
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/react-native-sqlite-storage/libreact-native-sqlite-storage.a[x86_64]4
duplicate symbol '__ZN5folly19makeConversionErrorENS_14ConversionCodeENS_5RangeIPKcEE' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a[x86_64]30
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a[x86_64]14
duplicate symbol '__ZN5folly17exception_wrapper9SharedPtr4ops_E' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a[x86_64]52
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a[x86_64]31
duplicate symbol '__ZN5folly12exceptionStrERKNS_17exception_wrapperE' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a[x86_64]52
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a[x86_64]31
duplicate symbol 'OBJC_METACLASS$_SQLiteResult' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/react-native-sqlcipher/libreact-native-sqlcipher.a[x86_64]4
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/react-native-sqlite-storage/libreact-native-sqlite-storage.a[x86_64]4
duplicate symbol 'OBJC_CLASS$_SQLiteResult' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/react-native-sqlcipher/libreact-native-sqlcipher.a[x86_64]4
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/react-native-sqlite-storage/libreact-native-sqlite-storage.a[x86_64]4
duplicate symbol '__ZN5folly17exception_wrapper12ExceptionPtr4ops_E' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a[x86_64]52
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a[x86_64]31
duplicate symbol '__ZN5folly17exception_wrapper18from_exception_ptrERKSt13exception_ptr' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a[x86_64]52
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a[x86_64]31
duplicate symbol '__ZN5folly6detail11str_to_boolEPNS_5RangeIPKcEE' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a[x86_64]30
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a[x86_64]14
duplicate symbol '__ZN5folly17exception_wrapper18from_exception_ptrEOSt13exception_ptr' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a[x86_64]52
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a[x86_64]31
duplicate symbol '__ZN5folly17exception_wrapper18onNoExceptionErrorEPKc' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a[x86_64]52
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a[x86_64]31
duplicate symbol '__ZN5folly17exception_wrapper7uninit_E' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a[x86_64]52
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a[x86_64]31
duplicate symbol 'OBJC_IVAR$_SQLiteResult.message' in:
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/react-native-sqlcipher/libreact-native-sqlcipher.a[x86_64]4
/Users/AH72551/Library/Developer/Xcode/DerivedData/Anthem-botmidppqibescfpuxivlzqodhaz/Build/Products/Debug-iphonesimulator/react-native-sqlite-storage/libreact-native-sqlite-storage.a[x86_64]4
ld: 13 duplicate symbols
clang: error: linker command failed with exit code 1 (use -v to see invocation)

If I remove the library and if I run/build the app it works fine

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

No branches or pull requests

1 participant