question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[solved] IOS Missing deps - atomic_notify_one<unsigned long> is unavailable

See original GitHub issue

Solution

Remove Pods folder and Pods.lock file reinstall all dependencies and use lastest versions.

use_flipper!({ 'Flipper-Folly' => '2.6.7', 'Flipper-RSocket' => '1.4.3' , 'Flipper' => '0.88.0' })

and then make this changes use a script from here https://stackoverflow.com/a/67336115/10660145

# add before target 'xxxx' do
def find_and_replace(dir, findstr, replacestr)
  Dir[dir].each do |name|
      text = File.read(name)
      replace = text.gsub(findstr,replacestr)

      if text != replace
          puts "Fix: " + name
          system("chmod +w " + name)
          File.open(name, "w") { |file| file.puts replace }
          STDOUT.flush
      end
  end
  Dir[dir + '*/'].each(&method(:find_and_replace))
end

# ....
# ....

    flipper_post_install(installer)

   # add this line into post_install do |installer|
    find_and_replace("Pods/RCT-Folly/folly/synchronization/DistributedMutex-inl.h",
          "  atomic_notify_one(state);", "  folly::atomic_notify_one(state);")

🐛 Bug Report

I have a react native 0.64.0 project with fipper 0.88.0 if try build show this compile error

I follow steps in https://github.com/facebook/flipper/issues/2215 but don’t resolve

▸ Compiling DistributedMutex.cpp

❌  /Volumes/disk/app/ios/Pods/Headers/Private/RCT-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 
'atomic_notify_one<unsigned long>' is unavailable

    atomic_notify_one(state);
                   ^~~~~~~


▸ Compiling Demangle.cpp
** ARCHIVE FAILED **


The following build commands failed:
        CompileC /Users/user/Library/Developer/Xcode/DerivedData/aymbdgipiyzikgcwjklokmljfxvv/Build/Intermediates.noindex/ArchiveIntermediates/app/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/RCT-Folly.build/Objects-normal/arm64/DistributedMutex.o /Volumes/disk/app/ios/Pods/RCT-Folly/folly/synchronization/DistributedMutex.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
[12:23:33]: Exit status: 65

To Reproduce

Run Build

Environment

  • IOS target version 12.0
  • Mac OS 11.3 (20E232) (M1)
  • Xcode 12.5 (12E262)
  • react 17.0.1
  • react-native 0.64.0
  • Cocoa pods 1.10.1
  • Fastlane 2.182.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:27
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
ithustlecommented, Jun 8, 2021

Solution

Remove Pods folder and Pods.lock file reinstall all dependencies and use lastest versions.

use_flipper!({ 'Flipper-Folly' => '2.6.7', 'Flipper-RSocket' => '1.4.3' , 'Flipper' => '0.88.0' })

and then make this changes use a script from here https://stackoverflow.com/a/67336115/10660145

# add before target 'xxxx' do
def find_and_replace(dir, findstr, replacestr)
  Dir[dir].each do |name|
      text = File.read(name)
      replace = text.gsub(findstr,replacestr)

      if text != replace
          puts "Fix: " + name
          system("chmod +w " + name)
          File.open(name, "w") { |file| file.puts replace }
          STDOUT.flush
      end
  end
  Dir[dir + '*/'].each(&method(:find_and_replace))
end

# ....
# ....

    flipper_post_install(installer)

   # add this line into post_install do |installer|
    find_and_replace("Pods/RCT-Folly/folly/synchronization/DistributedMutex-inl.h",
          "  atomic_notify_one(state);", "  folly::atomic_notify_one(state);")

🐛 Bug Report

I have a react native 0.64.0 project with fipper 0.88.0 if try build show this compile error

I follow steps in #2215 but don’t resolve

▸ Compiling DistributedMutex.cpp

❌  /Volumes/disk/app/ios/Pods/Headers/Private/RCT-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 
'atomic_notify_one<unsigned long>' is unavailable

    atomic_notify_one(state);
                   ^~~~~~~


▸ Compiling Demangle.cpp
** ARCHIVE FAILED **


The following build commands failed:
        CompileC /Users/user/Library/Developer/Xcode/DerivedData/aymbdgipiyzikgcwjklokmljfxvv/Build/Intermediates.noindex/ArchiveIntermediates/app/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/RCT-Folly.build/Objects-normal/arm64/DistributedMutex.o /Volumes/disk/app/ios/Pods/RCT-Folly/folly/synchronization/DistributedMutex.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
[12:23:33]: Exit status: 65

To Reproduce

Run Build

Environment

  • IOS target version 12.0
  • Mac OS 11.3 (20E232) (M1)
  • Xcode 12.5 (12E262)
  • react 17.0.1
  • react-native 0.64.0
  • Cocoa pods 1.10.1
  • Fastlane 2.182.0

Great!!

1reaction
stazradcommented, Oct 4, 2021

I got an error trying to use this:

use_flipper!({ 'Flipper-Folly' => '2.6.7', 'Flipper-RSocket' => '1.4.3' , 'Flipper' => '0.88.0' })

but I did go to the individual dependencies in add_flipper_pods! and updated the versions to the above^

that worked for me- good luck!

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - Xcode throws 'atomic_notify_one<unsigned long ...
I installed Xcode 12 on my Mac, tried building my react native app that runs perfectly on android, and get 'atomic_notify_one<unsigned long>' is...
Read more >
XcodeVersion 12.5 Issue atomicNotifyOne unsigned long in ...
solution link: https://stackoverflow.com/questions/66189325/xcode-throws- atomic -notify-oneunsigned- long-is-unavailable.
Read more >
[Solved]-Xcode throws 'atomic_notify_one<unsigned long>' is ...
Coding example for the question Xcode throws 'atomic_notify_one ' is unavailable-React Native.
Read more >
atomic notify_oneunsigned long' is unavailable - Code Grepper
'atomic_notify_one<unsigned long>' is unavailable ; click "Xcode" > ; Get Info > ; Open using Rosetta.
Read more >
Diff - refs/tags/android-o-mr1-iot-release-smart-display ... - Google Git
SetEnv($EnvVars); - - # Check if using iPhone SDK 3.0 (simulator). ... __seg_, static_cast<unsigned>(_VSTD::__ctz(__b))); - if (__n == __dn) - return ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found