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

React Native build failing: duplicate symbols for architecture arm64 #116

Open
AliMeer opened this issue Jan 25, 2021 · 4 comments
Open

Comments

@AliMeer
Copy link

AliMeer commented Jan 25, 2021

Hi,

I am trying to use this module in a React Native project.

I have tried to build for ios and its failing with an error: "duplicate symbols for architecture arm64"
I am using node verison 14
React Native version 0.63
and the latest XCode version 12.3

More error output below:

13 duplicate symbols for architecture arm64

duplicate symbol 'OBJC_CLASS$_TcpSocketClient' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSocketClient.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSocketClient.o)
duplicate symbol 'OBJC_METACLASS$_TcpSocketClient' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSocketClient.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSocketClient.o)
duplicate symbol 'OBJC_IVAR$_TcpSocketClient._tcpSocket' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSocketClient.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSocketClient.o)
duplicate symbol 'OBJC_IVAR$_TcpSocketClient._pendingSends' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSocketClient.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSocketClient.o)
duplicate symbol '_RCTTCPErrorDomain' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSocketClient.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSocketClient.o)
duplicate symbol 'OBJC_IVAR$_TcpSocketClient._lock' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSocketClient.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSocketClient.o)
duplicate symbol 'OBJC_IVAR$_TcpSocketClient._sendTag' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSocketClient.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSocketClient.o)
duplicate symbol 'OBJC_IVAR$_TcpSocketClient._clientDelegate' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSocketClient.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSocketClient.o)
duplicate symbol 'OBJC_IVAR$_TcpSocketClient._id' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSocketClient.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSocketClient.o)
duplicate symbol 'OBJC_IVAR$_TcpSockets._clients' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSockets.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSockets.o)
duplicate symbol 'OBJC_CLASS$_TcpSockets' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSockets.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSockets.o)
duplicate symbol 'OBJC_METACLASS$_TcpSockets' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSockets.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSockets.o)
duplicate symbol 'OBJC_IVAR$_TcpSockets._counter' in:
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/TcpSockets/libTcpSockets.a(TcpSockets.o)
/Users/ali/Library/Developer/Xcode/DerivedData/HEXA-gsiembgiloupdqgkpctpopctnicw/Build/Products/Debug-iphoneos/react-native-tcp/libreact-native-tcp.a(TcpSockets.o)
ld: 13 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@AliMeer AliMeer changed the title React Native build in XCode issue: duplicate symbols for architecture arm64 React Native build failing: duplicate symbols for architecture arm64 Jan 25, 2021
@jalesingh
Copy link

jalesingh commented Mar 5, 2021

We are also getting the same error, please help.
@AliMeer : Have you resolved this issue ?

@aprock : Hey Buddy, check into this we already spend a lot of time :-(
We are using react-native-version: 0.63.2
react-native-tcp: 4.0.0
Xcode version: 12.4
mentioned below line in Podfile file as well
pod 'TcpSockets', :path => '../node_modules/react-native-tcp'

duplicate symbol 'OBJC_IVAR$_GCDAsyncSocket.socket6FD' in:
/Users/anmol.d/Library/Developer/Xcode/DerivedData/ExperienceRIL-gtggcbtawqmfgsbadgsjuuckttel/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket/libCocoaAsyncSocket.a(GCDAsyncSocket.o)
/Users/anmol.d/Library/Developer/Xcode/DerivedData/ExperienceRIL-gtggcbtawqmfgsbadgsjuuckttel/Build/Products/Debug-iphonesimulator/TcpSockets/libTcpSockets.a(GCDAsyncSocket.o)
duplicate symbol 'OBJC_IVAR$_GCDAsyncSocket.socket4FD' in:
/Users/anmol.d/Library/Developer/Xcode/DerivedData/ExperienceRIL-gtggcbtawqmfgsbadgsjuuckttel/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket/libCocoaAsyncSocket.a(GCDAsyncSocket.o)
/Users/anmol.d/Library/Developer/Xcode/DerivedData/ExperienceRIL-gtggcbtawqmfgsbadgsjuuckttel/Build/Products/Debug-iphonesimulator/TcpSockets/libTcpSockets.a(GCDAsyncSocket.o)
duplicate symbol 'OBJC_IVAR$_GCDAsyncSocket.connectInterface6' in:
/Users/anmol.d/Library/Developer/Xcode/DerivedData/ExperienceRIL-gtggcbtawqmfgsbadgsjuuckttel/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket/libCocoaAsyncSocket.a(GCDAsyncSocket.o)
/Users/anmol.d/Library/Developer/Xcode/DerivedData/ExperienceRIL-gtggcbtawqmfgsbadgsjuuckttel/Build/Products/Debug-iphonesimulator/TcpSockets/libTcpSockets.a(GCDAsyncSocket.o)
duplicate symbol 'OBJC_IVAR$_GCDAsyncSocket.connectInterface4' in:
/Users/anmol.d/Library/Developer/Xcode/DerivedData/ExperienceRIL-gtggcbtawqmfgsbadgsjuuckttel/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket/libCocoaAsyncSocket.a(GCDAsyncSocket.o)
/Users/anmol.d/Library/Developer/Xcode/DerivedData/ExperienceRIL-gtggcbtawqmfgsbadgsjuuckttel/Build/Products/Debug-iphonesimulator/TcpSockets/libTcpSockets.a(GCDAsyncSocket.o)
ld: 79 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@Overtorment
Copy link

you are posting to a project thats dead for 3.5 years.
i suggest you use https://www.npmjs.com/package/react-native-tcp-socket

@jalesingh
Copy link

@Overtorment Thanks Man, Now I switched to react-native-tcp-socket.

@AliMeer
Copy link
Author

AliMeer commented Apr 15, 2021

@jalesingh Apologies didn't see this message. I don't remember what I did to resolve this issue.
@Overtorment Thanks, will keep that in mind 👍

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

3 participants