Skip to content

Does not compile with MariaDB client libraries #5

Description

@smokey42

The latest release fixes compatibility with MySQL 5.6/5.7 but breaks compatibility with MariaDB >= 10.0.0.

IMHO the line in question is

#if MYSQL_VERSION_ID >= 50700

Compiling on Alpine Linux (which does only have MariaDB):

Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-dtAfWe/oursql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-J7SlRh-record/install-record.txt --single-version-externally-managed --compile:
cython not found, using previously-cython'd .c file.
running install
running build
running build_ext
building 'oursql' extension
mysql_config --cflags
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/oursqlx
gcc -DNDEBUG -Os -fomit-frame-pointer -std=c99 -fPIC -I/usr/include/python2.7 -c oursqlx/oursql.c -o build/temp.linux-x86_64-2.7/oursqlx/oursql.o -I/usr/include/mysql
gcc -DNDEBUG -Os -fomit-frame-pointer -std=c99 -fPIC -I/usr/include/python2.7 -c oursqlx/compat.c -o build/temp.linux-x86_64-2.7/oursqlx/compat.o -I/usr/include/mysql
In file included from oursqlx/compat.c:55:0:
oursqlx/_exceptions.c: In function '_oursqlx_exc_from_errno':
oursqlx/_exceptions.c:621:50: error: 'errmsg_section_start' undeclared (first use in this function)
               for(unsigned int i = 0; i < sizeof(errmsg_section_start)/sizeof(int); ++i) {
                                                  ^
oursqlx/_exceptions.c:621:50: note: each undeclared identifier is reported only once for each function it appears in
oursqlx/_exceptions.c:623:53: error: 'errmsg_section_size' undeclared (first use in this function)
                 int max = errmsg_section_start[i] + errmsg_section_size[i] - 1;
                                                     ^
error: command 'gcc' failed with exit status 1

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