Percona Server 56, checking for mysql_init in -lmysqlclient... no

Bug #1249854 reported by poiuty
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Won't Fix
Medium
Unassigned
5.5
Triaged
Medium
Unassigned
5.6
Triaged
Medium
Unassigned
5.7
Triaged
Medium
Unassigned

Bug Description

debian 7, percona server install from apt-get pero
some problems with compilation gcc
./configure --enable-64bit

checking for mysql_config... /usr/bin/mysql_config
checking for mysql_init in -lmysqlclient... no
checking mysql.h usability... yes
checking mysql.h presence... yes
checking for mysql.h... yes
checking MySQL library (optional)... no
configure: disabling MySQL (optional)
checking for pcre_study in -lpcre... yes
checking PCRE library (optional)... yes
checking host OS... Linux

Tried to install all of those packages. It did not help.
apt-cache search mysqlclient
libmysqlclient-dev - Percona Server database development files
libmysqlclient16 - Percona Server database client library
libmysqlclient16-dev - Percona Server database development files
libmysqlclient18 - Percona Server database client library
libmysqlclient18-dev - Percona Server database development files
libmysqlclient18.1 - Percona Server database client library
libmysqlclient18.1-dev - Percona Server database development files - empty transitional

on a regular mysql server - no problem, normally compiles.
I just checked on mariadb - no problem

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

Please, specify the exact steps to reproduce the problem on fresh Debian 7 installation. We need to know what exact packages you've installed and why do you try to build from source this way (cmake is usually used with 5.5+, no configure).

Changed in percona-server:
status: New → Incomplete
Revision history for this message
poiuty (poiuty) wrote :

On clean debian 7

cd /home/
apt-get install subversion gcc zlib1g-dev libmysql++-dev make libpcre3 libpcre3-dev
svn co http://eathena-project.googlecode.com/svn/trunk/
cd /home/trunk/
chmod -R 755 ./
./configure or ./configure --enable-64bit
make sql

