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

need an update for MariaDB 10 #20

Open
eugeneYWang opened this issue Feb 5, 2018 · 5 comments
Open

need an update for MariaDB 10 #20

eugeneYWang opened this issue Feb 5, 2018 · 5 comments

Comments

@eugeneYWang
Copy link

eugeneYWang commented Feb 5, 2018

Hi guys.

Appreciate a ton of awesome works done. This is an awesome tool.

When I tried to install this on a CentOS server that have installed MariaDB 10.2+, it failed and I have figured out the reasons.

Finally this is fixed in the devel branch of mysqlclient but not yet released, it was due to a recent change in MariaDB 10.2.8 that does change the location of the server headers to a /server folder to avoid colliding headers from server and client.

from https://stackoverflow.com/questions/45905026/error-installing-mysqlclient-with-mariadb-10-2

This needs to be fixed on the side of codes. Hope my founding is helpful for any contributor.

Will we have an update for this change?

@bmalynovytch
Copy link

@eugeneYWang You might need to edit Makefile and replace:

gcc -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o $(LIBDIR)/lib_mysqludf_sys.so

by

gcc -Wall -I/usr/include/mysql/server -I. -shared lib_mysqludf_sys.c -o $(LIBDIR)/lib_mysqludf_sys.so

@mrwiora
Copy link

mrwiora commented Feb 4, 2019

trying to compile lib_mysqludf_sys.c with mariadb-server 10.3 you need
gcc -Wall -I/usr/include/mariadb/server/ -I. -shared lib_mysqludf_sys.c -o /usr/lib/x86_64-linux-gnu/mariadb19/plugin/lib_mysqludf_sys.so

otherwise you get
root@debian:~/lib_mysqludf_sys# gcc -Wall -I/usr/include/mysql/server -I. -shared lib_mysqludf_sys.c -o $(LIBDIR)/lib_mysqludf_sys.so bash: LIBDIR: command not found lib_mysqludf_sys.c:40:10: fatal error: my_global.h: No such file or directory #include ^~~~~~~~~~~~~ compilation terminated.

@7homasSutter
Copy link

Does anyone has a working Makefile example for MariaDB 10.6.7?

On Kali MariaDb does not have the folder (/usr/include/mariadb/server/) and the build fails with the following error:

gcc -fPIC -m64 -Wall -I/usr/include/mariadb/server/ -I/usr/include/mariadb/ -I/usr/include/mariadb/mysql/ -I. -shared ./lib_mysqludf_sys.c -o ./lib_mysqludf_sys.so
In file included from ./lib_mysqludf_sys.c:40:
/usr/include/mariadb/my_global.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
    3 | #warning This file should not be included by clients, include only <mysql.h>
      |  ^~~~~~~
In file included from ./lib_mysqludf_sys.c:41:
/usr/include/mariadb/my_sys.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
    3 | #warning This file should not be included by clients, include only <mysql.h>
      |  ^~~~~~~
./lib_mysqludf_sys.c:44:10: fatal error: m_ctype.h: No such file or directory
   44 | #include <m_ctype.h>
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:4: install] Error 1

Does anyone know what my installation is missing or how to reference the missing m_ctype.h file?

@platinumvoid
Copy link

platinumvoid commented Jun 3, 2022

@7homasSutter Found a solution: sudo apt install libmariadbd-dev (embedded DB libraries)
But got another error, now I am assuming because the /usr/include/mariadb/server/private is still missing

I will update on solution!!!

@Xitro01
Copy link

Xitro01 commented Nov 24, 2022

Any updates on this? Still not working for me.

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

6 participants