Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloud_firestore: No member named 'memory_order_relaxed' #13564

Open
1 task done
alistair-riskmemo opened this issue Oct 30, 2024 · 7 comments
Open
1 task done

cloud_firestore: No member named 'memory_order_relaxed' #13564

alistair-riskmemo opened this issue Oct 30, 2024 · 7 comments
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. platform: ios Issues / PRs which are specifically for iOS. plugin: cloud_firestore Stale Issue with no recent activity type: bug Something isn't working

Comments

@alistair-riskmemo
Copy link

alistair-riskmemo commented Oct 30, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Database

Which platforms are affected?

iOS

Description

What I expected to happen:
Run a test project on my iOS device

What actually happened:
Failed to build iOS app

Semantic Issue (Xcode): No member named 'memory_order_relaxed' in 'std::memory_order'; did you mean 'std::memory_order_relaxed'?

Pod FirebaseFirestoreInternal uses Leveldb-library 1.22 which has a semantics error in leveldb-library/util/env_posix.cc:839:33

Reproducing the issue

flutter create test_project
cd test_project
flutter pub add firebase_core
flutter pub add cloud_firestore
flutter run

Firebase Core version

3.6.0

Flutter Version

3.24.3

Relevant Log Output

Launching lib/main.dart on Alistair’s iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: xxxxxxx
Running pod install...                                             15.0s
Running Xcode build...                                                  
Xcode build done.                                           14.9s
Failed to build iOS app
Could not build the precompiled application for the device.
Semantic Issue (Xcode): No member named 'memory_order_relaxed' in 'std::memory_order'; did you mean 'std::memory_order_relaxed'?
/Users/xxxx/development/test_project/ios/Pods/leveldb-library/util/env_posix.cc:839:33


Semantic Issue (Xcode): No member named 'memory_order_relaxed' in 'std::memory_order'; did you mean 'std::memory_order_relaxed'?
/Users/xx/development/test_project/ios/Pods/leveldb-library/util/env_posix.cc:856:34



Error launching application on Alistair’s iPhone.

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.5.3
Flutter SDK 3.24.3
test_project 1.0.0+1

dependencies:
- cloud_firestore 5.4.4 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- cupertino_icons 1.0.8
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]

dev dependencies:
- flutter_lints 4.0.0 [lints]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service]

transitive dependencies:
- _flutterfire_internals 1.3.44 [collection firebase_core firebase_core_platform_interface flutter meta]
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- characters 1.3.0
- clock 1.1.1
- cloud_firestore_platform_interface 6.4.3 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 4.3.2 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins]
- collection 1.18.0
- fake_async 1.3.1 [clock collection]
- firebase_core 3.6.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_core_platform_interface 5.3.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.18.1 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- leak_tracker 10.0.5 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 3.0.5 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 3.0.1 [leak_tracker matcher meta]
- lints 4.0.0
- matcher 0.12.16+1 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.11.1 [collection]
- meta 1.15.0
- path 1.9.0
- plugin_platform_interface 2.1.8 [meta]
- sky_engine 0.0.99
- source_span 1.10.0 [collection path term_glyph]
- stack_trace 1.11.1 [path]
- stream_channel 2.1.2 [async]
- string_scanner 1.2.0 [source_span]
- term_glyph 1.2.1
- test_api 0.7.2 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- vector_math 2.1.4
- vm_service 14.2.5
- web 1.1.0

Additional context and comments

alistairscott@Alistairs-Mac-mini test_project % flutter doctor -v
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.1 24B83 darwin-arm64, locale en-IN)
• Flutter version 3.24.3 on channel stable at /Users/alistairscott/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (7 weeks ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/alistairscott/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /opt/homebrew/opt/openjdk@17/bin/java
• Java version OpenJDK Runtime Environment Homebrew (build 17.0.13+0)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16B40
• CocoaPods version 1.16.0

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[✓] VS Code (version 1.95.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.98.0

[✓] Connected device (4 available)
• Alistair’s iPhone (mobile) • 00008110-001C481A1147801E • ios • iOS 18.0.1 22A3370
• macOS (desktop) • macos • darwin-arm64 • macOS 15.1 24B83 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.1 24B83 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 130.0.6723.70

[✓] Network resources
• All expected network resources are available.

• No issues found!

@alistair-riskmemo alistair-riskmemo added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Oct 30, 2024
@PranavMasekar
Copy link

Same issue

@SelaseKay SelaseKay added plugin: cloud_firestore platform: ios Issues / PRs which are specifically for iOS. labels Oct 30, 2024
@russellwheatley
Copy link
Member

Hey @alistair-riskmemo - try dropping Cocoapods. See this comment: #13563 (comment)

Next, you will want to ensure you're pulling latest level-db Pod. Try the following:

cd ios
rm -rf Pods && rm Podfile.lock
pod install --repo-update

You're aiming for level-db 1.22.6 which is a transitive dependency that you can see in your ios/Podfile.lock.

Let me know if this resolves your issue 👍

@russellwheatley russellwheatley added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Oct 30, 2024
@alistair-riskmemo
Copy link
Author

alistair-riskmemo commented Oct 30, 2024

Hi @russellwheatley, thanks for your help.

After doing that it's started throwing different errors. I tried removing the test project and starting again from scratch as well. I'm getting this a lot now:
Error (Xcode): Undefined symbol: absl::lts_20240116::ByString::Find(absl::lts_20240116::string_view, unsigned long) const

Either way, I think the original error will still remain. 1.22.6 is elsewhere in the Podfile.lock, but it's FirebaseFirestoreInternal depending on 1.22 which is causing the original error:

  • FirebaseFirestore (11.2.0):
    • FirebaseCore (~> 11.0)
    • FirebaseCoreExtension (~> 11.0)
    • FirebaseFirestoreInternal (= 11.2.0)
    • FirebaseSharedSwift (~> 11.0)
  • FirebaseFirestoreInternal (11.2.0):
    • abseil/algorithm (~> 1.20240116.1)
    • abseil/base (~> 1.20240116.1)
    • abseil/container/flat_hash_map (~> 1.20240116.1)
    • abseil/memory (~> 1.20240116.1)
    • abseil/meta (~> 1.20240116.1)
    • abseil/strings/strings (~> 1.20240116.1)
    • abseil/time (~> 1.20240116.1)
    • abseil/types (~> 1.20240116.1)
    • FirebaseAppCheckInterop (~> 11.0)
    • FirebaseCore (~> 11.0)
    • "gRPC-C++ (~> 1.65.0)"
    • gRPC-Core (~> 1.65.0)
    • leveldb-library (~> 1.22)
    • nanopb (~> 3.30910.0)
@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Oct 30, 2024
@alistair-riskmemo
Copy link
Author

It's issue #13563 I'm getting now. I just updated to the latest cocoapods 1.16.1

@russellwheatley
Copy link
Member

@alistair-riskmemo drop cocoapods down to v1.15.2

@mikehardy
Copy link
Contributor

mikehardy commented Oct 30, 2024

@russellwheatley with an update to leveldb-library and this below, things are fine on full-current stuff. Exciting times when the build toolchains update!


[note: this was edited to be gnu++14 not c++14]

Add this to your Podfile if you want a workaround, note you may already have a post_install section, so you would just use the inner part(s):

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'abseil'
      Pod::UI.puts "Workaround: Configuring abseil to use gnu++14 language standard for cocoapods 1.16+ compatibility".yellow
      Pod::UI.puts "            Remove workaround when upstream issue fixed https://github.com/firebase/firebase-ios-sdk/issues/13996".yellow
      target.build_configurations.each do |config|
        config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'gnu++14'
      end
    end

You will need to run pod install again after adding this, so that it executes and updates the build setting

@russellwheatley russellwheatley added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Oct 30, 2024
@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label Nov 8, 2024
@google-oss-bot
Copy link

Hey @alistair-riskmemo. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. platform: ios Issues / PRs which are specifically for iOS. plugin: cloud_firestore Stale Issue with no recent activity type: bug Something isn't working
7 participants
@mikehardy @russellwheatley @google-oss-bot @SelaseKay @PranavMasekar @alistair-riskmemo and others