[MDEV-8255] Raspbian compilation failed on atomic ops Created: 2015-06-01  Updated: 2015-07-16  Resolved: 2015-07-16

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.1.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: VAROQUI Stephane Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

ARM Raspbian Linux



 Description   

I've try with additional flags

-DWITH_ATOMIC_OPS=up
-DWITH_ATOMIC_OPS=smp

In file included from /root/mariadb-10.1.4/include/lf.h:19:0,
                 from /root/mariadb-10.1.4/mysys/lf_alloc-pin.c:104:
/root/mariadb-10.1.4/include/my_atomic.h:121:2: error: #error atomic ops for this platform are not implemented
/root/mariadb-10.1.4/include/my_atomic.h: In function ‘my_atomic_casptr’:
/root/mariadb-10.1.4/include/my_atomic.h:250:1: error: ‘ptr’ undeclared (first use in this function)
/root/mariadb-10.1.4/include/my_atomic.h:250:1: note: each undeclared identifier is reported only once for each function it appears in
mysys/CMakeFiles/mysys.dir/build.make:2101: recipe for target 'mysys/CMakeFiles/mysys.dir/lf_alloc-pin.c.o' failed

glibc:
(Debian EGLIBC 2.13-38+rpi2+deb7u7) 2.13

cpu:
model name : ARMv7 Processor rev 5 (v7l)

version:
Linux version 3.18.7-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015

10.0 code based does not look affected



 Comments   
Comment by Sergei Golubchik [ 2015-06-17 ]

what gcc version was it?

Comment by VAROQUI Stephane [ 2015-06-19 ]

gcc (Debian 4.6.3-14+rpi1) 4.6.3
ldd (Debian EGLIBC 2.13-38+rpi2+deb7u7) 2.13

Comment by Sergei Golubchik [ 2015-07-16 ]

It seems that you need at least gcc 4.8 to use atomics (in particular 64-bit compare-and-swap) on ARM. See gcc wiki https://gcc.gnu.org/wiki/Atomic

Comment by VAROQUI Stephane [ 2015-07-16 ]

Thanks for the info

Generated at Thu Feb 08 07:25:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.