looking at wrong location for libmysqlclient.so #458

Closed
Habbie opened this Issue Apr 26, 2013 · 5 comments

Projects

None yet

1 participant

@Habbie
Member
Habbie commented Apr 26, 2013

During the installation on Ubuntu 12.04 I get an error when it looks for libmysqlclient.so.

I did use the command below:

./configure --prefix=/usr --libexecdir='$${prefix}/lib' --libdir='$${prefix}/lib/powerdns' --sysconfdir=/etc/powerdns --infodir='$${datadir}/info' --mandir='$${datadir}/man' --with-dynmodules="" --with-modules="gmysql"

Information about it on IRC.

20:21 < MarkS> checking for MySQL library directory... configure: error: Didn't find the mysql library dir in '/usr/local/mysql/lib/mysql
               /usr/local/lib/mysql /opt/mysql/lib/mysql            /usr/lib/mysql /usr/lib64/mysql /usr/local/mysql/lib /usr/local/lib /opt/mysql/lib
               /usr/lib          /usr/sfw/lib/' << for what is it exactly looking? this is on ubuntu 12.04, trying to build 3.1 from source and most mysql
               related options are installed using apt-get
20:22 <@Habbie> it literally looks for libmysqlclient.so in any of those dirs
20:22 <@Habbie> which is not very clean
20:23 < ch> ... and doesn't work on multiarch ;-)
20:23 <@Habbie> probably not
20:23 <@Habbie> not sure what would be better, though, mysql doesn't do pkg-config
20:23 < MarkS> that file is located at another location /usr/lib/x86_64-linux-gnu/libmysqlclient.so
20:23 < ch> the ubuntu packages ship a mysql_config program
20:24 <@Habbie> ch, ohh, interesting, any idea whether that's ubuntu-specific?
20:24 < ch> maybe you can use that to determine the location of the system-supplied libs?
20:24 < ch> Habbie: I have no idea, just saw it in the list
20:24 <@Habbie> thanks for the pointer
20:24 <@Habbie> can certainly add it without harm
20:24 < ch> it's there on squeeze as well
20:25 <@Habbie> even has --libs_r
20:25 < ch> http://is.gd/TEPkcz
20:25 < ch> seems to be official
20:25 <@Habbie> this is awesome, thanks ch
20:26 < MarkS> Habbie: thanks for the pointer, I'm looking in the configure file to change it and check the extra location
20:26 < MarkS> that solved my problem (just adding the extra location to check)
20:27 <@Habbie> good, for now :)
20:28 < MarkS> yes, do you want me to create a bug report for it or isn't that needed to change it in a future version?
20:28 <@Habbie> a bug report is the only sure way to make sure we won't forget it
20:28 <@Habbie> ch's tip about mysql_config would be good to note in it
@Habbie Habbie was assigned Apr 26, 2013
@Habbie Habbie closed this Apr 26, 2013
@Habbie Habbie added a commit that referenced this issue Apr 26, 2013
@Habbie Habbie try to use mysql_config if it is avaiable, thanks Aki Tuomi. Closes #458


git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3015 d19b8d6e-7fed-0310-83ef-9ca221ded41b
6ef6177
@Habbie Habbie added a commit that referenced this issue Apr 26, 2013
@Habbie Habbie improve mysql lib detection, thanks Aki Tuomi and Kees Monshouwer, ag…
…ain closes #458

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3019 d19b8d6e-7fed-0310-83ef-9ca221ded41b
258d3f8
@Habbie
Member
Habbie commented Apr 26, 2013

Attachment 'Candidate for locating mysql_config and using it instead' (20130102_mysql_config.patch) https://gist.github.com/5466741

@Habbie
Member
Habbie commented Apr 26, 2013

Author: anon
This also happens in Debian unstable, which is a show stopper for an upload to Debian, since there is no way to manually point the build daemons to the locally correct library file during build: All architectures need to build from exactly the same source.

In Debian, the package autoconf-archive contains a file called /usr/share/aclocal/ax_check_mysqlr.m4 which is supposed to correctly handle mysql via a macro called AC_CHECK_MYSQLR.

I feel this is the way to go.

@Habbie
Member
Habbie commented Apr 26, 2013

Author: peter
applied in r3015, thanks!

@Habbie
Member
Habbie commented Apr 26, 2013

Author: anon
patch upgrade

@Habbie
Member
Habbie commented Apr 26, 2013

Author: peter
r3019, thanks!

@mind04 mind04 pushed a commit to mind04/pdns that referenced this issue Apr 26, 2013
peter try to use mysql_config if it is avaiable, thanks Aki Tuomi. Closes #458


git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3015 d19b8d6e-7fed-0310-83ef-9ca221ded41b
2391066
@mind04 mind04 pushed a commit to mind04/pdns that referenced this issue Apr 26, 2013
peter improve mysql lib detection, thanks Aki Tuomi and Kees Monshouwer, ag…
…ain closes #458

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3019 d19b8d6e-7fed-0310-83ef-9ca221ded41b
a6f233b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment