Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_mysql.c:1915:41: error: ‘MYSQL’ has no member named ‘reconnect’ (centos 7 python 2/3 mariadb 10.x compilation) #59

Open
kseltar opened this issue Oct 31, 2018 · 1 comment

Comments

@kseltar
Copy link

kseltar commented Oct 31, 2018

  • OS: centos 7.(5/x)
    *devenvs: MariaDB 10.x + python 2.x/3.x

  • default output:
    _mysql.c: En la función ‘_mysql_ConnectionObject_ping’:
    _mysql.c:1915:41: error: ‘MYSQL’ no tiene un miembro llamado ‘reconnect’
    if ( reconnect != -1 ) self->connection.reconnect = reconnect;
    ^
    error: command 'gcc' failed with exit status 1

  • how to fix

sed '/st_mysql_options options;/a unsigned int reconnect;' /usr/include/mysql/mysql.h -i.bkp

source: DefectDojo/django-DefectDojo#407

@Arti3DPlayer
Copy link

Arti3DPlayer commented Jan 4, 2019

the same

did:
yum install mariadb-devel python-devel
yum install MariaDB-devel MariaDB-shared

then:

pip install MySQL-python

    building '_mysql' extension
    creating build/temp.linux-x86_64-2.7
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/mysql/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
    In file included from _mysql.c:44:0:
    /usr/include/mysql/my_config.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
     #warning This file should not be included by clients, include only <mysql.h>
      ^
    _mysql.c: In function '_mysql_ConnectionObject_ping':
    _mysql.c:2005:41: error: 'MYSQL' has no member named 'reconnect'
      if ( reconnect != -1 ) self->connection.reconnect = reconnect;
                                             ^
    error: command 'gcc' failed with exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants