-
Notifications
You must be signed in to change notification settings - Fork 2
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
Building iOS generic build error #35
Comments
Thanks God, exactly the same problem here with project upgraded from 0.61.5 to 0.62... Build if for Device or Simulator, but fail if generic iOS device... |
@passy any leads on how to solve this? Seems to be the same issue as facebook/react-native#28419. |
Thanks for pinging. I hadn't seen that yet. cc @priteshrnandgaonkar |
Here is my configuration : Target Debug :
Project Debug
My flipper config in Podfile :
I follow this guide to upgrade and this project. I think that everything is correct |
@martinezguillaume, My initial guess was that @martinezguillaume, I will try reproducing the above errors in the project which you shared. @trglairnarra Seems like this patch doesn't have all the changes, can you make sure you have the changes which @martinezguillaume has shared in the above comments. Let me know if that works for you. |
@martinezguillaume, I forked your project, and it worked for me without doing any changes. |
@priteshrnandgaonkar I'm not sure where to add the flag in xcode, can you enlighten me ?
And are you sure you successfully build for generic iOS device and not for simulator ? Thanks again for your help ! |
@martinezguillaume, why are you trying to build against Generic iOS Device, it won't install in any simulator, right ? To test it out you need to select the simulator and then install it ? Last time I had built against a simulator, I was able to repro the error when I built for generic iOS Device. But still I would like to know what is the usecase for building it against Generic iOS Device. |
Having said that, it should still build successfully for Generic iOS Device. Let me see what can be done. |
@priteshrnandgaonkar Thanks !! 😀 |
Yes, to archive, it has to be built with generic iOS device. Bytw, I think I got the reason why this is happening, the Flipper and Flipper-Folly pod are built for 64-bit architecture, but as soon as I change it for generic architecture Flipper-Folly pod fails to build and I get the following error. If we make the Flipper-Folly pod build for generic architecture then that would solve the problem, as Flipper pod would be able to then build for all architectures and that should solve the problem. @martinezguillaume, if you are enabling it in production, then do note that right now the initialisation code is behind a DEBUG flag. Do consider making the relevant changes before pushing it to prod. |
I was able to solve this problem by doing the following steps. Click on the Flipper-Folly and Flipper target, change it's Architecture to be the standard one. Look at the following screenshots Then for Flipper-Folly target, go in the build phases and remove Rcu.h and Rcu.cpp from the compile sources. Then try to build it with generic iOS Device, it should build. @martinezguillaume, let me know if that works. |
Oh my.. It works great with generic and simulator builds 🥳! Thanks again ! And everyone in 0.62 should have this problem no ? |
Apparently, No, its not required to build Flipper, if it was then the build would have failed. I will update the Flipper-Folly and Flipper pod accordingly, so that this manual change is not needed. |
You rock ! So we'll have to update the fipper version inside our Podfile ? |
yupp, and thats it, but I am working on the fixes on the podspec side. Will update here, once that is done. |
Yep, i already had the changes same with @martinezguillaume, some changes aren't on the upgrade-helper (sadly), though i was able to find the bridging here and the sonarkit enabled here, so basically roaming around this repo fixes the issues i encounter and i'm happy with that one. (will keep it posted here so that if someone stumble on this errors) And changing the architecture to standard one and also removing Rcu.h and Rcu.cpp actually works (kudos). Though i'm a little confused.. I also thought that you cannot archive unless you successfully build in generic ios device.. but I tried archiving before without building in generic ios device and it actually achives pretty neat.. Anyway, thank you so much @priteshrnandgaonkar for the time and specially for the fix and will just check again after you made the podfile adjustment. :) |
Summary: Right now our sample app's fail to build when built against "Generic iOS Device", but it built successfully when built against simulator. Reason being all the simulators are 64 bit's, but when built against generic iOS device type, it didn't work for all the architecture as our Flipper and Flipper-Folly pod had 64bit architecture in their settings. But as soon as you build Flipper-Folly for standard architecture, RCU.cpp fails to build as that file is incompatible for lower standard architecture. Got the following error {F233400670} But, we do not need that file of Folly to build Flipper and RSocket. Thus in the podfile I have excluded it from its source. Also along with it I upgraded both Folly and RSocket to the latest releases. Even with this changes i got one more problem, our openssl static library is not bitcode enabled for arm architecture, this error popped up when built against "Generic iOS Device". Right now I have disabled bitcode, the proper fix of this would be to find a dependency of openssl which is bitcode enabled. Its really hard to find the proper cocoapod dependency of openssl which is bitcode enabled. But disabling bitcode is not a big ask, also people will face this error only when they try to publish flipper in their release. I discovered this problem from an issue posted in [RN](react-native-community/upgrade-support#35), it also takes care of this issue. Reviewed By: passy Differential Revision: D20897590 fbshipit-source-id: 0891d3d43d37317f5eb439a41fba6b22f7e0a2bc
Summary: Pull Request resolved: #992 Right now our sample app's fail to build when built against "Generic iOS Device", but it built successfully when built against simulator. Reason being all the simulators are 64 bit's, but when built against generic iOS device type, it didn't work for all the architecture as our Flipper and Flipper-Folly pod had 64bit architecture in their settings. But as soon as you build Flipper-Folly for standard architecture, RCU.cpp fails to build as that file is incompatible for lower standard architecture. Got the following error {F233400670} But, we do not need that file of Folly to build Flipper and RSocket. Thus in the podfile I have excluded it from its source. Also along with it I upgraded both Folly and RSocket to the latest releases. Even with this changes i got one more problem, our openssl static library is not bitcode enabled for arm architecture, this error popped up when built against "Generic iOS Device". Right now I have disabled bitcode, the proper fix of this would be to find a dependency of openssl which is bitcode enabled. Its really hard to find the proper cocoapod dependency of openssl which is bitcode enabled. But disabling bitcode is not a big ask, also people will face this error only when they try to publish flipper in their release. I discovered this problem from an issue posted in [RN](react-native-community/upgrade-support#35), it also takes care of this issue. Reviewed By: passy Differential Revision: D20897590 fbshipit-source-id: 8c79d239572bb7efe2d65b2a7f1cfe8c608c1df4
Flipper and FlipperKit 0.37.0 should solve it. Let me know if it doesn't work. |
It’s working very nice ! Thanks for your work ! However I’ve got another issue with Release scheme, but I created another issue so you can close that one ! 😀 |
@priteshrnandgaonkar you saved my life!!!. Thanks. I'm working on a 32-bit mac I just realized about it, I thought all this time it was a 64 bit machine. I feel dumb and cheated lol |
Environment
System:
OS: macOS Mojave 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-4570R CPU @ 2.70GHz
Memory: 645.54 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
Yarn: 1.22.0 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 22, 23, 24, 26, 27, 28, 29
Build Tools: 23.0.1, 26.0.3, 27.0.0, 27.0.1, 27.0.3, 28.0.0, 28.0.3, 29.0.0
System Images: android-26 | Google Play Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 3.4 AI-183.5429.30.34.5452501
Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
Languages:
Python: 2.7.16 - /usr/local/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.0 => 0.62.0
npmGlobalPackages:
react-native: Not Found
Upgrading version
The project was originally made in v59.9 then i upgraded it to v0.62.0
Description
I used this one in upgrading the project. So far everything works great. I was even able to build the iOS on debug. also followed the migration guide found on this repo
Reproducible demo
Building the iOS on generic iOS device results in an error about Flipper and Folly i think.
The text was updated successfully, but these errors were encountered: