[CONC-259] Cannot compile Python adapters against MariaDB 10.2.6 - mysqlclient-python or MySQL-python Created: 2017-06-06  Updated: 2017-06-06

Status: Open
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Isaac Gremmer Assignee: Georg Richter
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Linux, Debian Jessie, Official Docker Image mariadb:10.2.6



 Description   

When trying to pip install the Python adapters, I am getting compile errors. The following is the error installing MySQL-python:

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/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:46:0:
    /usr/include/mysql/mysql.h:438:3: warning: function declaration isn't a prototype [-Wstrict-prototypes]
       MYSQL_CLIENT_PLUGIN_HEADER
       ^
    /usr/include/mysql/mysql.h:583:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
     my_bool STDCALL mysql_embedded();
     ^
    _mysql.c: In function '_mysql_server_init':
    _mysql.c:351:3: warning: label 'finish' defined but not used [-Wunused-label]
       finish:
       ^
    _mysql.c:268:53: warning: unused variable 'item' [-Wunused-variable]
      PyObject *cmd_args=NULL, *groups=NULL, *ret=NULL, *item;
                                                         ^
    _mysql.c:267:21: warning: unused variable 'groupc' [-Wunused-variable]
      int cmd_argc=0, i, groupc;
                         ^
    _mysql.c:267:18: warning: unused variable 'i' [-Wunused-variable]
      int cmd_argc=0, i, groupc;
                      ^
    _mysql.c:267:6: warning: unused variable 'cmd_argc' [-Wunused-variable]
      int cmd_argc=0, i, groupc;
          ^
    _mysql.c:266:44: warning: unused variable 's' [-Wunused-variable]
      char **cmd_args_c=NULL, **groups_c=NULL, *s;
                                                ^
    _mysql.c: In function '_mysql_ConnectionObject_field_count':
    _mysql.c:1943:47: warning: passing argument 1 of 'mysql_num_fields' from incompatible pointer type
      return PyInt_FromLong((long)mysql_num_fields(&(self->connection)));
                                                   ^
    In file included from _mysql.c:46:0:
    /usr/include/mysql/mysql.h:470:22: note: expected 'struct MYSQL_RES *' but argument is of type 'struct MYSQL *'
     unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
                          ^
    _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;
                                             ^
    _mysql.c: In function '_mysql_ConnectionObject_shutdown':
    _mysql.c:2081:6: error: too few arguments to function 'mysql_shutdown'
      r = mysql_shutdown(&(self->connection)
          ^
    In file included from _mysql.c:46:0:
    /usr/include/mysql/mysql.h:518:14: note: declared here
     int  STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level);
                  ^
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

When compiling mysqlclient-python I get the following error that is pretty similar:

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,3,10,'final',0) -D__version__=1.3.10 -I/usr/include/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:30:0:
    /usr/include/mysql/mysql.h:438:3: warning: function declaration isn't a prototype [-Wstrict-prototypes]
       MYSQL_CLIENT_PLUGIN_HEADER
       ^
    /usr/include/mysql/mysql.h:583:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
     my_bool STDCALL mysql_embedded();
     ^
    _mysql.c: In function '_mysql_ConnectionObject_ping':
    _mysql.c:1911:41: error: 'MYSQL' has no member named 'reconnect'
      if ( reconnect != -1 ) self->connection.reconnect = reconnect;
                                             ^
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Generated at Thu Feb 08 03:04:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.