Percona Server with XtraDB

Fails to compile on Arm/PPC in time_collector

Reported by George on 2012-05-22
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Percona Server
Wishlist
Unassigned

Bug Description

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

Adding fpermissive to CXXFLAGS should fix it IMO.

I tried that and had no luck.

[ 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*)' [-fpermi

On Tue, 22 May 2012 12:35:54 -0000, George <email address hidden> wrote:
> It would appear this has also happened on Sparc:
> This happens on Debian Wheezy on Arm.

neither sparc nor ARM are currently on the list of supported platforms
for Percona Server, so this will be pretty low down on our priority
list.

You are welcome to engage Percona to fix it, otherwise this will likely
remain unfixed for a long time.

--
Stewart Smith

In addition to what Stewart said, we may also consider patch submissions to fix such issues.

Nate Schmoll (schmoll) wrote :

For reference, this also appears on PPC:

[ 91%] Building CXX object sql/CMakeFiles/sql.dir/query_response_time.cc.o
/mnt/backup1/mysql/Percona-Server-5.5.24-rel26.0/sql/query_response_time.cc: In member function ‘uint32 query_response_time::time_collector::count(uint) const’:
/mnt/backup1/mysql/Percona-Server-5.5.24-rel26.0/sql/query_response_time.cc:161: error: invalid conversion from ‘const my_pthread_fastmutex_t*’ to ‘my_pthread_fastmutex_t*’
/mnt/backup1/mysql/Percona-Server-5.5.24-rel26.0/sql/query_response_time.cc:161: error: initializing argument 1 of ‘int my_pthread_fastmutex_lock(my_pthread_fastmutex_t*)’
/mnt/backup1/mysql/Percona-Server-5.5.24-rel26.0/sql/query_response_time.cc:163: error: invalid conversion from ‘const pthread_mutex_t*’ to ‘pthread_mutex_t*’
/mnt/backup1/mysql/Percona-Server-5.5.24-rel26.0/sql/query_response_time.cc:163: error: initializing argument 1 of ‘int pthread_mutex_unlock(pthread_mutex_t*)’
/mnt/backup1/mysql/Percona-Server-5.5.24-rel26.0/sql/query_response_time.cc: In member function ‘uint64 query_response_time::time_collector::total(uint) const’:
/mnt/backup1/mysql/Percona-Server-5.5.24-rel26.0/sql/query_response_time.cc:168: error: invalid conversion from ‘const my_pthread_fastmutex_t*’ to ‘my_pthread_fastmutex_t*’
/mnt/backup1/mysql/Percona-Server-5.5.24-rel26.0/sql/query_response_time.cc:168: error: initializing argument 1 of ‘int my_pthread_fastmutex_lock(my_pthread_fastmutex_t*)’
/mnt/backup1/mysql/Percona-Server-5.5.24-rel26.0/sql/query_response_time.cc:170: error: invalid conversion from ‘const pthread_mutex_t*’ to ‘pthread_mutex_t*’
/mnt/backup1/mysql/Percona-Server-5.5.24-rel26.0/sql/query_response_time.cc:170: error: initializing argument 1 of ‘int pthread_mutex_unlock(pthread_mutex_t*)’
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

gcc -v
Using built-in specs.
Target: powerpc-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-secureplt --disable-softfloat --enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32 --with-long-double-128 --enable-checking=release --build=powerpc-linux-gnu --host=powerpc-linux-gnu --target=powerpc-linux-gnu
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8)

@George,

Did you remove CMakecache.txt and re-run cmake (or if you are on 5.1 then re-running ./configure) and do a clean build? fpermissive should downgrade the errors to warnings. So, unless you have Werror set (which causes warnings to become errors again) it shouldn't fail.

Can you provide us logs similar to http://buildlogs.pld-linux.org/index.php?dist=ac&arch=sparc&ok=0&ns=&cnt=50&off=0&name=mysql&id=6c312fca-446a-4c20-a51c-fbdbc724e4b5&action=text where it failed with fpermissive added to CXXFLAGS (don't add it to CFLAGS)?

Launchpad Janitor (janitor) wrote :

[Expired for Percona Server 5.5 because there has been no activity for 60 days.]

petermolnar (petermolnar) wrote :

I've managed to reproduce it ( chrooted debian running on an android phone ), and I also managed to bypass the compile error. The problems seems so that even if it compiles, it does not start up, fails with powering up InnoDB threads.
At the current state I don't think Percona could be pushed on ARM.

@peter

Interesting, Can you share the error (in the error log) which was emitted when the server failed to start?

Also, did passing -fpermissive in CXXFLAGS help?

petermolnar (petermolnar) wrote :

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

tags: added: contribution
no longer affects: percona-server/5.5
Changed in percona-server:
status: Confirmed → Triaged
Goetz T. Fischer (g-fischer) wrote :

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".

summary: - Fails to compile on Arm in time_collector
+ Fails to compile on Arm/PPC in time_collector
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers