Source: mariadb-10.3 Version: 1:10.1.37-1 Severity: normal User: debian-powerpc@lists.debian.org Usertags: powerpc
Hello! On some 32-bit targets like mips or powerpc, the mariabdb-10.3 build fails with: error: #error atomic ops for this platform are not implemented This is because the test for C++11 atomics in configure.cmake fails: CHECK_CXX_SOURCE_COMPILES(" int main() { long long int var= 1; long long int *ptr= &var; return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); }" HAVE_GCC_C11_ATOMICS) Trying to build this code on ppc64 works fine: glaubitz@redpanda:~/mariadb$ g++ cpp11test.cpp -o cpp11test glaubitz@redpanda:~/mariadb$ ./cpp11test On powerpc, we need -latomic otherwise the compilation fails and HAVE_GCC_C11_ATOMICS is set to false: root@kapitsa:~# g++ cpp11test.cpp -o cpp11test /usr/bin/ld: /tmp/ccyivhlO.o: in function `main': cpp11test.cpp:(.text+0x48): undefined reference to `__atomic_load_8' collect2: error: ld returned 1 exit status root@kapitsa:~# root@kapitsa:~# g++ cpp11test.cpp -o cpp11test -latomic root@kapitsa:~# I have no idea, however, how to tell cmake here to pass -latomic, I'm not a cmake expert. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913