[iOS]Fix glog & Flipper-Glog build failed on Apple Silicon#32380
Closed
tylinux wants to merge 5 commits into
Closed
[iOS]Fix glog & Flipper-Glog build failed on Apple Silicon#32380tylinux wants to merge 5 commits into
tylinux wants to merge 5 commits into
Conversation
Base commit: 61e1b6f |
Base commit: 61e1b6f |
Contributor
|
@sota000 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
foxfirecodes
suggested changes
Oct 28, 2021
| CURRENT_ARCH="${CURRENT_ARCH}" | ||
|
|
||
| # Fix build on Apple Silicon | ||
| if [ "$CURRENT_ARCH" == "arm64" ]; then |
Contributor
There was a problem hiding this comment.
Suggested change
| if [ "$CURRENT_ARCH" == "arm64" ]; then | |
| if [ "${CURRENT_ARCH:-$(arch)}" == "arm64" ]; then |
in my situation, I was finding that $CURRENT_ARCH was not set. not sure why, but this solves it and should potentially be hoisted to line 10 (but I'm not sure if that impacts later code)
Contributor
There was a problem hiding this comment.
alternatively, you can move this entire code beneath the if statement below (which handles the missing CURRENT_ARCH case)
Co-authored-by: Lew Blood <rayzr522@gmail.com>
Co-authored-by: Lew Blood <rayzr522@gmail.com>
facebook-github-bot
pushed a commit
that referenced
this pull request
Nov 3, 2021
Summary: This is a fixed version of the #32380 PR. It solves a typo, prevents variable substitution in the patch file, and moves it to a better place in the script so that CURRENT_ARCH is actually detected before checking whether to patch. The `config.sub` included in glog is too old and does not recognize `arm64-*` as a valid arch when building. This, combined with an out of date Flipper-Glog version, results in persistent build failures on Apple Silicon machines. p.s. i assume all the podfile lock changes were caused by me running this on an Apple Silicon Mac, and thus all the pod checksums were run against the arm64 versions of those pods rather than the normal x86_64 versions. if this is an issue I can revert the changes to that file, but it would seem to be an inevitable issue in future PR diffs... ## Changelog - [iOS] [Fixed] - Apple Silicon builds of glog & Flipper-Glog Pull Request resolved: #32486 Test Plan: - Clone this branch on both an Apple Silicon- & Intel-based Mac - Run `pod install` in `packages/rn-tester` - Confirm that build passes successfully Reviewed By: cortinico Differential Revision: D32080994 Pulled By: yungsters fbshipit-source-id: 76a7c5bba20d91905455920609c890e92bb5b980
Contributor
|
This seems to be a dup work with #32486. Though it sounds like we have blocker to merge the diff. I'll close this one for now, but please re-open if this is still relevant. |
facebook-github-bot
pushed a commit
that referenced
this pull request
Nov 9, 2021
Summary: NOTE: Second attempt at merging #32486 (D32080994 (25d4cb9)). This is a fixed version of the #32380 PR. It solves a typo, prevents variable substitution in the patch file, and moves it to a better place in the script so that CURRENT_ARCH is actually detected before checking whether to patch. The `config.sub` included in glog is too old and does not recognize `arm64-*` as a valid arch when building. This, combined with an out of date Flipper-Glog version, results in persistent build failures on Apple Silicon machines. p.s. i assume all the podfile lock changes were caused by me running this on an Apple Silicon Mac, and thus all the pod checksums were run against the arm64 versions of those pods rather than the normal x86_64 versions. if this is an issue I can revert the changes to that file, but it would seem to be an inevitable issue in future PR diffs... ## Changelog - [iOS] [Fixed] - Apple Silicon builds of glog & Flipper-Glog Pull Request resolved: #32486 Test Plan: See `react-native-oss-ios` Sandcastle job succeed. Reviewed By: fkgozali Differential Revision: D32256761 Pulled By: yungsters fbshipit-source-id: c7f32b72287018f070910b26aad02aa0adf4a61f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Because glog's
config.stub&&config.guessis too old, so executepod installon Apple Silicon devices will failed, error message isInvalid configuration 'arm64-apple-darwin20.2.0': machine 'arm64-apple' not recognized.So we need to update these 2 files from GNU to fix this problem.Patch
config.subto recognize arm64-appleChangelog
[iOS] [Fixed] - Fix glog & Flipper-Glog build failed on Apple Silicon
Test Plan
packages/rn-tester/Podfile(becase Flipper-Glog has this problem too).pod install, build and run tester app.