I am compiling Percona (a variant of MySQL) on my Raspberry Pi, which has an ARM processor.
I had a problem during compilation that was reported, but no one wants to fix because ARM is an unsupported platform.
https://bugs.launchpad.net/percona-server/+bug/1002848
I managed to get around this problem and successfully compile, but my knowledge about C ++ is somewhat lacking, and I don’t quite understand that I really broke something or not.
I read a lot of invalid conversions from const char * to char * questions on SO, where I got the idea for this workaround.
The error was as follows:
error: invalid conversion from 'const pthread_mutex_t*' to 'pthread_mutex_t*'
(actually it was not pthread_mutex_t
on my platform, but the problem is the same - the actual type lost for the endless abyss, which is the scroll buffer)
Violation Code:
uint32 count(uint index) const { my_atomic_rwlock_rdlock(&time_collector_lock);
I changed this to:
uint32 count(uint index) const { my_atomic_rwlock_t dummy = time_collector_lock; my_atomic_rwlock_rdlock(&dummy);
time_collector_lock is defined as:
private: my_atomic_rwlock_t time_collector_lock;
Due to the fact that this should be a mutex, I have a feeling that I probably did this without streaming security. Or is this normal?
Is there a better solution?