flipper: Flipper doesn't build with Xcode 12.5 RC
š Bug Report
Flipper in a React Native project fails to build with the following error:
~/MyProject/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 'atomic_notify_one<unsigned long>' is unavailable
Build log
[... TRUNCATED ...][]
In file included from ~/MyProject/ios/Pods/Flipper-Folly/folly/synchronization/DistributedMutex.cpp:17:
In file included from ~/MyProject/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex.h:344:
~/MyProject/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);
^
~/MyProject/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex-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 ~/MyProject/ios/Pods/Flipper-Folly/folly/synchronization/DistributedMutex.cpp:17:
In file included from ~/MyProject/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex.h:19:
In file included from ~/MyProject/ios/Pods/Headers/Private/Flipper-Folly/folly/Optional.h:58:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/functional:504:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/memory:681:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/atomic:2140:6: note: 'atomic_notify_one<unsigned long>' has been explicitly marked unavailable here
void atomic_notify_one(atomic<_Tp>* __o) _NOEXCEPT
^
1 error generated.
[... TRUNCATED ...]
Build failed 21.4.2021, 11.51 34.5 seconds
Cleaning the Xcode build folder didnāt help, nor does updating Flipper and Flipper-Folly to the latest versions.
To Reproduce
- Install Xcode 12.5 RC from Apple
- Open a React Native project with Flipper enabled
- Try to build that project
- The build fails
Environment
- Xcode 12.5 RC
- React Native 0.63.4
- Pods:
- Flipper (0.85.0)
- Flipper-DoubleConversion (1.1.7)
- Flipper-Folly (2.5.1)
- Flipper-Glog (0.3.6)
- Flipper-PeerTalk (0.0.4)
- Flipper-RSocket (1.3.1)
- FlipperKit (0.85.0)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 60
- Comments: 78 (17 by maintainers)
I will take a look at this by today or tomorrow and will release a new Flipper-Folly version.
Now, i just need update this file and it run normally. Hope it will be resolve in the next version. This file in:
{project-name}/ios/Pods/Flipper-Folly/folly/synchronization/DistributedMutex-inl.hhttps://github.com/facebook/folly/commit/8477e25603f131c0400b6964609c76b438826788#diff-65ad309ca9c636ba81eb7953fce06e6963c51296a60dc25eb4a5b1463482c6da
This worked for me. On react native 0.63.4 use_flipper!({ āFlipper-Follyā => ā2.5.3ā, āFlipperā => ā0.87.0ā, āFlipper-RSocketā => ā1.3.1ā })
As a hotfix I have patched 2.5.1 with the above mentioned patch in Flipper-Folly 2.5.3
I will follow up with RN folks regarding consolidating Flipper-Folly and RCT-Folly into one and have a consistent workflow of maintaining it.
But for now Flipper-Folly 2.5.3 should unblock.
Sucks.
I have solved the above error. Now fixing the other errors.
Installation of version 2.5.2 works for me, but now I get this error:
Iām getting the same error in our React Native app. Hereās some related issues I was able to dig up:
https://github.com/facebook/folly/issues/1527
https://github.com/facebook/react-native/issues/31179
Looks like the underlying issue was resolved (here: https://github.com/facebook/folly/commit/8477e25603f131c0400b6964609c76b438826788), but it hasnāt been published to cocoapods yet.
This works perfectly! Just do
pod install --repo-updateand everything will be fine! Thank you!@priteshrnandgaonkar deleted the podfile-lock and folder, those commands still led me to install 2.5.1
Managed to use the temporary code fix above posted by j2teamlbh, what made it finally work was ensuring that in the podfile you specify that youāre using
use_flipper!({ 'Flipper-Folly' => '2.3.0' })THANKS
It would be nice if you could get with them and get them to commit to removing Flipper from CRNA and expo init. This package is below 1.0, is woefully slow and plagued by instability and performance variance between different versions and frequently has breaking changes. It doesnāt belong in starter templates and it shouldnāt be a requirement for getting started with React Native. The amount of downtime, CI slowness, failed and slowed builds it has caused could probably be valued in the hundreds of thousands of $$$, all because someone made the decision to make the RN community guinea pigs for this tool. Reactotron is infinitely better despite being created by a third party, not updated for 2 years and swizzling APIs that Facebook didnāt open to it. I have a 2020 MBP and Flipper performs terribly on it. What audience is this tool really intended for if it canāt perform on a new MBP, breaks frequently, and slows down peopleās builds? Now lets say it finally performs like its contemporaries, tools like VSCode or whatever else. Then Iād understand, and Iād probably even use it. But why is it in production now in the state that it is?
@priteshrnandgaonkar on my side it says
Itās working for me now! (I initially got the 2.5.2 not found error ā cocoapods probably just needed a minute to propagate the update, or something)
tried but still same error
How are we to update Flipper-Folly?
However this aināt working, tried numerous times thereās still a build error. š¦
Guys please stop asking, read the comments, they already fixed it and they give the solution
Hey guys they push a new version.
You just need to edit your code to that
And
run npx pod-installMe too - I get the following:
xCode 12.5 has released yesterday, this error still here. I hope we will be resolve the error for the next version
Same as you. I feel no hope right now. after tried every each solution, issue is still fucking there.
Yes because they have updated Flipper-folly not RCT-folly, You will need to add these lines to your podfile
@kkelley-leftbrain I got past OpenSSL issues by adding the version of OpenSSL-Universal in the Podfile:
In my case it was previously pinned to an older version.
Same, works here. Thx!
Iām the only person on my team still advocating for flipper as a debug tool, but man⦠this crap just completely blocks my team.
same issue but why even I still disabled flipper on ios and Iām still getting a build error?
Yea, but I just tested and we donāt seem to be entering that condition. So
FOLLY_HAVE_CLOCK_GETTIMEends up not being defined (itās not a default flag for the Flipper-Folly target either). Itās most likely because the new SDK version defines them again. We would probably need a new rule around this.I tried setting them outside the target os condition to see what would happen and it seems to keep going but I hit another error down the line. This will be a bit trickier than expected I believe.
I would suggest sticking with 2.5.1 and applying this patch for now: https://github.com/facebook/flipper/issues/2215#issuecomment-827422023
That flag would be overwritten by this https://github.com/facebook/folly/blob/master/folly/portability/Time.h#L35-L37 no?
It might be because the same files are also included by RCT-Folly. š¦
Maybe RN folks can help here.
It will be better if RN uses Flipper-Folly than RCT-Folly. It will solve this error.
Run
pod repo updateand then runpod install.Itās up to you but I would put it below
use_native_modules! endthen runpod install@AlexHooperDev you wouldnāt happen to know where I would put that change in my Podfile would you? Iām using using react native 62
Anyways, I was able to fix this by downgrading to XCode Version 12.4. It seems the issue for me happens when I updated my Xcode to the latest 12.5 version. until thereās a patch to fix this, i will continue using 12.4 version
I read facebook/folly@8477e25, the issue has resolved but flipper does not update yet