Skip to content

Conversation

@akrieger
Copy link

@akrieger akrieger commented Feb 7, 2026

Resolves this compile error. Fix inspired by https://github.com/microsoft/mimalloc/blob/dev3/src/arena.c#L2059

Error:   /home/runner/work/Cataclysm-DDA/Cataclysm-DDA/android/app/jni/src/../../../../src/third-party/mimalloc/arena.c:651:7: error: no matching function for call to 'atomic_store_explicit'
        mi_atomic_storei64_release(&mi_arenas_purge_expire, 0);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /home/runner/work/Cataclysm-DDA/Cataclysm-DDA/android/app/jni/src/../../../../src/third-party/mimalloc/mimalloc/atomic.h:148:49: note: expanded from macro 'mi_atomic_storei64_release'
  #define mi_atomic_storei64_release(p,x)         mi_atomic(store_explicit)(p,x,mi_memory_order(release))
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
  /home/runner/work/Cataclysm-DDA/Cataclysm-DDA/android/app/jni/src/../../../../src/third-party/mimalloc/mimalloc/atomic.h:35:35: note: expanded from macro 'mi_atomic'
  #define  mi_atomic(name)          std::atomic_##name
                                    ^~~~~~~~~~~~~~~~~~
  /usr/local/lib/android/sdk/ndk/25.2.9519653/sources/cxx-stl/llvm-libc++/include/atomic:1890:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('long' vs. 'int')
  atomic_store_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
  ^
  /usr/local/lib/android/sdk/ndk/25.2.9519653/sources/cxx-stl/llvm-libc++/include/atomic:1899:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('long' vs. 'int')
  atomic_store_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
  ^
  /usr/local/lib/android/sdk/ndk/25.2.9519653/sources/cxx-stl/llvm-libc++/include/memory:5138:1: note: candidate template ignored: could not match 'shared_ptr' against 'atomic'
  atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
  ^
  1 error generated.

akrieger added a commit to akrieger/Cataclysm-DDA that referenced this pull request Feb 9, 2026
akrieger added a commit to akrieger/Cataclysm-DDA that referenced this pull request Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant