Rapsssito / react-native-tcp-socket

React Native TCP socket API for Android, iOS & macOS with SSL/TLS support.
MIT License
316 stars 81 forks source link

duplicate symbols for architecture x86_64 #141

Closed Florent75 closed 2 years ago

Florent75 commented 2 years ago

Description

Module preventing to compile project due to an error "duplicate symbols for architecture x86_64"

Steps to reproduce

1 - npm install --save react-native-tcp-socket 2 - Pod install 3 - clean Build Project 4 - Delete Derived data 5 - Launch Compilation

Current behavior

... duplicate symbol '_OBJCIVAR$_GCDAsyncUdpSocket.cachedLocalPort4' in: /Users/florent/Library/Developer/Xcode/DerivedData/Hermes-dxhzvnkbnyrabocodwsqwfpatpub/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket/libCocoaAsyncSocket.a(GCDAsyncUdpSocket.o) /Users/florent/Desktop/Bocoloco/git_florent_reactnative/HermesNative/florent_reactnative_hermes/node_modules/react-native-thermal-receipt-printer/ios/PrinterSDK/libPrinterSDK.a(GCDAsyncUdpSocket.o) duplicate symbol '_OBJCIVAR$_GCDAsyncUdpSocket.cachedLocalAddress4' in: /Users/florent/Library/Developer/Xcode/DerivedData/Hermes-dxhzvnkbnyrabocodwsqwfpatpub/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket/libCocoaAsyncSocket.a(GCDAsyncUdpSocket.o) /Users/florent/Desktop/Bocoloco/git_florent_reactnative/HermesNative/florent_reactnative_hermes/node_modules/react-native-thermal-receipt-printer/ios/PrinterSDK/libPrinterSDK.a(GCDAsyncUdpSocket.o) duplicate symbol '_OBJCIVAR$_GCDAsyncUdpSocket.writeStream4' in: /Users/florent/Library/Developer/Xcode/DerivedData/Hermes-dxhzvnkbnyrabocodwsqwfpatpub/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket/libCocoaAsyncSocket.a(GCDAsyncUdpSocket.o) /Users/florent/Desktop/Bocoloco/git_florent_reactnative/HermesNative/florent_reactnative_hermes/node_modules/react-native-thermal-receipt-printer/ios/PrinterSDK/libPrinterSDK.a(GCDAsyncUdpSocket.o) duplicate symbol '_OBJCIVAR$_GCDAsyncUdpSocket.readStream4' in: /Users/florent/Library/Developer/Xcode/DerivedData/Hermes-dxhzvnkbnyrabocodwsqwfpatpub/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket/libCocoaAsyncSocket.a(GCDAsyncUdpSocket.o) /Users/florent/Desktop/Bocoloco/git_florent_reactnative/HermesNative/florent_reactnative_hermes/node_modules/react-native-thermal-receipt-printer/ios/PrinterSDK/libPrinterSDK.a(GCDAsyncUdpSocket.o)

| react-native | 0.62.2 | | react-native-tcp-socket | 5.6.0 |

I tried the following "solution" from other post without success 1 - Could not remove the Compile source of tcp packet module in Pods Target because there is no line corresponding 2 - Quit Xcode 3 - Remove Derived Data

EDIT : If I remove the react-native-thermal-receipt-printer package, it works well. So there is a conflict between the two packages. I also have some screenshot of the pods Target windows in case it could be useful.

Does anyone has any other solution ?

Rapsssito commented 2 years ago

@Florent75, this might be more an issue with "react-native-thermal-receipt-printer" if they are adding the pods directly to their codebase instead of calling them as a dependency.

github-actions[bot] commented 2 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.