folly: [powerpc] Some build errors and test results: issues to be addressed – threading, endianness
Could someone help me a bit with an advice on the following? (I do not ask to fix it for me, but perhaps for someone who knows what the code does exactly, pointing out at the issue will be fairly easy.)
This is the error I get:
FAILED: CMakeFiles/small_locks_test.dir/folly/synchronization/test/SmallLocksTest.cpp.o
/opt/local/bin/g++-mp-13 -DFMT_SHARED -DFOLLY_XLOG_STRIP_PREFIXES=\"/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00:/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/build\" -DGFLAGS_IS_A_DLL=0 -D_GNU_SOURCE -D_REENTRANT -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/build -I/opt/local/libexec/boost/1.81/include -I/opt/local/libexec/openssl3/include -isystem /opt/local/include -isystem /opt/local/include/libfmt10 -pipe -I/opt/local/libexec/openssl3/include -I/opt/local/libexec/boost/1.81/include -Os -std=c++17 -DFOLLY_ALLOW_TFO=0 -fpermissive -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/libexec/openssl3/include -I/opt/local/libexec/boost/1.81/include -isystem/opt/local/include -Wno-undef-prefix -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -fcoroutines -g -finput-charset=UTF-8 -fsigned-char -Wall -Wno-deprecated -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused -Wuninitialized -Wunused-label -Wunused-result -Wshadow-compatible-local -Wno-noexcept-type -fopenmp -std=gnu++17 -MD -MT CMakeFiles/small_locks_test.dir/folly/synchronization/test/SmallLocksTest.cpp.o -MF CMakeFiles/small_locks_test.dir/folly/synchronization/test/SmallLocksTest.cpp.o.d -o CMakeFiles/small_locks_test.dir/folly/synchronization/test/SmallLocksTest.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/SmallLocks.h:39,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:17:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h: In instantiation of 'void folly::PicoSpinLock<IntType, Bit>::init(IntType) [with IntType = long long int; int Bit = 63]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:96:24: required from '{anonymous}::PslTest<T>::PslTest() [with T = long long int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:114:14: required from 'void {anonymous}::doPslTest() [with T = long long int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:163:21: required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:94:31: error: no match for call to '(const folly::make_atomic_ref_t) (folly::PicoSpinLock<long long int, 63>::UIntType&)'
94 | auto ref = make_atomic_ref(lock_);
| ~~~~~~~~~~~~~~~^~~~~~~
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:49:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: candidate: 'template<class T, typename std::enable_if<((is_trivially_copyable_v<T> && (sizeof (T) == sizeof (std::atomic<_ITp>))) && (__alignof__ (T) == __alignof__ (std::atomic<_ITp>))), int>::type <anonymous> > folly::atomic_ref<T> folly::make_atomic_ref_t::operator()(T&) const'
162 | atomic_ref<T> operator()(T& ref) const {
| ^~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:161:18: error: no type named 'type' in 'struct std::enable_if<false, int>'
161 | int> = 0>
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h: In instantiation of 'void folly::PicoSpinLock<IntType, Bit>::setData(IntType) [with IntType = long long int; int Bit = 63]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:103:19: required from 'void {anonymous}::PslTest<T>::doTest() [with T = long long int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:119:35: required from 'void {anonymous}::doPslTest() [with T = long long int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:163:21: required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:122:31: error: no match for call to '(const folly::make_atomic_ref_t) (folly::PicoSpinLock<long long int, 63>::UIntType&)'
122 | auto ref = make_atomic_ref(lock_);
| ~~~~~~~~~~~~~~~^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: candidate: 'template<class T, typename std::enable_if<((is_trivially_copyable_v<T> && (sizeof (T) == sizeof (std::atomic<_ITp>))) && (__alignof__ (T) == __alignof__ (std::atomic<_ITp>))), int>::type <anonymous> > folly::atomic_ref<T> folly::make_atomic_ref_t::operator()(T&) const'
162 | atomic_ref<T> operator()(T& ref) const {
| ^~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:161:18: error: no type named 'type' in 'struct std::enable_if<false, int>'
161 | int> = 0>
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h: In instantiation of 'IntType folly::PicoSpinLock<IntType, Bit>::getData() const [with IntType = long long int; int Bit = 63]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:106:9: required from 'void {anonymous}::PslTest<T>::doTest() [with T = long long int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:119:35: required from 'void {anonymous}::doPslTest() [with T = long long int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:163:21: required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:109:31: error: no match for call to '(const folly::make_atomic_ref_t) (folly::PicoSpinLock<long long int, 63>::UIntType&)'
109 | auto ref = make_atomic_ref(lock_);
| ~~~~~~~~~~~~~~~^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: candidate: 'template<class T, typename std::enable_if<((is_trivially_copyable_v<T> && (sizeof (T) == sizeof (std::atomic<_ITp>))) && (__alignof__ (T) == __alignof__ (std::atomic<_ITp>))), int>::type <anonymous> > folly::atomic_ref<T> folly::make_atomic_ref_t::operator()(T&) const'
162 | atomic_ref<T> operator()(T& ref) const {
| ^~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:161:18: error: no type named 'type' in 'struct std::enable_if<false, int>'
161 | int> = 0>
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h: In instantiation of 'void folly::PicoSpinLock<IntType, Bit>::init(IntType) [with IntType = long long unsigned int; int Bit = 63]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:96:24: required from '{anonymous}::PslTest<T>::PslTest() [with T = long long unsigned int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:114:14: required from 'void {anonymous}::doPslTest() [with T = long long unsigned int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:164:22: required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:94:31: error: no match for call to '(const folly::make_atomic_ref_t) (folly::PicoSpinLock<long long unsigned int, 63>::UIntType&)'
94 | auto ref = make_atomic_ref(lock_);
| ~~~~~~~~~~~~~~~^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: candidate: 'template<class T, typename std::enable_if<((is_trivially_copyable_v<T> && (sizeof (T) == sizeof (std::atomic<_ITp>))) && (__alignof__ (T) == __alignof__ (std::atomic<_ITp>))), int>::type <anonymous> > folly::atomic_ref<T> folly::make_atomic_ref_t::operator()(T&) const'
162 | atomic_ref<T> operator()(T& ref) const {
| ^~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:161:18: error: no type named 'type' in 'struct std::enable_if<false, int>'
161 | int> = 0>
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h: In instantiation of 'void folly::PicoSpinLock<IntType, Bit>::setData(IntType) [with IntType = long long unsigned int; int Bit = 63]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:103:19: required from 'void {anonymous}::PslTest<T>::doTest() [with T = long long unsigned int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:119:35: required from 'void {anonymous}::doPslTest() [with T = long long unsigned int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:164:22: required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:122:31: error: no match for call to '(const folly::make_atomic_ref_t) (folly::PicoSpinLock<long long unsigned int, 63>::UIntType&)'
122 | auto ref = make_atomic_ref(lock_);
| ~~~~~~~~~~~~~~~^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: candidate: 'template<class T, typename std::enable_if<((is_trivially_copyable_v<T> && (sizeof (T) == sizeof (std::atomic<_ITp>))) && (__alignof__ (T) == __alignof__ (std::atomic<_ITp>))), int>::type <anonymous> > folly::atomic_ref<T> folly::make_atomic_ref_t::operator()(T&) const'
162 | atomic_ref<T> operator()(T& ref) const {
| ^~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:161:18: error: no type named 'type' in 'struct std::enable_if<false, int>'
161 | int> = 0>
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h: In instantiation of 'IntType folly::PicoSpinLock<IntType, Bit>::getData() const [with IntType = long long unsigned int; int Bit = 63]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:106:9: required from 'void {anonymous}::PslTest<T>::doTest() [with T = long long unsigned int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:119:35: required from 'void {anonymous}::doPslTest() [with T = long long unsigned int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:164:22: required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:109:31: error: no match for call to '(const folly::make_atomic_ref_t) (folly::PicoSpinLock<long long unsigned int, 63>::UIntType&)'
109 | auto ref = make_atomic_ref(lock_);
| ~~~~~~~~~~~~~~~^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: candidate: 'template<class T, typename std::enable_if<((is_trivially_copyable_v<T> && (sizeof (T) == sizeof (std::atomic<_ITp>))) && (__alignof__ (T) == __alignof__ (std::atomic<_ITp>))), int>::type <anonymous> > folly::atomic_ref<T> folly::make_atomic_ref_t::operator()(T&) const'
162 | atomic_ref<T> operator()(T& ref) const {
| ^~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:161:18: error: no type named 'type' in 'struct std::enable_if<false, int>'
161 | int> = 0>
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h: In instantiation of 'void folly::PicoSpinLock<IntType, Bit>::unlock() const [with IntType = long long int; int Bit = 63]':
/opt/local/include/gcc13/c++/bits/std_mutex.h:255:25: required from 'std::lock_guard<_Mutex>::~lock_guard() [with _Mutex = folly::PicoSpinLock<long long int, 63>]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:102:40: required from 'void {anonymous}::PslTest<T>::doTest() [with T = long long int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:119:35: required from 'void {anonymous}::doPslTest() [with T = long long int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:163:21: required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:156:31: error: no match for call to '(const folly::make_atomic_ref_t) (folly::PicoSpinLock<long long int, 63>::UIntType&)'
156 | auto ref = make_atomic_ref(lock_);
| ~~~~~~~~~~~~~~~^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: candidate: 'template<class T, typename std::enable_if<((is_trivially_copyable_v<T> && (sizeof (T) == sizeof (std::atomic<_ITp>))) && (__alignof__ (T) == __alignof__ (std::atomic<_ITp>))), int>::type <anonymous> > folly::atomic_ref<T> folly::make_atomic_ref_t::operator()(T&) const'
162 | atomic_ref<T> operator()(T& ref) const {
| ^~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:161:18: error: no type named 'type' in 'struct std::enable_if<false, int>'
161 | int> = 0>
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h: In instantiation of 'void folly::PicoSpinLock<IntType, Bit>::unlock() const [with IntType = long long unsigned int; int Bit = 63]':
/opt/local/include/gcc13/c++/bits/std_mutex.h:255:25: required from 'std::lock_guard<_Mutex>::~lock_guard() [with _Mutex = folly::PicoSpinLock<long long unsigned int, 63>]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:102:40: required from 'void {anonymous}::PslTest<T>::doTest() [with T = long long unsigned int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:119:35: required from 'void {anonymous}::doPslTest() [with T = long long unsigned int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:164:22: required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:156:31: error: no match for call to '(const folly::make_atomic_ref_t) (folly::PicoSpinLock<long long unsigned int, 63>::UIntType&)'
156 | auto ref = make_atomic_ref(lock_);
| ~~~~~~~~~~~~~~~^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: candidate: 'template<class T, typename std::enable_if<((is_trivially_copyable_v<T> && (sizeof (T) == sizeof (std::atomic<_ITp>))) && (__alignof__ (T) == __alignof__ (std::atomic<_ITp>))), int>::type <anonymous> > folly::atomic_ref<T> folly::make_atomic_ref_t::operator()(T&) const'
162 | atomic_ref<T> operator()(T& ref) const {
| ^~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:161:18: error: no type named 'type' in 'struct std::enable_if<false, int>'
161 | int> = 0>
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h: In instantiation of 'bool folly::PicoSpinLock<IntType, Bit>::try_lock_internal() const [with IntType = long long int; int Bit = 63]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:144:13: required from 'void folly::PicoSpinLock<IntType, Bit>::lock() const [with IntType = long long int; int Bit = 63]'
/opt/local/include/gcc13/c++/bits/std_mutex.h:249:23: required from 'std::lock_guard<_Mutex>::lock_guard(mutex_type&) [with _Mutex = folly::PicoSpinLock<long long int, 63>; mutex_type = folly::PicoSpinLock<long long int, 63>]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:102:40: required from 'void {anonymous}::PslTest<T>::doTest() [with T = long long int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:119:35: required from 'void {anonymous}::doPslTest() [with T = long long int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:163:21: required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:166:31: error: no match for call to '(const folly::make_atomic_ref_t) (folly::PicoSpinLock<long long int, 63>::UIntType&)'
166 | auto ref = make_atomic_ref(lock_);
| ~~~~~~~~~~~~~~~^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: candidate: 'template<class T, typename std::enable_if<((is_trivially_copyable_v<T> && (sizeof (T) == sizeof (std::atomic<_ITp>))) && (__alignof__ (T) == __alignof__ (std::atomic<_ITp>))), int>::type <anonymous> > folly::atomic_ref<T> folly::make_atomic_ref_t::operator()(T&) const'
162 | atomic_ref<T> operator()(T& ref) const {
| ^~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:161:18: error: no type named 'type' in 'struct std::enable_if<false, int>'
161 | int> = 0>
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h: In instantiation of 'bool folly::PicoSpinLock<IntType, Bit>::try_lock_internal() const [with IntType = long long unsigned int; int Bit = 63]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:144:13: required from 'void folly::PicoSpinLock<IntType, Bit>::lock() const [with IntType = long long unsigned int; int Bit = 63]'
/opt/local/include/gcc13/c++/bits/std_mutex.h:249:23: required from 'std::lock_guard<_Mutex>::lock_guard(mutex_type&) [with _Mutex = folly::PicoSpinLock<long long unsigned int, 63>; mutex_type = folly::PicoSpinLock<long long unsigned int, 63>]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:102:40: required from 'void {anonymous}::PslTest<T>::doTest() [with T = long long unsigned int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:119:35: required from 'void {anonymous}::doPslTest() [with T = long long unsigned int]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/test/SmallLocksTest.cpp:164:22: required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/PicoSpinLock.h:166:31: error: no match for call to '(const folly::make_atomic_ref_t) (folly::PicoSpinLock<long long unsigned int, 63>::UIntType&)'
166 | auto ref = make_atomic_ref(lock_);
| ~~~~~~~~~~~~~~~^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: candidate: 'template<class T, typename std::enable_if<((is_trivially_copyable_v<T> && (sizeof (T) == sizeof (std::atomic<_ITp>))) && (__alignof__ (T) == __alignof__ (std::atomic<_ITp>))), int>::type <anonymous> > folly::atomic_ref<T> folly::make_atomic_ref_t::operator()(T&) const'
162 | atomic_ref<T> operator()(T& ref) const {
| ^~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:162:17: note: template argument deduction/substitution failed:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_folly/folly/work/folly-v2024.01.15.00/folly/synchronization/AtomicRef.h:161:18: error: no type named 'type' in 'struct std::enable_if<false, int>'
161 | int> = 0>
| ^
It seems that folly/synchronization/AtomicRef.h uses a kind of SFINAE, which does not work as intended either due to implicit assumption of 64-bit arch (so pointers and offsets are wrong) or due to incorrect assumption of bool and spinlock being equal to 1 byte (both are 4 byte on ppc).
Any ideas and suggestions will be greatly appreciated.
About this issue
- Original URL
- State: open
- Created 5 months ago
- Comments: 22 (1 by maintainers)
@Orvid I had the basic build fixed for
ppcfor quite some time (available via Macports and I have the PR here hanging for ages, though it is somewhat outdated by now), and last night actually fixed – well, kind of, since I had to skip some asserts and a few test cases – the build with tests added, however there is an issue withTreadIdimplementation at the moment, which shown up only when trying to run tests, and it may take a bit to fix it. I will try to find a workable solution, since after all I am curious to see whether we can get some tests passing and not just building.Generally speaking, folly only supports 64 bit architectures. There may be bits and pieces that work on 32-bit platforms, but overall Folly is entirely untested on them.
If the fixes needed to get it compiling on 32-bit PPC are reasonably small, we can probably accept a pull request.