And it`s work. But when I use percona server 5.6 -> checking MySQL library (optional)... no

Something similar happened with java applications.
For example with minecraft (bukkit), and some plug-ins that use mysql.
After the regular set mysql -> problem was gone

http://rathena.org/board/tracker/issue-8186-compilation-and-percona-server-56/

Revision history for this message
poiuty (poiuty) wrote :

The same problem when building XBT Tracker
http://xbtt.sourceforge.net/tracker/

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

OK, now I got it. You build some tools that use libmysqlclient with Percona versions of the library installed and it does not work as expected. Thank you for clarifications.

Changed in percona-server:
status: Incomplete → New
Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :
Download full text (6.3 KiB)

Just works for me on Ubuntu 13.04 with recent Percona Server 5.6.14:

Checked out revision 15263.
openxs@ao756:~$ cd trunk/
openxs@ao756:~/trunk$ ./configure --enable-64bit
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking whether byte ordering is bigendian... no
checking whether gcc supports -Wno-unused-parameter... yes
checking whether gcc supports -Wno-pointer-sign... yes
checking whether gcc can actually use -Wno-pointer-sign... yes
checking whether gcc supports -Wno-switch... yes
checking whether gcc supports -fPIC... yes
checking how to make shared objects... -shared
checking whether gcc needs -fPIC for shared objects... yes
checking whether gcc supports -fno-strict-aliasing... yes
checking for inline... inline
checking for all available inline directives... done
checking for ar... ar
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking net/socket.h usability... no
checking net/socket.h presence... no
checking for net/socket.h... no
checking for setrlimit... yes
checking for strnlen... yes
checking for getpid... yes
checking for gettid... no
checking for inflateEnd in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for library containing sqrt... -lm
checking for library containing clock_gettime... none required
checking whether CLOCK_MONOTONIC is supported and works... yes
checking for mysql_config... /usr/bin/mysql_config
checking for mysql_init in -lmysqlclient... yes
checking mysql.h usability... yes
checking mysql.h presence... yes
checking for mysql.h... yes
checking MySQL library (optional)... yes (5.5.34)
checking for pcre_study in -lpcre... yes
checking PCRE library (optional)... yes
checking host OS... Linux
checking for MinGW... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/common/Makefile
config.status: creating 3rdparty/mt19937ar/Makefile
config.status: creating src/char/Makefile
config.status: creating src/login/Makefile
config.status: creating src/char_sql/Makefile
config.status: creating src/txt-converter/Makefile
config.status: creating src/map/Makefile
config.status: creating src/plugins/Makefile
config.status: creating src/tool/Makefile
config.status: creating...

Read more...

Revision history for this message
Muhammad Irfan (muhammad-irfan) wrote :

I tried to replicate this on debian 7 box with percona mysql libs and didn't faced any issues though.

# dpkg -l | grep libmysqlclient
ii libmysqlclient18 5.5.32-rel31.0-549.wheezy amd64 Percona Server database client library
ii libmysqlclient18.1 5.6.14-25.1-571.wheezy amd64 Percona XtraDB Cluster database client library

# apt-get install subversion make gcc libmysqlclient-dev zlib1g-dev libpcre3-dev

# svn co http://eathena-project.googlecode.com/svn/trunk/

# ./configure --enable-64bit
config.status: creating Makefile
config.status: creating src/common/Makefile
config.status: creating 3rdparty/mt19937ar/Makefile
config.status: creating src/char/Makefile
config.status: creating src/login/Makefile
config.status: creating src/char_sql/Makefile
config.status: creating src/txt-converter/Makefile
config.status: creating src/map/Makefile
config.status: creating src/plugins/Makefile
config.status: creating src/tool/Makefile
config.status: creating src/common/config.h

Revision history for this message
poiuty (poiuty) wrote :
Download full text (3.3 KiB)

Again the problem. On new versions percona server. From 13-14
checking for mysql_init in -lmysqlclient... no

./configure --enable-64bit
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking whether byte ordering is bigendian... no
checking whether gcc supports -Wno-unused-parameter... yes
checking whether gcc supports -Wno-pointer-sign... yes
checking whether gcc can actually use -Wno-pointer-sign... yes
checking whether gcc supports -Wno-switch... yes
checking whether gcc supports -fPIC... yes
checking how to make shared objects... -shared
checking whether gcc needs -fPIC for shared objects... yes
checking whether gcc supports -fno-strict-aliasing... yes
checking for inline... inline
checking for all available inline directives... done
checking for ar... ar
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking net/socket.h usability... no
checking net/socket.h presence... no
checking for net/socket.h... no
checking for setrlimit... yes
checking for strnlen... yes
checking for getpid... yes
checking for gettid... no
checking for inflateEnd in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for library containing sqrt... -lm
checking for library containing clock_gettime... -lrt
checking whether CLOCK_MONOTONIC is supported and works... yes
checking for mysql_config... /usr/bin/mysql_config
checking for mysql_init in -lmysqlclient... no
checking mysql.h usability... yes
checking mysql.h presence... yes
checking for mysql.h... yes
checking MySQL library (optional)... no
configure: disabling MySQL (optional)
checking for pcre_study in -lpcre... yes
checking PCRE library (optional)... yes
checking host OS... Linux
checking for MinGW... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/common/Makefile
config.status: creating 3rdparty/mt19937ar/Makefile
config.status: creating src/char/Makefile
config.status: creating src/login/Makefile
config.status: creating src/char_sql/Makefile
config.status: creating src/txt-converter/Makefile
config.status: creating src/map/Makefile
config.status: creating src/plugins/Makefile
config.status: creating src/tool/Makefile
config.status: creating src/common/config...

Read more...

Revision history for this message
Muhammad Irfan (muhammad-irfan) wrote :
Download full text (3.7 KiB)

Again as you can see below, i am unable to reproduce this problem.

# cat /etc/debian_version
7.1

# dpkg -l | grep -i "percona"
ii libmysqlclient16 5.1.73-rel14.11-603.wheezy amd64 Percona Server database client library
ii libmysqlclient18 5.5.35-rel33.0-611.wheezy amd64 Percona Server database client library
ii libmysqlclient18.1 5.6.14-25.1-571.wheezy amd64 Percona XtraDB Cluster database client library
ii percona-server-client-5.5 5.5.35-rel33.0-611.wheezy amd64 Percona Server database client binaries
ii percona-server-common-5.5 5.5.35-rel33.0-611.wheezy amd64 Percona Server database common files (e.g. /etc/mysql/my.cnf)
ii percona-server-server-5.5 5.5.35-rel33.0-611.wheezy amd64 Percona Server database server binaries
ii percona-xtrabackup 2.1.4-657-1.wheezy amd64 Open source backup tool for InnoDB and XtraDB

# apt-get install subversion gcc zlib1g-dev libmysql++-dev make libpcre3 libpcre3-dev

# svn co http://eathena-project.googlecode.com/svn/trunk/

# cd /home/trunk/

# chmod -R 755 ./

# ./configure --enable-64bit
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
.
.
.
checking PCRE library (optional)... yes
checking host OS... Linux
checking for MinGW... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/common/Makefile
config.status: creating 3rdparty/mt19937ar/Makefile
config.status: creating src/char/Makefile
config.status: creating src/login/Makefile
config.status: creating src/char_sql/Makefile
config.status: creating src/txt-converter/Makefile
config.status: creating src/map/Makefile
config.status: creating src/plugins/Makefile
config.status: creating src/tool/Makefile
config.status: creating src/common/config.h

# make sql
make[1]: Entering directory `/home/trunk/3rdparty/mt19937ar'
gcc -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -fPIC -fno-strict-aliasing -Wno-unused -Wno-parentheses -DHAVE_MONOTONIC_CLOCK -L/usr/lib -I../common -I/usr/include -c -o mt19937ar.o mt19937ar.c
make[1]: Leaving directory `/home/trunk/3rdparty/mt19937ar'
make[1]: Entering directory `/home/trunk/src/common'
mkdir obj_all
.
.
.
j_sql/mob.o obj_sql/script.o obj_sql/storage.o obj_sql/skill.o obj_sql/atcommand.o obj_sql/battle.o obj_sql/battleground.o obj_sql/intif.o obj_sql/trade.o obj_sql/party.o obj_sql/vending.o obj_sql/guild.o obj_sql/guild_castle.o obj_sql/guild_expcache.o obj_sql/pet.o obj_sql/log.o obj_sql/mail.o obj_sql/date.o obj_sql/unit.o obj_sql/homunculus.o obj_sql/mercenary.o obj_sql/quest.o obj_sql/instance.o obj_sql/buyingstore.o obj_sql/searchstore.o obj_sql/duel.o obj_sql/mapreg_sql.o ../common/obj_all/core.o ../common/obj_all/socket.o ../common/obj_all/timer.o ../common/obj_all/db.o ../common/obj_all/plugins.o ../common/ob...

