flipper: Boost library support for arm64 and i386 for iOS Simulator(Unable to build and run iOS Sample project for M1 iOS Sim)
🐛 Bug Report
I’m unable to build and run the iOS/Sample project.
To Reproduce
- clone the repo
cd flipper/iOS/Samplepod installopen Sample.xcworkspace- On XCode: Run the Sample target
Environment
- MacOSX: 11.3 (20E232) Apple M1
- XCode: 12.5 (12E262)
- iOS Simulator iPhone 11 Pro Max, iOS 14.5
- cocoapods: 1.10.1
- Flipper 0.87.0 (50.0.0) - I’ve tried both the standalone Mac installer as well as the Brew one
- boost 1.75.0_3 installed via Brew, if relevant
I have the feeling the issue is coming from Flipper-Boost-iOSX but I’m not familiar with the way linking works. Let me know if I can give you more info.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 22 (10 by maintainers)
Commits related to this issue
- Update Boost iOSX dep and make it work for arm and i386 for sims (#2341) Summary: This diff updates and adds the boost ios podspec in flipper repo. This new boost dep works for Arm and i386 archs for... — committed to facebook/flipper by priteshrnandgaonkar 3 years ago
- Update Boost iOSX dep and make it work for arm and i386 for sims (#2341) Summary: This diff updates and adds the boost ios podspec in flipper repo. This new boost dep works for Arm and i386 archs for... — committed to facebook/flipper by priteshrnandgaonkar 3 years ago
I’m also getting this issue on my macbook pro corei7 (not M1), I tried Flipper version 0.87.0, 0.88.0, 0.89.0, 0.90.0 and 0.90.2 but still this issue is showing up. I’m using
thanks,
Edit: I think the issue show’s up when Flipper-Boost-iOSX added/updated. Can anyone suggest a solution with this issue?
Edit 2: I’ve found a solution which needs other flipper tools to downgrade.
use_flipper!({ 'Flipper' => '0.87.0', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1' })This will remove theFlipper-Boost-iOSXwhich solve the issue when reverting back to0.87.0found it on this link https://github.com/facebook/flipper/issues/2248#issuecomment-830060572Using Flipper-Boost-iOSX 1.76.0.1.11 will solve the issue. With this version we now support all architectures. Let us know if there are any issue.
@mweststrate I’m with you regarding +1 comments. I just wanted to point out this issue doesn’t seem to have much to do with facebook/react-native#31480. The issue here is regarding building flipper (without RN), regardless of the XCode version, on M1 Macs.
@priteshrnandgaonkar thank you very much for taking the time to investigate. I’ll give version
0.87a try. I haven’t noticed0.88would work with real devices, will try that also.I tried to look for the boost ios libraries. And found two candidates, which are Apple-Boost-BuildScript and boost-iosx.
Currently we are using a forked version of boost-iosx, which doesn’t have arm64 and i386 support for simulators. I tried changing the script and tried to build it for arm64 and i386 for sims, but I was facing issues creating a fat library.
I tried Apple-Boost-BuildScript with the patch, as it enables the support of arm64 and i386 for sims. But it doesn’t build boost_context for iOS, which is actually used by us.
We would appreciate the community support in this.
Thank you for having a look @passy . I noticed GH actions uses XCode 12.4 by default. I’ve tried building the project on that but no luck.
I’ve also tried manually adding
boost_context.xcframeworkto Link Binary With Libraries .The original error is gone but I’m now getting another error:
I believe the issue comes from the fact I’m on Apple M1 chip while GH virtual environments use x86 architecture.
@priteshrnandgaonkar you save my day. thank you so much
@shahchirag2110 I am confused why Flipper-Folly 2.6.7 is used. if Flipper-Folly is (~> 2.5). Can you pin 2.5.3 and try again ?
@drewbombard, as mentioned here. i386 arch is missing for boost, thats why it won’t work for intel machines too. Please fall back to 0.87
To summarize with regards to iOS setup:
0.87: will support both M1 and non-M1 Mac machines. Please use that for the time being as it works in all the cases for both Mac machine types.
0.88: This version updates all our internal deps like folly, boost and rsocket and it just supports non M1 and non intel mac machines for simulators. It won’t work on M1 Mac and intel based machine simulators(if rosetta is not used)). This version will work when built on actual physical device for both M1 and non M1 machines.
We are looking into making our setup more robust and so that these issues won’t happen. Please bear with us till then.