Bug #75708 missing thr_*.h header file in mysql-community-devel-5.7.5-0.6.m15 RPM
Submitted: 31 Jan 2015 5:49 Modified: 13 Feb 2015 20:49
Reporter: 智史 三谷 Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[31 Jan 2015 5:49] 智史 三谷
Description:
i could not compile my plugin.

How to repeat:
[root@centosbackend includetest]# rpm -qa | grep 'mysql-community'
mysql-community-common-5.7.5-0.6.m15.el6.x86_64
mysql-community-devel-5.7.5-0.6.m15.el6.x86_64
mysql-community-libs-5.7.5-0.6.m15.el6.x86_64
mysql-community-client-5.7.5-0.6.m15.el6.x86_64

[root@centosbackend includetest]# rpm -qli mysql-community-devel-5.7.5-0.6.m15.el6.x86_64 | grep thr_

[root@centosbackend includetest]# cat test.c 
#include "my_global.h"
#include "my_pthread.h"

int main() {
    return 0;
}

[root@centosbackend includetest]# gcc  -I/usr/include/mysql  test.c 2>&1 | head -n 20
In file included from test.c:2:
/usr/include/mysql/my_pthread.h:50:23: error: thr_mutex.h: No such file or directory
/usr/include/mysql/my_pthread.h:51:22: error: thr_cond.h: No such file or directory
/usr/include/mysql/my_pthread.h:52:24: error: thr_rwlock.h: No such file or directory
In file included from /usr/include/mysql/my_pthread.h:228,
                 from test.c:2:
/usr/include/mysql/mysql/psi/mysql_thread.h:88: error: expected specifier-qualifier-list before 'my_mutex_t'
/usr/include/mysql/mysql/psi/mysql_thread.h:116: error: expected specifier-qualifier-list before 'native_rw_lock_t'
/usr/include/mysql/mysql/psi/mysql_thread.h:132: error: expected specifier-qualifier-list before 'rw_pr_lock_t'
/usr/include/mysql/mysql/psi/mysql_thread.h:173: error: expected specifier-qualifier-list before 'native_cond_t'
/usr/include/mysql/mysql/psi/mysql_thread.h:644: error: expected ';', ',' or ')' before '*' token
/usr/include/mysql/mysql/psi/mysql_thread.h: In function 'inline_mysql_mutex_destroy':
/usr/include/mysql/mysql/psi/mysql_thread.h:670: error: 'mysql_mutex_t' has no member named 'm_psi'
/usr/include/mysql/mysql/psi/mysql_thread.h:672: error: 'mysql_mutex_t' has no member named 'm_psi'
/usr/include/mysql/mysql/psi/mysql_thread.h:673: error: 'mysql_mutex_t' has no member named 'm_psi'
/usr/include/mysql/mysql/psi/mysql_thread.h:676: error: 'mysql_mutex_t' has no member named 'm_mutex'
/usr/include/mysql/mysql/psi/mysql_thread.h: In function 'inline_mysql_mutex_lock':
/usr/include/mysql/mysql/psi/mysql_thread.h:693: error: 'mysql_mutex_t' has no member named 'm_psi'
/usr/include/mysql/mysql/psi/mysql_thread.h:698: error: 'mysql_mutex_t' has no member named 'm_psi'
/usr/include/mysql/mysql/psi/mysql_thread.h:702: error: 'mysql_mutex_t' has no member named 'm_mutex'

[root@centosbackend usr]# find /usr/include/ -name '*thr_mutex.h*'
[13 Feb 2015 20:49] MySQL Verification Team
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug.

Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.

[miguel@vbcentos65 test]$ rpm -qa | grep 'mysql-community'
mysql-community-libs-5.7.5-0.6.m15.el6.x86_64
mysql-community-libs-compat-5.7.5-0.6.m15.el6.x86_64
mysql-community-release-el6-5.noarch
mysql-community-client-5.7.5-0.6.m15.el6.x86_64
mysql-community-devel-5.7.5-0.6.m15.el6.x86_64
mysql-community-common-5.7.5-0.6.m15.el6.x86_64
mysql-community-server-5.7.5-0.6.m15.el6.x86_64
[miguel@vbcentos65 test]$ cat test.c
#include <my_global.h>
#include <mysql.h>

int main(int argc, char **argv)
{
  printf("MySQL client version: %s\n", mysql_get_client_info());

  exit(0);
}

[miguel@vbcentos65 test]$ gcc test.c -o test  `mysql_config --cflags --libs`
[miguel@vbcentos65 test]$ ./test
MySQL client version: 5.7.5-m15
[8 Oct 2015 18:21] Jason Mallory
This library is missing. It is a bug not a discussion that doesn't get answers from the forum:

In file included from database.cpp:16:0:
mysql_incl.hpp:24:24: fatal error: my_pthread.h: No such file or directory
 #include <my_pthread.h>