Read more...

Revision history for this message
poiuty (poiuty) wrote :

All right. I'll do a test VPS with this bug and send the mail root access.

Revision history for this message
poiuty (poiuty) wrote :

Muhammad Irfan, check u mail.

Revision history for this message
Muhammad Irfan (muhammad-irfan) wrote :

Finally, i am able to reproduce this problem on PS 5.5 & PS 5.6

Revision history for this message
Muhammad Irfan (muhammad-irfan) wrote :

This problem also occurred on PS 5.1

ii libmysqlclient-dev 5.6.15-rel63.0-519.wheezy amd64 Percona Server database development files
ii libmysqlclient16 5.1.73-rel14.11-603.wheezy amd64 Percona Server database client library
ii libmysqlclient18 5.5.35-rel33.0-611.wheezy amd64 Percona Server database client library
ii libmysqlclient18.1 5.6.15-rel63.0-519.wheezy amd64 Percona Server database client library
ii percona-server-client-5.1 5.1.73-rel14.11-603.wheezy amd64 Percona Server database client binaries
ii percona-server-common 5.1.73-rel14.11-603.wheezy amd64 Percona Server database common files (e.g. /etc/mysql/my.cnf)
ii percona-server-server-5.1 5.1.73-rel14.11-603.wheezy amd64 Percona Server database server binaries

# ./configure --enable-64bit
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
.
.
checking for mysql.h... yes
checking MySQL library (optional)... no
configure: disabling MySQL (optional)
checking for pcre_study in -lpcre... yes
checking PCRE library (optional)... yes
checking host OS... Linux
checking for MinGW... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/common/Makefile
config.status: creating 3rdparty/mt19937ar/Makefile
config.status: creating src/char/Makefile
config.status: creating src/login/Makefile
config.status: creating src/char_sql/Makefile
config.status: creating src/txt-converter/Makefile
config.status: creating src/map/Makefile
config.status: creating src/plugins/Makefile
config.status: creating src/tool/Makefile
config.status: creating src/common/config.h

# make sql
MySQL not found or disabled by the configure script
make: *** [needs_mysql] Error 1

Revision history for this message
Cheatah (edwin-cheatah) wrote :

The libmysqlclient18.1 packages on wheezy and squeeze are broken. These packages don't install /usr/lib/libmysqlclient_r.so.18 but the libmysqlclient-dev package has a symbolic link from /usr/lib/libmysqlclient_r.so to libmysqlclient_r.so.18 which does not exist. This file should exist in the libmysqlclient18.1 package.

Quick fix:

ln -sv libmysqlclient_r.so.18.1.0 /usr/lib/libmysqlclient_r.so.18

See also:
$ dpkg-query -L libmysqlclient18.1 | fgrep /usr/lib/
/usr/lib/libmysqlclient.so.18.1.0
/usr/lib/libmysqlclient_r.so.18.1.0

Compare with Debian's native libmysqlclient16:
$ dpkg-query -L libmysqlclient16 | fgrep /usr/lib/
/usr/lib/libmysqlclient_r.so.16.0.0
/usr/lib/libmysqlclient.so.16.0.0
/usr/lib/libmysqlclient_r.so.16
/usr/lib/libmysqlclient.so.16

Do NOT package the file with libmysqlclient-dev, package it with libmysqlclient18.1.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1446

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.