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

compile on debian 7? #6

Open
federico-razzoli opened this issue Jun 11, 2014 · 6 comments
Open

compile on debian 7? #6

federico-razzoli opened this issue Jun 11, 2014 · 6 comments

Comments

@federico-razzoli
Copy link

I tried to adapt your command to my system (debian 7 with MariaDB 10 generic binaries):

g++ -Wall -I include -I /usr/local/mysql/include -shared -fPIC -DMYSQL_DYNAMIC_PLUGIN -o mysqlv8udfs.so mysqlv8udfs.cpp /usr/lib/libv8.so /usr/local/mysql/lib/libmysqlclient.so

But it can't find mysql.h, because it's in the include/mysql subdir. So I adjusted the include path, but now it says:

mysqlv8udfs.cpp:7:19: fatal error: mysql.h: File o directory non esistente
compilation terminated.

I can't find a working command for compiling, don't know if it's a bug or just my stupidity.

@rpbouman
Copy link
Owner

Hi! Thanks for your interest. I don't have a debian nearby so I can't test it. But are you sure your compile line is ok? you wrote /usr/local/mysql/include but you said it's in the include/mysql dir. So I guess it should be g++ -Wall -I include -I /usr/local/include/mysql -shared -fPIC -DMYSQL_DYNAMIC_PLUGIN -o mysqlv8udfs.so mysqlv8udfs.cpp /usr/lib/libv8.so /usr/local/mysql/lib/libmysqlclient.so ?

@federico-razzoli
Copy link
Author

Thanks for replying. No I'm not sure - but sorry, I wan't clear. I'll just paste the lines I tried:

federico@this:/mysqlv8udfs-master/src$ g++ -Wall -I include -I /usr/local/mysql/include -shared -fPIC -DMYSQL_DYNAMIC_PLUGIN -o mysqlv8udfs.so mysqlv8udfs.cpp /usr/lib/libv8.so /usr/local/mysql/lib/libmysqlclient.so
mysqlv8udfs.cpp:7:19: fatal error: mysql.h: File o directory non esistente
compilation terminated.
federico@this:
/mysqlv8udfs-master/src$ g++ -Wall -I include -I /usr/local/mysql/include/mysql -shared -fPIC -DMYSQL_DYNAMIC_PLUGIN -o mysqlv8udfs.so mysqlv8udfs.cpp /usr/lib/libv8.so /usr/local/mysql/lib/libmysqlclient.so
In file included from mysqlv8udfs.cpp:8:0:
/usr/local/mysql/include/mysql/plugin.h:51:28: fatal error: mysql/services.h: File o directory non esistente
compilation terminated.

In the first case it doesn't find mysql.h, in the second case it can't find services.h.

@rpbouman
Copy link
Owner

I think the first message indicates the include path is just wrong. I bet if you do ls: on that path, you'll get: "cannot access /usr/local/mysql/include: No such file or directory". The second path looks like it does contain at least plugin.h. That apparently contains an include for mysql/services.h, but that isn't there.

How did you install mariadb? Perhaps there is a -dev package you can install? If that fails, try installing the dev pacakge for mysql and see if you can compile. Please let me know what you find.

@federico-razzoli
Copy link
Author

Sorry for the delay and thanks for helping.
It's MariaDB 10 installed from generic binaries, in /usr/local/mysql.
The path exists:
root@this:~# ls /usr/local/mysql/include
mysql
services.h is in:
/usr/local/mysql/include/mysql/services.h
Let me know if you want a ls -R.

@rpbouman
Copy link
Owner

Hi Santec,

can you get a Mariadb.tar.gz, unpack that, and use the include directory from there? You don't need to actually run from there, you can still use the one installed from the package manager. I just suspect the package manager messes up the location of the include files.

@federico-razzoli
Copy link
Author

Sorry for delay, I don't use GitHub when I'm too busy.
And sorry for being unclear - MariaDB is installed from .tar.gz, not from .deb package.

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

2 participants