elalish / manifold

Geometry library for topological robustness
Apache License 2.0
925 stars 98 forks source link

no matching function for call to 'atomic_exchange' in manifold/src/properties.cpp:89:18 #1027

Closed fire closed 7 hours ago

fire commented 4 days ago

I'll try adding #include <atomic>

thirdparty/manifold/src/properties.cpp:89:18: error: no matching function for call to 'atomic_exchange'
      auto old = std::atomic_exchange(
                 ^~~~~~~~~~~~~~~~~~~~
/usr/local/lib/android/sdk/ndk/23.2.8568313/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/atomic:1948:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('unsigned char' vs. 'int')
atomic_exchange(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
^
/usr/local/lib/android/sdk/ndk/23.2.8568313/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/atomic:1956:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('unsigned char' vs. 'int')
atomic_exchange(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
^
/usr/local/lib/android/sdk/ndk/23.2.8568313/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/memory:5146:1: note: candidate template ignored: could not match 'shared_ptr' against 'atomic'
atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
^
1 error generated.
scons: *** [thirdparty/manifold/src/properties.android.editor.arm64.o] Error 1
scons: building terminated because of errors.
[Time elapsed: 00:00:31.37]

https://github.com/godotengine/godot/actions/runs/11736862391/job/32696760939?pr=94321

fire commented 4 days ago

I am still trying to figure out where to start. It seems to be related to an Android compiler.

fire commented 4 days ago

Failing commit for reference https://github.com/godotengine/godot/commit/67b35a72e05b4f48135e33182d5292287c220531

pca006132 commented 3 days ago

@fire can you try to replace the rhs of that code (1) into static_cast<uint8_t>(1) ?

fire commented 1 day ago

I'm low on bandwidth, so I'll try to test it soon.

fire commented 5 hours ago

I have tested, and it fixes my issue.