Skip to content

[πŸ›] fix below - New Arch build fail: No member named 'memory_order_relaxed' in 'std::memory_order';Β #8082

@efstathiosntonas

Description

@efstathiosntonas

MAINTAINER EDIT - πŸ‘‹

  1. this was an upstream issue caused by an unfortunate interaction with a new symbol react-native adds in New Architecture builds
  2. there is a PR merged upstream and released, v1.22.6 of leveldb-library will fix when installed on your system

To get the v1.22.6 of leveldb-library, cd ios && rm -f Podfile.lock && pod repo update && pod install and you should see v1.22.6 of leveldb-library in your Podfile.lock. Then you will build without issues.

Hope that helps!

What follows is the original bug report:


After upgrading to 0.76 with Fabric enabled, for some reason leveldb-library env_posix.cc file throws this error:

No member named 'memory_order_relaxed' in 'std::memory_order'; did you mean 'std::memory_order_relaxed'?

@mikehardy I think this is an upstream issue, it seems that the leveldb-library version is 1.22 and this has changed/fixed in version 1.23. I've applied the suggested changes from Xcode and the error went away. I'm opening the issue here so other devs are aware, shall we open an issue on upstream?

Podfile.lock:

  - FirebaseDatabase (11.4.0):
    - FirebaseAppCheckInterop (~> 11.0)
    - FirebaseCore (~> 11.0)
    - FirebaseSharedSwift (~> 11.0)
    - GoogleUtilities/UserDefaults (~> 8.0)
    - leveldb-library (~> 1.22)`

ps. Sorry for skipping issue template, it seems unrelated to us here.
ps2. Why on earth the new arch build throws this error?? πŸ€”

screenshot:
Screenshot 2024-10-24 at 10 32 31

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions