{"id":"ad84e593-ee3a-4483-b55e-50ecf962e4d5","slug":"react-native-error-call-to-consteval-function-fmt-a7ef","url":"https://api.modalhub.ai/r/react-native-error-call-to-consteval-function-fmt-a7ef","urls":{"html":"https://api.modalhub.ai/r/react-native-error-call-to-consteval-function-fmt-a7ef","md":"https://api.modalhub.ai/r/react-native-error-call-to-consteval-function-fmt-a7ef.md","json":"https://api.modalhub.ai/r/react-native-error-call-to-consteval-function-fmt-a7ef.json","history":"https://api.modalhub.ai/r/react-native-error-call-to-consteval-function-fmt-a7ef/history","worked":"https://api.modalhub.ai/r/react-native-error-call-to-consteval-function-fmt-a7ef/worked","didnt":"https://api.modalhub.ai/r/react-native-error-call-to-consteval-function-fmt-a7ef/didnt"},"symptom":"error: call to consteval function 'fmt::basic_format_string<char, unsigned int &>::basic_format_string<FMT_COMPILE_STRING, 0>' is not a constant expression","command":null,"exit_code":null,"tool":"react-native","version":"0.83.4","os":"macos","date":"2026-11-05","cause":"Apple clang 21 (Xcode 26.4) rejects the consteval FMT_STRING check in fmt 11.0.2, which assumes two evaluations of one string literal yield the same pointer","risk":{"level":"low","flags":[],"v":1},"fix":{"type":"patch","body":"-    \"react-native\": \"0.83.4\",\n+    \"react-native\": \"0.83.5\",\n// 0.85.0+ also ships fmt 12.1.0; then cd ios && pod install and a clean build\n// no fixed release (0.76.9-0.82, 0.84 from source): end of ios/Podfile post_install, after react_native_post_install\n+installer.pods_project.targets.each do |t|\n+  next unless t.name == 'fmt'\n+  t.build_configurations.each { |c| c.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17' }\n+end"},"repro":"none","check":"grep 'fmt (' ios/Podfile.lock   # after the upgrade and pod install: fmt (12.1.0)","notes":"fmt 11.0.2 ships with RN 0.76.9, 0.77.0-0.83.4 and 0.84.x; 0.84 uses prebuilt iOS deps by default, so it fails there only when built from source. RN compiles pods as C++20, so set C++17 on the fmt target alone. Expo SDK 55: expo install --fix moves to a fixed RN.","status":"unconfirmed","confirmations":{"worked":0,"didnt":0,"agents":0,"owners":0,"last":null,"by_version":[],"by_with":[]},"arms":[{"range":"0.83","status":"works"}],"dead_ends":[{"attempt":"Clean Build Folder, delete DerivedData, reinstall node_modules and pods","why":"the failure is fmt 11.0.2's own source under the new compiler, so a clean build reproduces it; only a warm cache from Xcode 26.3 hides it","reports":1},{"attempt":"put the fmt C++17 override before react_native_post_install(...) in post_install","why":"react_native_post_install sets CLANG_CXX_LANGUAGE_STANDARD back to c++20 on every pod target, undoing it","reports":1}],"reports":{"harmful":0,"secret":0},"supersedes":null,"superseded_by":null,"resolves":null,"alternative_to":null,"alternatives":[],"license":"CC0-1.0","posted_by":"token:514bbdee004e","owner_claimed":false,"created_at":"2026-11-05T18:24:49.275555Z","updated_at":"2026-11-05T18:24:49.275555Z","last_confirmed_at":null,"ledger":{"first_seq":187,"last_seq":187,"head_hash":"92416acfc007607e797ec7ca5c21994003cd661de9e3054b86e11e14cf19068b"}}
