-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Fix duplicate symbols linker error in xcodeproj #23284
Fix duplicate symbols linker error in xcodeproj #23284
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@tyrone-sudeium merged commit 9f72e6a into |
Summary: When using building React Native using the `.xcodeproj` (either via linked projects in Xcode, or precompiling React Native, which is what we do), you'll get a duplicate symbol error: ``` duplicate symbol __ZN8facebook5react10IInspectorD0Ev ... ``` And a few more. This is because the `InspectorInterfaces.cpp` file is included in _both_ the `React` target _and_ the `jsinspector` target, and since the `jsinspector` target gets linked into the `React` target, this means the symbols from `InspectorInterfaces.cpp` end up in `libReact.a` twice. <img width="187" alt="screen shot 2019-02-04 at 11 43 39 am" src="https://user-images.githubusercontent.com/819705/52189088-93190880-288a-11e9-8411-b44b59e8e461.png"> This PR removes `InspectorInterfaces.cpp` from the `React` target, as I believe was the original intent. Since this bug is in the `xcodeproj` it only affects builds that use that, so CocoaPods and Buck users are unaffected. [iOS][Fixed] - Fix potential linker issues when using xcode project Pull Request resolved: facebook#23284 Differential Revision: D13941777 Pulled By: cpojer fbshipit-source-id: 8a3ffb4fc916ff6570bbff8794b4515b48055667
Summary: When using building React Native using the `.xcodeproj` (either via linked projects in Xcode, or precompiling React Native, which is what we do), you'll get a duplicate symbol error: ``` duplicate symbol __ZN8facebook5react10IInspectorD0Ev ... ``` And a few more. This is because the `InspectorInterfaces.cpp` file is included in _both_ the `React` target _and_ the `jsinspector` target, and since the `jsinspector` target gets linked into the `React` target, this means the symbols from `InspectorInterfaces.cpp` end up in `libReact.a` twice. <img width="187" alt="screen shot 2019-02-04 at 11 43 39 am" src="https://user-images.githubusercontent.com/819705/52189088-93190880-288a-11e9-8411-b44b59e8e461.png"> This PR removes `InspectorInterfaces.cpp` from the `React` target, as I believe was the original intent. Since this bug is in the `xcodeproj` it only affects builds that use that, so CocoaPods and Buck users are unaffected. [iOS][Fixed] - Fix potential linker issues when using xcode project Pull Request resolved: #23284 Differential Revision: D13941777 Pulled By: cpojer fbshipit-source-id: 8a3ffb4fc916ff6570bbff8794b4515b48055667
Summary: When using building React Native using the `.xcodeproj` (either via linked projects in Xcode, or precompiling React Native, which is what we do), you'll get a duplicate symbol error: ``` duplicate symbol __ZN8facebook5react10IInspectorD0Ev ... ``` And a few more. This is because the `InspectorInterfaces.cpp` file is included in _both_ the `React` target _and_ the `jsinspector` target, and since the `jsinspector` target gets linked into the `React` target, this means the symbols from `InspectorInterfaces.cpp` end up in `libReact.a` twice. <img width="187" alt="screen shot 2019-02-04 at 11 43 39 am" src="https://user-images.githubusercontent.com/819705/52189088-93190880-288a-11e9-8411-b44b59e8e461.png"> This PR removes `InspectorInterfaces.cpp` from the `React` target, as I believe was the original intent. Since this bug is in the `xcodeproj` it only affects builds that use that, so CocoaPods and Buck users are unaffected. [iOS][Fixed] - Fix potential linker issues when using xcode project Pull Request resolved: facebook#23284 Differential Revision: D13941777 Pulled By: cpojer fbshipit-source-id: 8a3ffb4fc916ff6570bbff8794b4515b48055667
Summary
When using building React Native using the
.xcodeproj
(either via linked projects in Xcode, or precompiling React Native, which is what we do), you'll get a duplicate symbol error:And a few more.
This is because the
InspectorInterfaces.cpp
file is included in both theReact
target and thejsinspector
target, and since thejsinspector
target gets linked into theReact
target, this means the symbols fromInspectorInterfaces.cpp
end up inlibReact.a
twice.This PR removes
InspectorInterfaces.cpp
from theReact
target, as I believe was the original intent.Since this bug is in the
xcodeproj
it only affects builds that use that, so CocoaPods and Buck users are unaffected.Changelog
[iOS][Fixed] - Fix potential linker issues when using xcode project
Test Plan
Only affects the
xcodeproj
, and the project still builds with zero errors from thexcodeproj
.