← Back to team overview

maria-discuss team mailing list archive

Re: MariaDB new installation on Centos 6

 

Hi,

The MariaDB-devel RPM (for 10.2) seems to contain the following libraries on Fedora 25:

$ dnf repoquery -l MariaDB-devel|grep /usr/lib64
/usr/lib64/libmariadbclient.a
/usr/lib64/libmysqld.a
/usr/lib64/libmysqlservices.a
/usr/lib64/mysql/libmysqlclient.so
/usr/lib64/mysql/libmysqlclient_r.so
/usr/lib64/pkgconfig/mariadb.pc
/usr/lib64/mysql/libmysqlclient.so
/usr/lib64/mysql/libmysqlclient_r.so
/usr/lib64/pkgconfig/mariadb.pc
/usr/lib64/libmysqlclient.a
/usr/lib64/libmysqlclient_r.a
/usr/lib64/libmysqld.a
/usr/lib64/libmysqlservices.a

I think it'll work if you use -lmariadbclient instead of -lmariadb.

As the mariadb_config gives the wrong paths, I recommend opening a bug report on jira.mariadb.org <https://jira.mariadb.org/projects/MDEV/>.

Markus


On 17/06/17 17:56, romeo kalebic wrote:
Hi everyone,

I'm new user of MariaDB, and I install it on Centos 6.8 64bit.
I install it using yum utility , according instruction on MariaDB site: https://mariadb.com/kb/en/mariadb/yum/.

yum install MariaDB-server MariaDB-client finished without any problem.

I can use mysql client to connect to databases without any problems.

Then I try to compile some of my applications.
To find out what library to use and where include files are I use mysql_config and mariadb_config.

mysql_config output:
[root@xms tests]# mysql_config
Usage: /usr/bin/mysql_config [OPTIONS]
Options:
        --cflags       [-I/usr/include/mysql ]
        --include      [-I/usr/include/mysql]
        --libs       [-L/usr/lib64  -lmariadb]
        --libs_r       [-L/usr/lib64  -lmariadb]
        --plugindir      [/usr/lib64/mysql/plugin]
        --socket       [/var/lib/mysql/mysql.sock]
        --port       [0]
        --version      [10.2.6]
--libmysqld-libs [-L/usr/lib64 -lmysqld -lpthread -lz -lm -lrt -ldl -lssl -lcrypto -lcrypt -laio]
--variable=VAR   VAR is one of:
pkgincludedir [/usr/include/mysql]
pkglibdir     [/usr/lib64]
plugindir     [/usr/lib64/mysql/plugin]
[root@xms tests]#

And mariadb_config returns:

[root@xms tests]# mariadb_config
Copyright 2011-2015 MariaDB Corporation AB
Get compiler flags for using the MariaDB Connector/C.
Usage: mariadb_config [OPTIONS]
  --cflags  [-I/usr/include/mysql -I/usr/include/mysql/mysql]
  --include [-I/usr/include/mysql -I/usr/include/mysql/mysql]
  --libs  [-L/usr/lib64/ -lmariadb -lpthread -ldl -lm -lssl -lcrypto]
  --libs_r  [-L/usr/lib64/ -lmariadb -lpthread -ldl -lm -lssl -lcrypto]
  --libs_sys  [-lpthread -ldl -lm -lssl -lcrypto]
  --version [10.2.5]
  --socket  [/var/lib/mysql/mysql.sock]
  --port  [3306]
  --plugindir [/usr/lib64/mysql/plugin]
  --tlsinfo [OpenSSL 1.0.1e]
[root@xms tests]#

First question is why these two outputs are different?

I wrote Makefile and use -I and -L like this in mysql_config.

gcc compiler finish with error that there is no mariadb library.

What I have missed?
Where is libmariadb located?

Best Regards, Romeo

<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free. www.avg.com <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>



_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp

--
Markus Mäkelä, Software Engineer
MariaDB Corporation
t: +358 40 7740484 | Skype: markus.j.makela


References