Upgraded to solarisstudio12.3, commented out cmake/os/Linux.cmake lines 26-33 and build almost worked. I've ended up with:
...
[ 84%] Building CXX object sql/CMakeFiles/sql.dir/sql_parse.cc.o
"/home/openxs/bzr2/percona-5.5/include/my_global.h", line 196: Warning (Anachronism): Attempt to redefine __builtin_expect without using #undef.
1 Warning(s) detected.
[ 84%] Building CXX object sql/CMakeFiles/sql.dir/query_response_time.cc.o
"/home/openxs/bzr2/percona-5.5/include/my_global.h", line 196: Warning (Anachronism): Attempt to redefine __builtin_expect without using #undef.
"/home/openxs/bzr2/percona-5.5/sql/query_response_time.cc", line 136: Error: An integer constant expression is required within the array subscript operator.
"/home/openxs/bzr2/percona-5.5/sql/query_response_time.cc", line 202: Error: An integer constant expression is required within the array subscript operator.
"/home/openxs/bzr2/percona-5.5/sql/query_response_time.cc", line 203: Error: An integer constant expression is required within the array subscript operator.
"/home/openxs/bzr2/percona-5.5/sql/query_response_time.cc", line 161: Error: Formal argument mp of type st_my_pthread_fastmutex_t* in call to my_pthread_fastmutex_lock(st_my_pthread_fastmutex_t*) is being passed const st_my_pthread_fastmutex_t*.
"/home/openxs/bzr2/percona-5.5/sql/query_response_time.cc", line 163: Error: Formal argument __mutex of type pthread_mutex_t* in call to pthread_mutex_unlock(pthread_mutex_t*) is being passed const pthread_mutex_t*.
"/home/openxs/bzr2/percona-5.5/sql/query_response_time.cc", line 168: Error: Formal argument mp of type st_my_pthread_fastmutex_t* in call to my_pthread_fastmutex_lock(st_my_pthread_fastmutex_t*) is being passed const st_my_pthread_fastmutex_t*.
"/home/openxs/bzr2/percona-5.5/sql/query_response_time.cc", line 170: Error: Formal argument __mutex of type pthread_mutex_t* in call to pthread_mutex_unlock(pthread_mutex_t*) is being passed const pthread_mutex_t*.
7 Error(s) and 1 Warning(s) detected.
make[2]: *** [sql/CMakeFiles/sql.dir/query_response_time.cc.o] Error 2
make[1]: *** [sql/CMakeFiles/sql.dir/all] Error 2
make: *** [all] Error 2
Upgraded to solarisstudio12.3, commented out cmake/os/ Linux.cmake lines 26-33 and build almost worked. I've ended up with:
... sql.dir/ sql_parse. cc.o openxs/ bzr2/percona- 5.5/include/ my_global. h", line 196: Warning (Anachronism): Attempt to redefine __builtin_expect without using #undef. sql.dir/ query_response_ time.cc. o openxs/ bzr2/percona- 5.5/include/ my_global. h", line 196: Warning (Anachronism): Attempt to redefine __builtin_expect without using #undef. openxs/ bzr2/percona- 5.5/sql/ query_response_ time.cc" , line 136: Error: An integer constant expression is required within the array subscript operator. openxs/ bzr2/percona- 5.5/sql/ query_response_ time.cc" , line 202: Error: An integer constant expression is required within the array subscript operator. openxs/ bzr2/percona- 5.5/sql/ query_response_ time.cc" , line 203: Error: An integer constant expression is required within the array subscript operator. openxs/ bzr2/percona- 5.5/sql/ query_response_ time.cc" , line 161: Error: Formal argument mp of type st_my_pthread_ fastmutex_ t* in call to my_pthread_ fastmutex_ lock(st_ my_pthread_ fastmutex_ t*) is being passed const st_my_pthread_ fastmutex_ t*. openxs/ bzr2/percona- 5.5/sql/ query_response_ time.cc" , line 163: Error: Formal argument __mutex of type pthread_mutex_t* in call to pthread_ mutex_unlock( pthread_ mutex_t* ) is being passed const pthread_mutex_t*. openxs/ bzr2/percona- 5.5/sql/ query_response_ time.cc" , line 168: Error: Formal argument mp of type st_my_pthread_ fastmutex_ t* in call to my_pthread_ fastmutex_ lock(st_ my_pthread_ fastmutex_ t*) is being passed const st_my_pthread_ fastmutex_ t*. openxs/ bzr2/percona- 5.5/sql/ query_response_ time.cc" , line 170: Error: Formal argument __mutex of type pthread_mutex_t* in call to pthread_ mutex_unlock( pthread_ mutex_t* ) is being passed const pthread_mutex_t*. /sql.dir/ query_response_ time.cc. o] Error 2 /sql.dir/ all] Error 2
[ 84%] Building CXX object sql/CMakeFiles/
"/home/
1 Warning(s) detected.
[ 84%] Building CXX object sql/CMakeFiles/
"/home/
"/home/
"/home/
"/home/
"/home/
"/home/
"/home/
"/home/
7 Error(s) and 1 Warning(s) detected.
make[2]: *** [sql/CMakeFiles
make[1]: *** [sql/CMakeFiles
make: *** [all] Error 2