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

Does not compile with MariaDB client libraries #5

Open
smokey42 opened this issue Jul 18, 2016 · 1 comment · May be fixed by #11
Open

Does not compile with MariaDB client libraries #5

smokey42 opened this issue Jul 18, 2016 · 1 comment · May be fixed by #11

Comments

@smokey42
Copy link

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
@pepasflo
Copy link

This problem also appears to happen when you pip install oursql on debian stretch (which uses libmariadbclient-dev for mysql.h).

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

Successfully merging a pull request may close this issue.

2 participants