LP #1002848: Fails to compile on Arm/PPC in time_collector
Description
Environment
Smart Checklist
Activity
lpjirasync January 22, 2018 at 4:40 PM
**Comment from Launchpad by: Launchpad Janitor on: 15-11-2017 00:29:49
This bug was fixed in the package percona-xtradb-cluster-5.5 - 5.5.37-25.10+dfsg-0ubuntu0.14.04.5
--------------- percona-xtradb-cluster-5.5 (5.5.37-25.10+dfsg-0ubuntu0.14.04.5) trusty; urgency=medium
[ Mario Splivalo ]
d/p/fix-power8-crash-under-load.patch: Create proper barriers at
mutex_exit() to fix crashes on ppc64el (LP: #1657256)
[ Jorge Niedbalski ]
d/p/fix_time_collector_lock_type.patch: Fix FTBFS on multiple
architectures by making time_collector_lock mutable (LP: #1002848).
– Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 24 Oct 2017 09:24:33 +0200
lpjirasync January 22, 2018 at 4:40 PM
**Comment from Launchpad by: Brian Murray on: 09-11-2017 21:35:28
Hello George, or anyone else affected,
Accepted percona-xtradb-cluster-5.5 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/percona-xtradb-cluster-5.5/5.5.37-25.10+dfsg-0ubuntu0.14.04.5 in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, details of your testing will help us make a better decision.
Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!
lpjirasync January 22, 2018 at 4:40 PM
**Comment from Launchpad by: Laurynas Biveinis on: 23-03-2016 16:33:18
class time_collector::time_collector_lock field has to be marked as mutable. And in 5.7 fixed by removing atomic operation fallbacks.
lpjirasync January 22, 2018 at 4:40 PM
**Comment from Launchpad by: Goetz T. Fischer on: 19-09-2013 22:15:18
this also happens with 5.5.32, linux debian 6 and pgi 2012.
"/devel/Percona-Server-5.5.32-rel31.0/sql/query_response_time.cc", line 161: error:
argument of type "const pthread_mutex_t *" is incompatible with
parameter of type "pthread_mutex_t *"
my_atomic_rwlock_rdlock(&time_collector_lock);
^
"/devel/Percona-Server-5.5.32-rel31.0/sql/query_response_time.cc", line 163: error:
argument of type "const pthread_mutex_t *" is incompatible with
parameter of type "pthread_mutex_t *"
my_atomic_rwlock_rdunlock(&time_collector_lock);
^
"/devel/Percona-Server-5.5.32-rel31.0/sql/query_response_time.cc", line 168: error:
argument of type "const pthread_mutex_t *" is incompatible with
parameter of type "pthread_mutex_t *"
my_atomic_rwlock_rdlock(&time_collector_lock);
^
"/devel/Percona-Server-5.5.32-rel31.0/sql/query_response_time.cc", line 170: error:
argument of type "const pthread_mutex_t *" is incompatible with
parameter of type "pthread_mutex_t *"
my_atomic_rwlock_rdunlock(&time_collector_lock);
^
4 errors detected in the compilation of "/devel/Percona-Server-5.5.32-rel31.0/sql/query_response_time.cc".
lpjirasync January 22, 2018 at 4:40 PM
**Comment from Launchpad by: petermolnar on: 04-03-2013 12:48:17
There's a solution mentioned on Stackoverflow:
http://stackoverflow.com/questions/11501971/working-around-invalid-conversion-from-const
I've combined the portability patch and made one for the time collector bug as well, please see attached patch.
It as made for 5.5.29-rel4
Details
Assignee
UnassignedUnassignedReporter
lpjirasynclpjirasync(Deactivated)Priority
Low
Details
Details
Assignee
Reporter
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist
Open Smart Checklist
Smart Checklist

**Reported in Launchpad by George last update 15-11-2017 00:29:51
It would appear this has also happened on Sparc:
http://buildlogs.pld-linux.org/index.php?dist=ac&arch=sparc&ok=0&name=mysql&id=6c312fca-446a-4c20-a51c-fbdbc724e4b5&action=tail
Errors from Arm boxes below:
[ 78%] Building CXX object sql/CMakeFiles/sql.dir/query_response_time.cc.o
/root/Percona-Server-5.5.23-rel25.3/sql/query_response_time.cc: In member function 'uint32 query_response_time::time_collector::count(uint) const':
/root/Percona-Server-5.5.23-rel25.3/sql/query_response_time.cc:161:5: error: invalid conversion from 'const pthread_mutex_t*' to 'pthread_mutex_t*' [-fpermissive]
/usr/include/pthread.h:746:12: error: initializing argument 1 of 'int pthread_mutex_lock(pthread_mutex_t*)' [-fpermissive]
/root/Percona-Server-5.5.23-rel25.3/sql/query_response_time.cc:163:5: error: invalid conversion from 'const pthread_mutex_t*' to 'pthread_mutex_t*' [-fpermissive]
/usr/include/pthread.h:757:12: error: initializing argument 1 of 'int pthread_mutex_unlock(pthread_mutex_t*)' [-fpermissive]
/root/Percona-Server-5.5.23-rel25.3/sql/query_response_time.cc: In member function 'uint64 query_response_time::time_collector::total(uint) const':
/root/Percona-Server-5.5.23-rel25.3/sql/query_response_time.cc:168:5: error: invalid conversion from 'const pthread_mutex_t*' to 'pthread_mutex_t*' [-fpermissive]
/usr/include/pthread.h:746:12: error: initializing argument 1 of 'int pthread_mutex_lock(pthread_mutex_t*)' [-fpermissive]
/root/Percona-Server-5.5.23-rel25.3/sql/query_response_time.cc:170:5: error: invalid conversion from 'const pthread_mutex_t*' to 'pthread_mutex_t*' [-fpermissive]
/usr/include/pthread.h:757:12: error: initializing argument 1 of 'int pthread_mutex_unlock(pthread_mutex_t*)' [-fpermissive]
make[2]: *** [sql/CMakeFiles/sql.dir/query_response_time.cc.o] Error 1
make[1]: *** [sql/CMakeFiles/sql.dir/all] Error 2
make: *** [all] Error 2
This happens on Debian Wheezy on Arm.
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c+,fortran,objc,obj-c+ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv4t --with-float=soft --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-1)
slut:~/Percona-Server-5.5.23-rel25.3# uname -a
Linux host 3.2.0-2-ixp4xx #1 Mon Apr 30 16:58:00 UTC 2012 armv5tel GNU/Linux