Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

I can't build: error: unknown type name ‘my_bool’; did you mean ‘_Bool’? #218

Copy link
Copy link
Closed
@ignacionf

Description

@ignacionf
Issue body actions

Hello, when i run pip install mysqlclient i get:

building '_mysql' extension
creating build/temp.linux-x86_64-3.6
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-z9grDo/python3.6-3.6.4=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,3,12,'final',0) -D__version__=1.3.12 -I/usr/include/mysql -I/home/ignacio/envs/leb/include -I/usr/include/python3.6m -c _mysql.c -o build/temp.linux-x86_64-3.6/_mysql.o
In file included from /usr/include/mysql/mysql_com.h:995:0,
                 from /usr/include/mysql/mysql.h:71,
                 from _mysql.c:29:
/usr/include/mysql/mysql/udf_registration_types.h:79:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 typedef void(*Udf_func_any)();
 ^~~~~~~
_mysql.c: In function ‘_mysql_ConnectionObject_ping’:
_mysql.c:1894:3: error: unknown type name ‘my_bool’; did you mean ‘_Bool’?
   my_bool recon = reconnect;
   ^~~~~~~
   _Bool
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

I try to build by source and the same. I have debian, python3.6 and mysql-server 8.0.3-rc-1debian9. But, if i change this line by compiler recomendation, the compiler ends ok:

diff --git a/_mysql.c b/_mysql.c
index 49c8d9b..c6d2d5d 100644
--- a/_mysql.c
+++ b/_mysql.c
@@ -1891,7 +1891,8 @@ _mysql_ConnectionObject_ping(
        if (!PyArg_ParseTuple(args, "|I", &reconnect)) return NULL;
        check_connection(self);
        if (reconnect != -1) {
-               my_bool recon = reconnect;
+               //my_bool recon = reconnect;
+               _Bool recon = reconnect;
                mysql_options(&self->connection, MYSQL_OPT_RECONNECT, &recon);
        }
        Py_BEGIN_ALLOW_THREADS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.