-
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
[iOS] Undefined symbols for architecture arm64: "_RCTSetLogFunction" #2685
Comments
If anything broke this it might have been my commit: 19f922a @kmagiera @brentvatne @ide Are you hitting this as well? My Xcode is unfortunately busted, reinstalling now. |
@javache is in London and it's quite late here. Can you unblock yourself by commenting out the test code until we can repro? |
@javache is with me at at-scale conf in SJ, he promised to take a look |
Just did |
@Javanaise - which version of Xcode? Only 6.3+ are supported |
@mkonicek A real iphone 6 |
@Javanaise - try pressing ⌘+k to clean the build and run it again |
@brentvatne did a Clean and a Clean build folder, still fails |
@Javanaise - have you tried in the simulator? |
@brentvatne it's working in the simulator |
@Javanaise - what OS version? |
Same problem on iphone 6 ios 8.3. It is working on the simulator. |
Also what simulator? Make sure it's 5s or newer which runs the x86_64 libs. |
@brentvatne os x ? 10.10.5 |
The same problem |
Compiling fine for me (even after cleaning) w/actual iPhone 6, Xcode 7 GM, El Cap beta 8. Wonder if Xcode is the issue here... |
Also same problem |
Same here, Xcode 7 GM fails only on real device. as a quick workaround, removing tests makes this go away |
I can repro this when building the SampleApp for testing for iPhone 6 using Xcode 7 GM. Investigating. |
The problem seems that Xcode's dead code stripping removes the RCTSetLogFunction, since it's not being called anywhere. Disabling "Dead Code Stripping" from your main target's build settings for Debug builds will disable the build error. This method was changed in b998e5a |
i have some error,but only remove test target,it's ok! |
The solution @javache provided worked for me after encountering this error running on a physical device from Xcode 7 after upgrading my existing app to React Native |
Disabling "Dead Code Stripping" let me run on my physical device. |
Could you submit a pull request that changes the project generator to do this by default? Thanks! |
I had the same issue. However, it was caused by renaming the app. I fixed it by doing a project wide search and replacing all occurrences of the name. I also had to change a few directory and file names. |
Same Issue here but adding libReact.a to my test target do the trick! :) |
Same issue and disabling Dead Code Stripping didn't solve the problem whereas @bidatacoder solution worked fine for me 👍 |
HI, I tried the dead code stripping and add libReact.a to TESTS, both of them are not working for me. Have anyone had the same problem? update: Here are some of the things that DIDN'T work for me: Hope it helps. |
Summary: Fixes facebook#2685 Closes facebook#7918 Differential Revision: D3389814 fbshipit-source-id: d5054dae386d66e8055c883581f142ec24e60e18
Summary: Fixes facebook#2685 Closes facebook#7918 Differential Revision: D3389814 fbshipit-source-id: d5054dae386d66e8055c883581f142ec24e60e18
For anyone having this problem, make sure you add the |
@zdol Tests has no 'Other Linker Flags' option |
In Build Settings All, I found that option, and after add |
@czl1378 it's work for me thanks |
Here is a screenshot, thanks @czl1378 |
I have been struggling with this for a while after upgrading to rn0.39, and the answer @czl1378 and @benjaminb10 is correct. you need to add other linker flags. |
+1 -- Adding the flags fixed the build errors for me on 0.40.0 |
@benjaminb10 +1 adding that flag fixes the issue |
For me, vice versa, removing |
I'm using CocoaPods 1.2.0 and React Native 0.42.0. When I try to archive a release build, the error occurs. It seems that your solutions won't work in my situation. Any ideas? |
@bidatacoder 's solution didnt work for me :-( I don't have 'Workspace'->libReact.a ... the closest I have is libcxxreact.a Any ideas? |
Summary: Fixes facebook/react-native#2685 Closes facebook/react-native#7918 Differential Revision: D3389814 fbshipit-source-id: d5054dae386d66e8055c883581f142ec24e60e18
Hello,
I have this linking error:
Undefined symbols for architecture arm64:
"_RCTSetLogFunction", referenced from:
-[PropertyFinderTests testRendersWelcomeScreen] in PropertyFinderTests.o
When i try to compile the default project on iOS. (using react-native init)
The text was updated successfully, but these errors were encountered: