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

64bits recompilation fails. Error with header files #18

Open
kheush opened this issue Nov 4, 2017 · 5 comments
Open

64bits recompilation fails. Error with header files #18

kheush opened this issue Nov 4, 2017 · 5 comments

Comments

@kheush
Copy link

kheush commented Nov 4, 2017

Hi,

Experiencing issue with 64bits recompilation (Red Hat Enterprise Linux Server release 6.8).

Command attempted (edited from Makefile):
gcc -m64 -fPIC -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o /usr/lib/mysql/plugin/lib_mysqludf_sys.so -L/usr/lib64/libstdc++.so.6.0.13

Error received:
lib_mysqludf_sys.c:40:23: error: my_global.h: No such file or directory
lib_mysqludf_sys.c:41:20: error: my_sys.h: No such file or directory
lib_mysqludf_sys.c:43:19: error: mysql.h: No such file or directory
lib_mysqludf_sys.c:44:21: error: m_ctype.h: No such file or directory
lib_mysqludf_sys.c:45:22: error: m_string.h: No such file or directory
make: *** [install] Error 1

Any idea where issue could be coming from?

One feedback from different forum suggested change of libraries at mysql end? Looking into by trying to install/use udf shipped with mysql?
Looking into it.

Any other suggestion if you have experienced the same will be of help.

Thanks

@pcoltau
Copy link

pcoltau commented Nov 20, 2017

I've compiled the library on a VirtualBox with a Ubuntu 16.04.1 image. Here I had to install the headers "manually":

sudo apt-get install libmysqlclient-dev

@bmalynovytch
Copy link

bmalynovytch commented Aug 30, 2018

@kheush 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

@aGiant
Copy link

aGiant commented Mar 14, 2020

Keep telling

to be able to compile this UDF, on Debian/Ubuntu just run:
apt-get install libmysqlclient15-dev

but there is no libmysqlclient15-dev for raspberry. After install
sudo apt install libmariadbclient-dev libmariadb-dev and default-libmysqlclient-dev, it still didnot work and raised same error about "libmysqlclient15-dev".

@kheldaroz-droid
Copy link

sudo gcc -march=armv8-a -fPIC -Wall -I/usr/include/mysql -I /usr/include/mariadb/server -I /usr/include/mariadb/server/private/ -I. -shared lib_mysqludf_sys.c -o /usr/lib/mysql/plugin/lib_mysqludf_sys.so -L/usr/lib/x86_64-linux-gnu/libstdc++.so.6

is what I used to get the install to work -
apt-file /my_global.h helped me to work out file locations

@foxerz098

This comment was marked as resolved.

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