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 Symbols when trying to compile with a library that correctly references GCDWebServer in its podspec file #3814

Open
xploSEoF opened this issue Jun 23, 2021 · 6 comments

Comments

@xploSEoF
Copy link

I've been using realm-js for the better part of the last 5 years in a React Native project, and haven't noticed anything wrong until now.

Goals

We now need a web server in the project, and I've installed react-native-static-server. This has a podspec file, including the GCDWebServer module at ~3.0.

Expected Results

This should compile fine and run fine. CocoaPods should handle the version numbers and match accordingly.

Actual Results

duplicate symbol '_OBJC_IVAR_$_GCDWebServer._disconnectDelay' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._bindToLocalhost' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_BindToLocalhost' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._port' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._dnsPort' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_Port' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._dnsSocket' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._authenticationDigestAccounts' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_AuthenticationAccounts' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._authenticationBasicAccounts' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._dnsAddress' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerAuthenticationMethod_DigestAccess' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._connectionClass' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_ConnectionClass' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._handlers' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._options' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_MaxPendingConnections' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._activeConnections' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_CLASS_$_GCDWebServer' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_METACLASS_$_GCDWebServer' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._disconnectTimer' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_CLASS_$_GCDWebServerHandler' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_METACLASS_$_GCDWebServerHandler' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._sourceGroup' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._authenticationRealm' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_AuthenticationRealm' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerLogLevel' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_ConnectedStateCoalescingInterval' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._backgroundTask' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServerHandler._asyncProcessBlock' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServerHandler._matchBlock' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_RequestNATPortMapping' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._syncQueue' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._delegate' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_BonjourType' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_BonjourName' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._serverName' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_ServerName' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerLogMessage' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._dnsSource' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._dnsService' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._resolutionService' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._registrationService' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_AuthenticationMethod' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._suspendInBackground' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_AutomaticallySuspendInBackground' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._connected' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerAuthenticationMethod_Basic' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_GCDWebServerOption_AutomaticallyMapHEADToGET' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._source6' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServer._source4' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServer.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServer.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServerConnection._request' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServerConnection.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServerConnection.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServerConnection._socket' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServerConnection.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServerConnection.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServerConnection._server' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServerConnection.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServerConnection.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServerConnection._handler' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServerConnection.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServerConnection.o)
duplicate symbol '_OBJC_CLASS_$_GCDWebServerConnection' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServerConnection.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServerConnection.o)
duplicate symbol '_OBJC_METACLASS_$_GCDWebServerConnection' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServerConnection.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServerConnection.o)
duplicate symbol '_OBJC_IVAR_$_GCDWebServerConnection._response' in:
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/GCDWebServer/libGCDWebServer.a(GCDWebServerConnection.o)
    /Users/Shared/event/derived/Fenestra-gdmrszbjnenndffhabmlltzkhmco/Build/Products/Debug-iphoneos/libRealmReact.a(GCDWebServerConnection.o)
duplicate symbol '_OBJC_IVAR

Steps to Reproduce

  1. Create a new React Native project.
  2. Add both realm-js and react-native-static-server using NPM
  3. In the ios folder run pods install
  4. Try building the project

Version of Realm and Tooling

Whilst the versions don't matter as the issue still resides in the latest code, I'll include the ones I'm running in my main codebase.

  • Realm JS SDK Version: 3.2.0 (still an issue with 10+)
  • Node or React Native: 0.61.1
  • Client OS & Version: MacOS 11.1, iOS 14.6, XCode 12.5
  • Which debugger for React Native: None

Proposed Solution

  • Remove the vendor\GCDWebServer directory and its contents
  • Add the string realm.podspec to the files array in the package.json file
  • Add a realm.podspec file in the route of the project, which should look something like this:
    require 'json'
    
    package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
    
    Pod::Spec.new do |s|
      s.name           = package['name']
      s.version        = package['version']
      s.summary        = package['description']
      s.description    = package['description']
      s.license        = package['license']
      s.author         = package['author']['name']
      s.homepage       = package['homepage']
      s.source         = { :git => 'https://github.com/realm/realm-js.git' }
    
      s.requires_arc   = true
      s.platform       = :ios, '12.0'
    
      s.preserve_paths = 'README.md', 'package.json'
    
      s.dependency 'React'
      s.dependency 'GCDWebServer', '~> 3.0'
    end
    
@xploSEoF
Copy link
Author

I've an 8k line patch that seems to work well for myself. Could be a good basis to including the GCDWebServer project as a dependency rather than a copy+pasted "duplicate symbol nightmare".

@kneth
Copy link
Contributor

kneth commented Jun 24, 2021

@xploSEoF Thank you for the bug report. We haven't considered the case where another library might use GCWebServer. Also thank you for your proposed solution.

We are currently moving away from using GCWebServer (see #3792) but I can't give an ETA.

@xploSEoF
Copy link
Author

Excellent! Well, I hope that whatever solution you go for in the end considers integrating third party libraries either:

  • through npm or pods dependencies
  • by copying the code from the entire library and renaming all symbols to prevent conflicts

Otherwise, if anyone else needs the patch file for their project, I can provide it.

@yungpear
Copy link

@xploSEoF any chance you could send over the patch file? we are running into this issue on our project

@xploSEoF
Copy link
Author

@yungpear Sorry for the late reply, I was on holiday when you asked and I overlooked updates on Github.

  1. Put the patch file from this gist https://gist.github.com/xploSEoF/07ef766aa6507574c7bf61cc441dd912 into a folder named "patches"
  2. install "patch-package" and setup according to thier documentation: https://github.com/ds300/patch-package
  3. Then run npx patch-package

@huuchi207
Copy link

@yungpear Sorry for the late reply, I was on holiday when you asked and I overlooked updates on Github.

  1. Put the patch file from this gist https://gist.github.com/xploSEoF/07ef766aa6507574c7bf61cc441dd912 into a folder named "patches"
  2. install "patch-package" and setup according to thier documentation: https://github.com/ds300/patch-package
  3. Then run npx patch-package

You saved my life. why this patch doesn't go to main code?

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

No branches or pull requests

4 participants