-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Unable to build release version for iOS with the new architecture #33764
Comments
Followed steps but unable to reproduce on M1 Pro |
I missed the step. But did you RCT_NEW_ARCH_ENABLED=1 bundle exec pod install? |
This issue persists both in RN 0.68.x and 0.69 when trying to build release version or to make an archive. I'm facing it when building for MacCatalyst on M1. You may add these lines to the end of post_install do |installer| as a temporary solution:
|
Hi @wood1986, thanks for the issue. Is the issue solved with the #33167 linked by @fabriziobertoglio1987 or is it still there? |
@cipolleschi Nope I don't think the linked PR is relevant here. Such PR was fixing a build failure on Android, while the user is reporting an issue on iOS |
sorry. I don't know the solution to this issue. I just included links to relevant conversations, which would help me find a solution. What I did find out is the following: Similar issue was experienced in the past. The symbol error was previously caused by folly depending on libc++abi seems that https://stackoverflow.com/a/33686591/7295772 different environment use different libraries https://gcc.gnu.org/onlinedocs/gcc-11.3.0/libstdc++/api/a00176_source.html this are the folly releases https://github.com/facebook/folly/releases. I did not find anything relevant in the new releases. @Arkkeeper understand this issue and he tested this solution
so seems that the issue is caused by the Flipper-Folly SharedMutex , while it works with RCT-Folly SharedMutex this are the configs for folly futures in Flipper-Folly this are the configs for folly-futures in RCT-Folly I'm not sure that this is connected to futures This is an explanation of unlock_shared, deferredReaders seems to be an array of readers used to access data in this case the undefined symbol is It's 22:35 here and I have to go to sleep. Sorry for my incomplete message. 🙏 |
I have a question for you guys. Doing this does not make sense rm -f Pods/Flipper-Folly/folly/SharedMutex.cpp Pods/Flipper-Folly/folly/SharedMutex.h
cp Pods/RCT-Folly/folly/SharedMutex.cpp Pods/Flipper-Folly/folly/
cp Pods/RCT-Folly/folly/SharedMutex.h Pods/Flipper-Folly/folly/ If I comment out |
Flipper should never be in the release app but it should be done via compilation flags instead of commenting out |
👍🏻 I totally agree. |
…lipper dependencies logic (#33882) Summary: This PR tries to simplify the `use_flipper` logic: - makes `use_flipper` a configuration inside `use_react_native`'s options - uses the already present `production` flag in the `use_react_native`'s options to decide if add or not the Flipper pods - Simplifies the logic to download the flipper dependencies This PR also adds a workaround for #33764 ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [iOS] [Changed] - Move `use_flipper` logic inside `use_react_native` and simplify the Flipper dependencies logic Pull Request resolved: #33882 Test Plan: Executed a pod install with and without flipper and with isProduction true Reviewed By: cipolleschi Differential Revision: D36592338 Pulled By: f-meloni fbshipit-source-id: 3c3f773151513e27e251f18865986e942a96ffd9
no longer getting the original issue with but had Flipper downgrade to 0.125.0, just thinking the best way to config Flipper again for a custom/latest version similar scenario will surface here maybe better opened as seperate/follow-up issue |
How to specify the flipper version in 0.69.2? |
I found it |
Summary: ### Mentioned - pr[main]: #33882 - discussion: reactwg/react-native-releases#21 (reply in thread) - pr[0.69-stable]: #34098 Close: #33764 Saw the issue ago couple wks too: leotm/react-native-template-new-architecture#757 Fixed similarly: leotm/react-native-template-new-architecture#791 ## Changelog [iOS] [Changed] - Update Podfile to allow `PRODUCTION=1 pod install` [CATEGORY] [TYPE] - Message Pull Request resolved: #34234 Test Plan: Everything builds and runs as expected Reviewed By: cortinico Differential Revision: D38029117 Pulled By: cipolleschi fbshipit-source-id: bdb58200a999cb66f1043a2feb670f9037c8e463
just for anyone else landing here react-native/scripts/cocoapods/flipper.rb Line 105 in 463af23
nicely shows how to set custom Flipper version, we were unsure about at first so it could be worth us expanding on the comment here or adding an example for others in the future react-native/template/ios/Podfile Line 20 in 463af23
will do pronto unless somebody (feel free) beats me to it :) |
* Draft ios.yml * Fix indentation * Update ios.yml * Build app for release * Fix prod build error w Flipper, set env flag Issue - reactwg/react-native-releases#21 (comment) - facebook/react-native#33764 PR - facebook/react-native#33882 * Remove stale comment * Temporarily add `npx react-native info` * Move `npx react-native info` after `yarn` * Add release bundle step before build * Update bundle script * Update bundle script * Update RN CLI from next (8.0.0-alpha.0) to 9.0.0-alpha.5 * Remove devDep @react-native-community/cli No luck with 9.0.0-alpha.5 Should now use npm:9.0.0-alpha.4 (via npm:^9.0.0-alpha.3) * Try bundling also to ios/MyApp/main.jsbundle * Add debug before release bundle/build * Fix yarn lockfile/cache conflict res * Add normal pod install before debug * Comment debug pod install and build, working fine * Update pbxproj and xcscheme Follow-up: - facebook/react-native#34274 (comment) Also update parts in-line with current main - https://github.com/facebook/react-native/tree/main/template * Disable Metro experimentalImportSupport * Resolve Yarn lockfile From conflict res * Rename xcode.env prefix _ to . * Remove react-native-flipper * Revert "Remove react-native-flipper" This reverts commit 646dd74. * Revert "Rename xcode.env prefix _ to ." This reverts commit 8f15810. * Revert "Disable Metro experimentalImportSupport" This reverts commit 41ed14b. * Add index.js for iOS Release bundling * Add back @react-native-community/cli 9.0.0-alpha.5 * Revert "Try bundling also to ios/MyApp/main.jsbundle" This reverts commit 80e7354. * Revert "Comment debug pod install and build, working fine" This reverts commit 0ea4d01. * Update workflow comments
Hi, I tried the solution but it does not work: rm -f Pods/Flipper-Folly/folly/SharedMutex.cpp Pods/Flipper-Folly/folly/SharedMutex.h Did anyone solve this issue? PS: react native info |
@stefanradu1989 you need to reinstall the pods with |
@cipolleschi thank you that solved my issue |
@MJ0826 Can you walk throught what you did? To me, it looks like you just run One thing that we did was to remove
Secondly, this issue is about the New Architecture. Are you building for the New Arch or for the Legacy one? |
Description
I am unable to build release version for iOS with the new architecture. But I can build the debug version.
Here is build error
Version
0.68.1
Output of
npx react-native info
Steps to reproduce
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: