Skip to content

flipper ios: Pin to some specific versions, to fix build with Xcode 12.5.#4721

Merged
gnprice merged 2 commits intozulip:masterfrom
chrisbobbe:pr-xcode-12.5-build-fix
May 6, 2021
Merged

flipper ios: Pin to some specific versions, to fix build with Xcode 12.5.#4721
gnprice merged 2 commits intozulip:masterfrom
chrisbobbe:pr-xcode-12.5-build-fix

Conversation

@chrisbobbe
Copy link
Copy Markdown
Contributor

@chrisbobbe chrisbobbe commented May 5, 2021

Builds are failing with Xcode 12.5, and mine auto-updated this morning; here's a fix. (And a follow-up commit that resolves an unrelated issue.)

I've marked this P0 because iOS development/testing for any purpose (e.g., code review) is halted, for me and for anyone else whose Xcode got (auto-)updated; please let me know if this is wrong. I don't think Apple lets you downgrade Xcode after upgrading?

@chrisbobbe chrisbobbe added a-iOS upstream: RN Issues related to an issue in React Native upstream: other Issues related to an issue in another dependency a-tools P0 critical Highest priority labels May 5, 2021
@chrisbobbe chrisbobbe requested review from WesleyAC and gnprice May 5, 2021 15:22
@chrisbobbe chrisbobbe force-pushed the pr-xcode-12.5-build-fix branch from 7e75f31 to 4bb776e Compare May 5, 2021 15:29
@chrisbobbe
Copy link
Copy Markdown
Contributor Author

chrisbobbe commented May 5, 2021

It'd be great to know if this breaks builds with Xcode <12.5, I guess, if that's possible. Otherwise fine if not, and we can just tell people to use 12.5 if they run into any problems.

@gnprice
Copy link
Copy Markdown
Member

gnprice commented May 6, 2021

I don't think Apple lets you downgrade Xcode after upgrading?

They do:

https://developer.apple.com/download/more/

but it's annoying, partly because it's a >10GB download.

LGTM, merging.

chrisbobbe added 2 commits May 6, 2021 01:23
…2.5.

Following the outlined solution for projects using RN v0.63, in
facebook/react-native#31480.

The "properly clean your caches" step didn't seem to be necessary
for me, but possibly that's different between environments.

Done without looking for breaking changes, beyond confirming that
the build succeeds on Xcode 12.5. There could be a lot of breaking
changes between Flipper 0.54.0 and 0.75.1 -- but we don't use
Flipper yet (that's zulip#4255) and we don't have anything like a Flipper
config file for iOS.
As we made plans for in the RN v0.62 upgrade.

In the previous commit, the OpenSSL-Universal pod was taken to
1.1.180, which is even later than 1.0.2.20, which is what we'd been
waiting for.

Fixes: zulip#4264
@gnprice gnprice force-pushed the pr-xcode-12.5-build-fix branch from 4bb776e to 5997d48 Compare May 6, 2021 08:23
@gnprice gnprice merged commit 5997d48 into zulip:master May 6, 2021
@gnprice
Copy link
Copy Markdown
Member

gnprice commented Jun 5, 2021

FTR, here's an example of the symptom this fixes. The build failed with the following summary:

The following build commands failed:
        CompileC /Users/greg/Library/Developer/Xcode/DerivedData/ZulipMobile-diuocloqwafvdpeozujwphdrhalf/Build/Intermediates.noindex/ArchiveIntermediates/ZulipMobile/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/Flipper-Folly.build/Objects-normal/arm64/DistributedMutex.o /Users/greg/z/mobile/ios/Pods/Flipper-Folly/folly/synchronization/DistributedMutex.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler

and the following more detailed error a bit earlier in the log:

In file included from /Users/greg/z/mobile/ios/Pods/Flipper-Folly/folly/synchronization/DistributedMutex.cpp:17:
In file included from /Users/greg/z/mobile/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex.h:344:
/Users/greg/z/mobile/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: error: 'atomic_notify_one<unsigned long>' is unavailable
    atomic_notify_one(state);
    ^
/Users/greg/z/mobile/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedM
utex-inl.h:1573:5: note: in instantiation of function template specialization 'folly::detail::
distributed_mutex::wakeTimedWaiters<std::__1::atomic<unsigned long>>' requested here
    wakeTimedWaiters(&state_, proxy.timedWaiters_);
    ^
In file included from /Users/greg/z/mobile/ios/Pods/Flipper-Folly/folly/synchronization/Distri
butedMutex.cpp:17:
In file included from /Users/greg/z/mobile/ios/Pods/Headers/Private/Flipper-Folly/folly/synchr
onization/DistributedMutex.h:19:
In file included from /Users/greg/z/mobile/ios/Pods/Headers/Private/Flipper-Folly/folly/Option
al.h:58:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/D
eveloper/SDKs/iPhoneOS13.7.sdk/usr/include/c++/v1/functional:504:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/D
eveloper/SDKs/iPhoneOS13.7.sdk/usr/include/c++/v1/memory:681:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS
13.7.sdk/usr/include/c++/v1/atomic:2140:6: note: 'atomic_notify_one<unsigned long>' has been e
xplicitly marked unavailable here
void atomic_notify_one(atomic<_Tp>* __o) _NOEXCEPT
     ^

(That's at v27.163, which doesn't have this fix, and using Xcode 12.5 build 12E262.)

@chrisbobbe chrisbobbe deleted the pr-xcode-12.5-build-fix branch November 4, 2021 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a-iOS a-tools P0 critical Highest priority upstream: other Issues related to an issue in another dependency upstream: RN Issues related to an issue in React Native

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants