# [libmysqlclient] problem with sasl2 emerging? [SOLVED]

## meshit

Hi,

I currently have a problem with sasl compilation with mysql.

I had a perfectly running mail system installed more than one year ago with the gentoo virtual mailhosting howto.

So I've the mysql + sasl2 + pam + postfix running suite.

So I use smtpd auth and imap/pop auth plugged in a mysql db.

Since the system upgrade (emerge -uDv world)

last week, I cant get sasl working with mysql.

I had the revdep-rebuild problem but revdep was dying as soon as it had to compile with libmysqlclient.

I reinstall all thing:

emerge -C all_concerned_packages:

mysql

cyrus-sasl

courier-imap

postfix

pam

pam_mysql

...

but I noticed a problem with the sasl2 compilation (from cyrus-sasl):

```

checking for mysql_select_db in -lmysqlclient... no

configure: WARNING: MySQL library mysqlclient does not work

```

here are my global flags:

```

dji cyrus-sasl-2.1.20 # emerge info

Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.4.26-gentoo-r9 i686)

=================================================================

System uname: 2.4.26-gentoo-r9 i686 AMD Athlon(tm) XP 2400+

Gentoo Base System version 1.4.16

Autoconf: sys-devel/autoconf-2.59-r5

Automake: sys-devel/automake-1.8.5-r1

Binutils: sys-devel/binutils-2.15.90.0.1.1-r3

Headers:  sys-kernel/linux-headers-2.4.19-r1,sys-kernel/linux-headers-2.4.21-r1

Libtools: sys-devel/libtool-1.5.2-r7

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CFLAGS="-march=athlon-xp -O3 -pipe"

CHOST="i686-pc-linux-gnu"

COMPILER=""

CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-march=athlon-xp -O3 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoaddcvs autoconfig buildpkg ccache distcc distlocks fixpackages sandbox sfperms usersandbox"

GENTOO_MIRRORS="ftp://mir.zyrianes.net/gentoo/ http://mir.zyrianes.net/gentoo/ http://www.gigaload.org/gentoo.org/"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="x86 3dnow X aalib acl alsa apache2 apm arts avi berkdb bitmap-fonts bonobo cdr crypt cscope cups directfb doc encode esd fam flac foomaticdb fortran gd-external gdbm ggi gif gnome gpm gstreamer gtk gtk2 gtkhtml guile imagemagick imap imlib ipv6 java jpeg kde libwww mad maildir mikmod motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pam-mysql pda pdflib perl png python qt quicktime readline samba sasl scanner sdl slang snmp speex spell sse ssl svga tcltk tcpd tiff truetype xml xml2 xmms xv zlib"

```

here are the specific USE flag compilation for cyrus-sasl:

```

dji cyrus-sasl-2.1.20 # equery uses cyrus-sasl

[ Searching for packages matching cyrus-sasl... ]

[ Colour Code : set unset ]

[ Legend    : Left column  (U) - USE flags from make.conf              ]

[           : Right column (I) - USE flags packages was installed with ]

[ Found these USE variables for dev-libs/cyrus-sasl-2.1.20 ]

 U I

 - - berkdb      : Adds support for sys-libs/db (Berkeley DB for MySQL)

 - - gdbm        : Adds support for sys-libs/gdbm (GNU database libraries)

 - - ldap        : Adds LDAP support (Lightweight Directory Access Protocol)

 + + mysql       : Adds mySQL support

 - - postgres    : Adds support for the postgresql database

 - - kerberos    : Adds kerberos support

 - - static      : !!do not set this during bootstrap!! Causes things to be statically linked instead of dynamically

 + + ssl         : Adds support for Secure Socket Layer connections

 + + java        : Adds support for Java

 + + pam         : <unknown>

 + + authdaemond : Enable Courier-IMAP authdaemond's unix socket support.

 - - debug       : Tells configure and the makefiles to build for debugging. Effects vary across packages, but generally it will at least add -g to CFLAGS. Remember to set FEATURES=nostrip too

```

and for mysql:

```
dji cyrus-sasl-2.1.20 # equery uses mysql

[ Searching for packages matching mysql... ]

[ Colour Code : set unset ]

[ Legend    : Left column  (U) - USE flags from make.conf              ]

[           : Right column (I) - USE flags packages was installed with ]

[ Found these USE variables for dev-db/mysql-4.0.23 ]

 U I

 - - static   : !!do not set this during bootstrap!! Causes things to be statically linked instead of dynamically

 + + readline : enables support for libreadline, a GNU line-editing library that most everyone wants.

 - - innodb   : Adds innodb support for mySQL (transaction support)

 + + berkdb   : Adds support for sys-libs/db (Berkeley DB for MySQL)

 + + tcpd     : Adds support for TCP wrappers

 + + ssl      : Adds support for Secure Socket Layer connections

 + + perl     : Adds support/bindings for the Perl language.

 - - debug    : Tells configure and the makefiles to build for debugging. Effects vary across packages, but generally it will at least add -g to CFLAGS. Remember to set FEATURES=nostrip too

 - - selinux  : !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur

dji cyrus-sasl-2.1.20 #

```

then I decided to use the sasl tarball from the offici_al site ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.1.20.tar.gz

and did a ./configure very basic:

```
 ./configure --enable-login --enable-ntlm --disable-krb4 --disable-otp --with-openssl=/usr/lib --with-pam=/lib --enable-krb4 --enable-gssapi --with-mysql=/usr/lib/mysql --enable-sql --with-authdaemond=/usr/lib/courier-imap/authlib
```

the configure script is outputting this error:

```

checking PLAIN... enabled

checking ANONYMOUS... enabled

checking LOGIN... enabled

checking NTLM... enabled

checking SQL... enabled

checking for mysql_select_db in -lmysqlclient... no

configure: WARNING: MySQL library mysqlclient does not work

```

Which means there's a mysqlclient problem. 

Does anyone ever get this problem ?

I'm using the following versions:

```

*  dev-libs/cyrus-sasl

      Latest version available: 2.1.20

      Latest version installed: 2.1.20

      Size of downloaded files: 1,733 kB

      Homepage:    http://asg.web.cmu.edu/sasl/

      Description: The Cyrus SASL (Simple Authentication and Security Layer)

      License:     as-is

*  sys-libs/pam_mysql

      Latest version available: 0.5

      Latest version installed: 0.5

      Size of downloaded files: 11 kB

      Homepage:    http://pam-mysql.sourceforge.net/

      Description: pam_mysql is a module for pam to authenticate users with mysql

      License:     GPL-2

*  dev-perl/DBD-mysql

      Latest version available: 2.1027

      Latest version installed: 2.1027

      Size of downloaded files: 95 kB

      Homepage:    http://cpan.pair.com/modules/by-module/DBD/

      Description: The Perl DBD:mysql Module

      License:     || ( Artistic GPL-2 )

*  dev-db/mysql

      Latest version available: 4.0.23

      Latest version installed: 4.0.23

      Size of downloaded files: 16,212 kB

      Homepage:    http://www.mysql.com/

      Description: A fast, multi-threaded, multi-user SQL database server

      License:     GPL-2

```

Any help is welcome ...Last edited by meshit on Fri Jan 07, 2005 1:21 pm; edited 1 time in total

----------

## langthang

please post the out put of `equery f dev-db/mysql | grep /usr/lib`

----------

## meshit

here it is :

```
jeremy@dji jeremy $ equery f dev-db/mysql |grep /usr/lib

/usr/lib

/usr/lib/mysql

/usr/lib/mysql/libdbug.a

/usr/lib/mysql/libheap.a

/usr/lib/mysql/libmerge.a

/usr/lib/mysql/libmyisam.a

/usr/lib/mysql/libmyisammrg.a

/usr/lib/mysql/libmysqlclient -> libmysqlclient.12.0.0

/usr/lib/mysql/libmysqlclient.12 -> libmysqlclient.12.0.0

/usr/lib/mysql/libmysqlclient.12.0.0

/usr/lib/mysql/libmysqlclient.a

/usr/lib/mysql/libmysqlclient.la

/usr/lib/mysql/libmysqlclient.so -> ../libmysqlclient.so

/usr/lib/mysql/libmysqlclient_r -> libmysqlclient_r.12.0.0

/usr/lib/mysql/libmysqlclient_r.12 -> libmysqlclient_r.12.0.0

/usr/lib/mysql/libmysqlclient_r.12.0.0

/usr/lib/mysql/libmysqlclient_r.a

/usr/lib/mysql/libmysqlclient_r.la

/usr/lib/mysql/libmysqlclient_r.so -> ../libmysqlclient_r.so

/usr/lib/mysql/libmysqld.a

/usr/lib/mysql/libmystrings.a

/usr/lib/mysql/libmysys.a

/usr/lib/mysql/libnisam.a

/usr/lib/mysql/libvio.a

```

/usr/lib/mysql/libmysqlclient.so is a symlink  on /usr/lib/libmysqlclient.so which is symlinked on  /usr/lib/mysql/libmysqlclient.so.... It is a looplink and libmysqlclient.so is not present in my system..

I'm currently reinstalling mysql in doing an 

```
emerge -C mysql && emerge mysql 
```

then I'll reinstall cyrus-sasl in the same way to see if it is changing something.....

Keep you informed here.

Thank's a lot for your support

----------

## meshit

here are the librairies resulting from a mysql reinstallation:

```
dji lib # pwd

/usr/lib

dji lib # ls libmysql*.*

ls: libmysql*.*: No such file or directory

dji lib # ls libmysql*

ls: libmysql*: No such file or directory

dji lib # ls mysql/libmysql*

mysql/libmysqlclient     mysql/libmysqlclient.12.0.0  mysql/libmysqlclient.la  mysql/libmysqlclient_r     mysql/libmysqlclient_r.12.0.0  mysql/libmysqlclient_r.la  mysql/libmysqld.a

mysql/libmysqlclient.12  mysql/libmysqlclient.a       mysql/libmysqlclient.so  mysql/libmysqlclient_r.12  mysql/libmysqlclient_r.a       mysql/libmysqlclient_r.so

dji lib # ls -l mysql/libmysql*

lrwxrwxrwx  1 root root      21 Jan  6 11:24 mysql/libmysqlclient -> libmysqlclient.12.0.0

lrwxrwxrwx  1 root root      21 Jan  6 11:24 mysql/libmysqlclient.12 -> libmysqlclient.12.0.0

-rwxr-xr-x  1 root root  259892 Jan  6 11:24 mysql/libmysqlclient.12.0.0

-rw-r--r--  1 root root  356430 Jan  6 11:24 mysql/libmysqlclient.a

-rwxr-xr-x  1 root root     879 Jan  6 11:24 mysql/libmysqlclient.la

lrwxrwxrwx  1 root root      20 Jan  6 11:24 mysql/libmysqlclient.so -> ../libmysqlclient.so

lrwxrwxrwx  1 root root      23 Jan  6 11:24 mysql/libmysqlclient_r -> libmysqlclient_r.12.0.0

lrwxrwxrwx  1 root root      23 Jan  6 11:24 mysql/libmysqlclient_r.12 -> libmysqlclient_r.12.0.0

-rwxr-xr-x  1 root root  264084 Jan  6 11:24 mysql/libmysqlclient_r.12.0.0

-rw-r--r--  1 root root  365328 Jan  6 11:24 mysql/libmysqlclient_r.a

-rwxr-xr-x  1 root root     893 Jan  6 11:24 mysql/libmysqlclient_r.la

lrwxrwxrwx  1 root root      22 Jan  6 11:24 mysql/libmysqlclient_r.so -> ../libmysqlclient_r.so

-rw-r--r--  1 root root 4450028 Jan  6 11:24 mysql/libmysqld.a

```

we see some missing links of libmysql on /usr/lib, and mysqlclient.so from /usr/lib/mysql is pointing on an inexisting file (/usr/lib/libmysqlclient.so)

so the next cyrus-sasl compilation will fail on the mysqlclient lib test as the file is not existing, and doing a manual symlink won't help as libmysqlclient is not existing.... isn't mysql ebuild supposed to generate this libmysqlclient.so ??? and if yes , Where is it supposed to go ? 

I'm doing a revdep-rebuild then to see if it is fixing the lib problem..... but I don't think so...

I'll post the result.

Cheers.

----------

## Ferdy

Missing /etc/ld.so.conf line ?

Cheers,

Ferdy

----------

## meshit

revdep-rebuild did not fix anything about mysql or cyrus-sasl ...

Ferdy, Where a ld.so.conf line would be missing ?

----------

## meshit

I fixed things in the following way:

1 - link manually /usr/lib/libmysql* on /usr/lib. Here are the needed mysql lib links to ensure plugs on libmysqlclient from other compilation progs.:

```
dji cyrus-sasl-2.1.20 # ls -l /usr/lib/mysql/ total 6512

-rw-r--r--  1 root root   12182 Jan  6 11:24 libdbug.a

-rw-r--r--  1 root root   36270 Jan  6 11:24 libheap.a

-rw-r--r--  1 root root   15100 Jan  6 11:24 libmerge.a

-rw-r--r--  1 root root  277794 Jan  6 11:24 libmyisam.a

-rw-r--r--  1 root root   26414 Jan  6 11:24 libmyisammrg.a

lrwxrwxrwx  1 root root      21 Jan  6 11:24 libmysqlclient -> libmysqlclient.12.0.0

lrwxrwxrwx  1 root root      21 Jan  6 11:24 libmysqlclient.12 -> libmysqlclient.12.0.0

-rwxr-xr-x  1 root root  259892 Jan  6 11:24 libmysqlclient.12.0.0

-rw-r--r--  1 root root  356430 Jan  6 11:24 libmysqlclient.a

-rwxr-xr-x  1 root root     879 Jan  6 11:24 libmysqlclient.la

lrwxrwxrwx  1 root root      20 Jan  6 11:24 libmysqlclient.so -> ../libmysqlclient.so

lrwxrwxrwx  1 root root      23 Jan  6 11:24 libmysqlclient_r -> libmysqlclient_r.12.0.0

lrwxrwxrwx  1 root root      23 Jan  6 11:24 libmysqlclient_r.12 -> libmysqlclient_r.12.0.0

-rwxr-xr-x  1 root root  264084 Jan  6 11:24 libmysqlclient_r.12.0.0

-rw-r--r--  1 root root  365328 Jan  6 11:24 libmysqlclient_r.a

-rwxr-xr-x  1 root root     893 Jan  6 11:24 libmysqlclient_r.la

lrwxrwxrwx  1 root root      22 Jan  6 11:24 libmysqlclient_r.so -> ../libmysqlclient_r.so

-rw-r--r--  1 root root 4450028 Jan  6 11:24 libmysqld.a

-rw-r--r--  1 root root  142452 Jan  6 11:24 libmystrings.a

-rw-r--r--  1 root root  255430 Jan  6 11:24 libmysys.a

-rw-r--r--  1 root root  106596 Jan  6 11:24 libnisam.a

-rw-r--r--  1 root root   16470 Jan  6 11:24 libvio.a

```

and from a /usr/lib point of view, following the above links:

```
dji cyrus-sasl-2.1.20 # ls -l /usr/lib/libmysql* lrwxrwxrwx  1 root root 32 Jan  7 14:00 /usr/lib/libmysqlclient.12 -> /usr/lib/mysql/libmysqlclient.12

lrwxrwxrwx  1 root root 36 Jan  7 14:00 /usr/lib/libmysqlclient.12.0.0 -> /usr/lib/mysql/libmysqlclient.12.0.0

lrwxrwxrwx  1 root root 36 Jan  7 14:00 /usr/lib/libmysqlclient.so -> /usr/lib/mysql/libmysqlclient.12.0.0

lrwxrwxrwx  1 root root 34 Jan  7 14:02 /usr/lib/libmysqlclient_r.12 -> /usr/lib/mysql/libmysqlclient_r.12

lrwxrwxrwx  1 root root 38 Jan  7 14:01 /usr/lib/libmysqlclient_r.12.0.0 -> /usr/lib/mysql/libmysqlclient_r.12.0.0

lrwxrwxrwx  1 root root 38 Jan  7 14:02 /usr/lib/libmysqlclient_r.so -> /usr/lib/mysql/libmysqlclient_r.12.0.0

dji cyrus-sasl-2.1.20 #

```

2 - I manually updated the lib cahe in running  

```
 ldconfig -v 
```

3 - Then cyrus-sasl mysqlclient lib check is working during compilation:

```

dji cyrus-sasl-2.1.20 # ./configure --enable-login --enable-ntlm --disable-krb4 --disable-otp --with-openssl=/usr/lib --with-pam=/lib --enable-krb4 --enable-gssapi --with-mysql=/usr/lib/mysql --enable-sql --with-authdaemond=/usr/lib/courier-imap/authlib

...

...

checking GSSAPI... disabled

checking PLAIN... enabled

checking ANONYMOUS... enabled

checking LOGIN... enabled

checking NTLM... enabled

[color=red][b]checking SQL... enabled

checking for mysql_select_db in -lmysqlclient... yes[/b][/color]

configure: WARNING: PostgreSQL Library not found

configure: WARNING: SQLite Library not found

checking for dmalloc library... no

checking for sfio library... no
```

4- Then emerging cyrus-sasl with pam_mysql and mysql USE flags is okay.

----------

## Ferdy

IIRC adding '/usr/lib/mysql/' to ld.so.conf would do the trick. [ then ldconfig -v and rebuild ]

Cheers,

Ferdy

----------

## meshit

 *Ferdy wrote:*   

> IIRC adding '/usr/lib/mysql/' to ld.so.conf would do the trick. [ then ldconfig -v and rebuild ]
> 
> Cheers,
> 
> Ferdy

 

OF course !!!!  THX a lot Ferdy to shine a little light on me.... 

sometimes, I've the feeling i'm losting myself in complications. I ought to be ashamed not to think about this in the very first time.... but.... why my did my gentoo nasty dwarf erase this line in ld.so.conf ???????

----------

## Ferdy

Dunno... maybe a bug ?

If you think so [ I mean, you've never edited ld.so.conf manually ], file one on bugs.gentoo.org.

Cheers,

Ferdy

----------

## meshit

okay I'll complete the bug I opened 2 days ago....

I think it is a bug but I dunnoi it it is specific to my server env or if it is a wide one.

Anyway I've the origin of the problem and the fix:

There no mysql lib path in /etc/env.d/

so I've added a 45mysql like this:

echo "LDPATH=/usr/lib/mysql" > /etc/env.d/45mysql && env-update&&ldconfig -v |grep mysql

you should obtain a list of mysql lib.

If you're not adding a libpath in env.d, you'll loose the /usr/lib/mysql at the next emerge you'll do in your system.....

Cheers.

thx to point the lib cache problem.

.

----------

## stiwi

and what is, when

```

echo "LDPATH=/usr/lib/mysql" > /etc/env.d/45mysql && env-update&&ldconfig -v |grep mysql

you should obtain a list of mysql lib.

```

gets nothing back with mysql ? the libraries are all in /usr/lib/mysql/. but ldconfig did not find them ... ????

----------

## meshit

 *stiwi wrote:*   

> and what is, when
> 
> ```
> 
> echo "LDPATH=/usr/lib/mysql" > /etc/env.d/45mysql && env-update&&ldconfig -v |grep mysql
> ...

 

ldconfig wasn't finding mysql libs due to to the following missing line in ld.so.conf:

```

/usr/lib/mysql

```

but with the above fix, It is now solved

----------

## stiwi

yes, but the output is:

```

webserver root # ldconfig -v

ldconfig: Can't stat /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4: No such file or directory

ldconfig: Can't stat /usr/lib/opengl/xorg-x11/lib: No such file or directory

/usr/local/lib:

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5:

        libstdc++.so.5 -> libstdc++.so.5.0.7

        libg2c.so.0 -> libg2c.so.0.0.0

        libgcc_s.so.1 -> libgcc_s.so.1

/opt/sun-jdk-1.4.2.06/jre/lib:

/usr/lib/mysql:

/lib:

        libpam.so.0 -> libpam.so.0.77

        libpthread.so.0 -> libpthread-0.10.so

        libproc-3.2.4.so -> libproc-3.2.4.so

        libdl.so.2 -> libdl-2.3.4.so

        libBrokenLocale.so.1 -> libBrokenLocale-2.3.4.so

        libc.so.6 -> libc-2.3.4.so

        libnss_dns.so.2 -> libnss_dns-2.3.4.so

        libcrypt.so.1 -> libcrypt-2.3.4.so

        libanl.so.1 -> libanl-2.3.4.so

        libmemusage.so -> libmemusage.so

        libnss_hesiod.so.2 -> libnss_hesiod-2.3.4.so

        ld-linux.so.2 -> ld-2.3.4.so

        libpam_misc.so.0 -> libpam_misc.so.0.77

        ld-linux.so.1 -> ld-linux.so.1.9.11

        libsandbox.so -> libsandbox.so

        libnss_compat.so.2 -> libnss_compat-2.3.4.so

        libSegFault.so -> libSegFault.so

        libe2p.so.2 -> libe2p.so.2.3

        libpwdb.so.0 -> libpwdb.so.0.62

        libpcprofile.so -> libpcprofile.so

        libgcc_s.so.1 -> libgcc_s.so.1

        libthread_db.so.1 -> libthread_db-1.0.so

        libcom_err.so.2 -> libcom_err.so.2.1

        libutil.so.1 -> libutil-2.3.4.so

        libext2fs.so.2 -> libext2fs.so.2.4

        libcrack.so.2 -> libcrack.so.2.7

        libblkid.so.1 -> libblkid.so.1.0

        libhistory.so.4 -> libhistory.so.4.3

        libnsl.so.1 -> libnsl-2.3.4.so

        libz.so.1 -> libz.so.1.2.1

        libresolv.so.2 -> libresolv-2.3.4.so

        libpamc.so.0 -> libpamc.so.0.77

        libwrap.so.0 -> libwrap.so.0.7.6

        libnss_nisplus.so.2 -> libnss_nisplus-2.3.4.so

        libuuid.so.1 -> libuuid.so.1.2

        libcap.so.1 -> libcap.so.1.10

        librt.so.1 -> librt-2.3.4.so

        libncurses.so.5 -> libncurses.so.5.4

        libss.so.2 -> libss.so.2.0

        libreadline.so.4 -> libreadline.so.4.3

        libm.so.6 -> libm-2.3.4.so

        libnss_nis.so.2 -> libnss_nis-2.3.4.so

        libnss_files.so.2 -> libnss_files-2.3.4.so

/usr/lib:

ldconfig: Cannot stat /usr/lib/libGL.so: No such file or directory

        libwwwtelnet.so.0 -> libwwwtelnet.so.0.1.0

        libc.so.5 -> libc.so.5

        libwwwtrans.so.0 -> libwwwtrans.so.0.1.0

        libwwwmux.so.0 -> libwwwmux.so.0.1.0

        libfreetype.so.6 -> libfreetype.so.6.3.4

        libwwwfile.so.0 -> libwwwfile.so.0.1.0

        libwwwsql.so.0 -> libwwwsql.so.0.1.0

        libwwwapp.so.0 -> libwwwapp.so.0.1.0

        libxmltok.so.0 -> libxmltok.so.0.1.0

        libwmflite-0.2.so.7 -> libwmflite.so

        libperl.so.1 -> libperl.so.1.5.8

        libwwwnews.so.0 -> libwwwnews.so.0.1.0

        libaspell.so.15 -> libaspell.so.15.0.3

        libpng.so.3 -> libpng.so.3.1.2.7

        libgettextpo.so.0 -> libgettextpo.so.0.0.0

        libpdf_java.so.0 -> libpdf_java.so.0.0.0

        libpcreposix.so.0 -> libpcreposix.so.0.0.0

        libwwwhttp.so.0 -> libwwwhttp.so.0.1.0

        libxslt.so.1 -> libxslt.so.1.1.9

        libsablot.so.0 -> libsablot.so.0.100.0

        libpspell.so.15 -> libpspell.so.15.0.3

        libwwwcache.so.0 -> libwwwcache.so.0.1.0

        libstdc++.so.2.9 -> libstdc++.so.2.9.0

        libstdc++.so.2.8 -> libstdc++.so.2.8.0

        libwwwdir.so.0 -> libwwwdir.so.0.1.0

        libwwwutils.so.0 -> libwwwutils.so.0.1.0

        libgthread-2.0.so.0 -> libgthread-2.0.so.0.400.8

        libgdbm_compat.so.3 -> libgdbm_compat.so.3.0.0

        libswigpy.so.0 -> libswigpy.so.0.0.0

        libwwwhtml.so.0 -> libwwwhtml.so.0.1.0

        libpopt.so.0 -> libpopt.so.0.0.0

        libgobject-2.0.so.0 -> libgobject-2.0.so.0.400.8

        libttf.so.2 -> libttf.so.2.2.0

        libgettextlib-0.12.1.so -> libgettextlib.so

        libexslt.so.0 -> libexslt.so.0.8.7

        libgettextsrc-0.12.1.so -> libgettextsrc.so

        libSDL-1.2.so.0 -> libSDL.so

        libpcre.so.0 -> libpcre.so.0.0.1

        libjavasasl.so.1 -> libjavasasl.so.1.0.0

        libgmodule-2.0.so.0 -> libgmodule-2.0.so.0.400.8

        libg++.so.2.7.2 -> libg++.so.2.7.2.8

        libstdc++-libc6.2-2.so.3 -> libstdc++-3-libc6.2-2-2.10.0.so

        libaudiofile.so.0 -> libaudiofile.so.0.0.2

        libslang.so.1 -> libslang.so.1.4.9

        libcrypto.so.0.9.7 -> libcrypto.so.0.9.7

        libltdl.so.3 -> libltdl.so.3.1.0

        libltdl.so.0 -> libltdl.so.0.1.2

        libmagic.so.1 -> libmagic.so.1.0.0

        libswigpl.so.0 -> libswigpl.so.0.0.0

        libmenu.so.5 -> libmenu.so.5.4

        libMagick.so.6 -> libMagick.so.6.1.8

        libwwwstream.so.0 -> libwwwstream.so.0.1.0

        libwwwmime.so.0 -> libwwwmime.so.0.1.0

        libt1.so.5 -> libt1.so.5.0.2

        libpython2.3.so.1.0 -> libpython2.3.so.1.0

        libwwwftp.so.0 -> libwwwftp.so.0.1.0

        libwwwgopher.so.0 -> libwwwgopher.so.0.1.0

        libstdc++-libc6.1-1.so.2 -> libstdc++-2-libc6.1-1-2.9.0.so

        librrd.so.0 -> librrd.so.0.0.0

        libglib-1.2.so.0 -> libglib.so

        libbfd-2.15.92.0.2.so -> libbfd.so

        libxml2.so.2 -> libxml2.so.2.6.15

        libglib-2.0.so.0 -> libglib-2.0.so.0.400.8

        libWand.so.6 -> libWand.so.6.1.8

        libpdf.so.2 -> libpdf.so.2.2.2

        libbz2.so.1.0 -> libbz2.so.1.0.2

        libwmf-0.2.so.7 -> libwmf.so

        libapr-0.so.0 -> libapr-0.so.0.9.5

        libstdc++.so.2.7.2 -> libstdc++.so.2.7.2.8

        libwwwinit.so.0 -> libwwwinit.so.0.1.0

        libtcl8.4.so -> libtcl8.4.so

        libdb_cxx-4.1.so -> libdb_cxx.so

        libexpect5.37.so -> libexpect5.37.so

        libdb-4.1.so -> libdb.so

        libgthread-1.2.so.0 -> libgthread.so

        libmcrypt.so.4 -> libmcrypt.so.4.4.7

        libdb.so.2 -> libndbm.so

        libform.so.5 -> libform.so.5.4

        libwwwxml.so.0 -> libwwwxml.so.0.1.0

        libmhash.so.2 -> libmhash.so.2.0.0

        libmd5.so.0 -> libmd5.so.0.1.0

        libgdbm.so.3 -> libgdbm.so.3.0.0

        libgcrypt.so.11 -> libgcrypt.so.11.1.0

        libjpeg.so.62 -> libjpeg.so.62.0.0

        libMagick++.so.6 -> libMagick++.so.6.1.8

        libssl.so.0.9.7 -> libssl.so.0.9.7

        libaprutil-0.so.0 -> libaprutil-0.so.0.9.5

        libgd.so.2 -> libgd.so.2.0.0

        libpng12.so.0 -> libpng12.so.0.1.2.7

        libwwwcore.so.0 -> libwwwcore.so.0.1.0

        libexpat.so.0 -> libexpat.so.0.5.0

        libwwwssl.so.0 -> libwwwssl.so.0.1.0

        libsasl2.so.2 -> libsasl2.so.2.0.20

        libtiff.so.3 -> libtiff.so.3.7.1

        libijs.so -> libijs.so

        libgmodule-1.2.so.0 -> libgmodule.so

        libopcodes-2.15.92.0.2.so -> libopcodes.so

        libxmlparse.so.0 -> libxmlparse.so.0.1.0

        libgpg-error.so.0 -> libgpg-error.so.0.1.3

        libfontconfig.so.1 -> libfontconfig.so.1.0.4

        libwwwzip.so.0 -> libwwwzip.so.0.1.0

        libpics.so.0 -> libpics.so.0.0.0

        libpanel.so.5 -> libpanel.so.5.4

        libdb_java-4.1.so -> libdb_java.so

        libsmpeg-0.4.so.0 -> libsmpeg-0.4.so.0.dummy

/opt/sun-jdk-1.4.2.06/jre/lib/i386: (hwcap: 0x1000000000000)

        libcmm.so -> libcmm.so

        libawt.so -> libawt.so

        libjavaplugin_jni.so -> libjavaplugin_jni.so

        libjsig.so -> libjsig.so

        libjpeg.so -> libjpeg.so

        libdt_socket.so -> libdt_socket.so

        libdcpr.so -> libdcpr.so

        libjdwp.so -> libjdwp.so

        libjcov.so -> libjcov.so

        libnative_chmod.so -> libnative_chmod.so

        libjawt.so -> libjawt.so

        libjava.so -> libjava.so

        libJdbcOdbc.so -> libJdbcOdbc.so

        libmlib_image.so -> libmlib_image.so

        libjsound.so -> libjsound.so

        libhprof.so -> libhprof.so

        libzip.so -> libzip.so

        libjsoundalsa.so -> libjsoundalsa.so

        libfontmanager.so -> libfontmanager.so

        libioser12.so -> libioser12.so

        librmi.so -> librmi.so

        libverify.so -> libverify.so

        libjaas_unix.so -> libjaas_unix.so

        libnio.so -> libnio.so

        libnet.so -> libnet.so

/usr/lib/tls: (hwcap: 0x8000000000000000)

```

there are no mysql liberies. but they are in /usr/lib/mysql

```

webserver root # ls -la /usr/lib/mysql/

total 8470

drwxr-xr-x   2 root root     736 Jan 20 00:54 .

drwxr-xr-x  38 root root   19728 Jan 20 04:37 ..

-rw-r--r--   1 root root   12210 Jan 20 00:54 libdbug.a

-rw-r--r--   1 root root   35958 Jan 20 00:54 libheap.a

-rw-r--r--   1 root root   14928 Jan 20 00:54 libmerge.a

-rw-r--r--   1 root root  278814 Jan 20 00:54 libmyisam.a

-rw-r--r--   1 root root   26310 Jan 20 00:54 libmyisammrg.a

lrwxrwxrwx   1 root root      21 Jan 20 00:54 libmysqlclient -> libmysqlclient.12.0.0

lrwxrwxrwx   1 root root      21 Jan 20 00:54 libmysqlclient.12 -> libmysqlclient.12.0.0

-rwxr-xr-x   1 root root  259260 Jan 20 00:54 libmysqlclient.12.0.0

-rw-r--r--   1 root root  357498 Jan 20 00:54 libmysqlclient.a

-rwxr-xr-x   1 root root     879 Jan 20 00:54 libmysqlclient.la

lrwxrwxrwx   1 root root      23 Jan 20 00:54 libmysqlclient_r -> libmysqlclient_r.12.0.0

lrwxrwxrwx   1 root root      23 Jan 20 00:54 libmysqlclient_r.12 -> libmysqlclient_r.12.0.0

-rwxr-xr-x   1 root root  267548 Jan 20 00:54 libmysqlclient_r.12.0.0

-rw-r--r--   1 root root  366460 Jan 20 00:54 libmysqlclient_r.a

-rwxr-xr-x   1 root root     893 Jan 20 00:54 libmysqlclient_r.la

-rw-r--r--   1 root root 6470408 Jan 20 00:54 libmysqld.a

-rw-r--r--   1 root root  142520 Jan 20 00:54 libmystrings.a

-rw-r--r--   1 root root  255890 Jan 20 00:54 libmysys.a

-rw-r--r--   1 root root  106436 Jan 20 00:54 libnisam.a

-rw-r--r--   1 root root   16518 Jan 20 00:54 libvio.a

```

----------

## Voffinn

This is in need of a quick fix! My mailserver has been down since the mysql update last night.

----------

## meshit

is it strange.....

take a look to my output:

```
dji root # ldconfig -v |grep mysql

/usr/lib/mysql:

        libmysqlclient_r.12 -> libmysqlclient_r.so

        libmysqlclient.12 -> libmysqlclient.so

        libmysqlclient_r.12 -> libmysqlclient_r.so

        libmysqlclient.12 -> libmysqlclient.so

```

and here is the /usr/lin/mysql lib content:

```
dji root # ls -l /usr/lib/mysql/

total 6512

-rw-r--r--  1 root root   12182 Jan  6 11:24 libdbug.a

-rw-r--r--  1 root root   36270 Jan  6 11:24 libheap.a

-rw-r--r--  1 root root   15100 Jan  6 11:24 libmerge.a

-rw-r--r--  1 root root  277794 Jan  6 11:24 libmyisam.a

-rw-r--r--  1 root root   26414 Jan  6 11:24 libmyisammrg.a

lrwxrwxrwx  1 root root      21 Jan  6 11:24 libmysqlclient -> libmysqlclient.12

.0.0

lrwxrwxrwx  1 root root      21 Jan  6 11:24 libmysqlclient.12 -> libmysqlclient

.12.0.0

-rwxr-xr-x  1 root root  259892 Jan  6 11:24 libmysqlclient.12.0.0

-rw-r--r--  1 root root  356430 Jan  6 11:24 libmysqlclient.a

-rwxr-xr-x  1 root root     879 Jan  6 11:24 libmysqlclient.la

lrwxrwxrwx  1 root root      20 Jan  6 11:24 libmysqlclient.so -> ../libmysqlcli

ent.so

lrwxrwxrwx  1 root root      23 Jan  6 11:24 libmysqlclient_r -> libmysqlclient_

r.12.0.0

lrwxrwxrwx  1 root root      23 Jan  6 11:24 libmysqlclient_r.12 -> libmysqlclie

nt_r.12.0.0

-rwxr-xr-x  1 root root  264084 Jan  6 11:24 libmysqlclient_r.12.0.0

-rw-r--r--  1 root root  365328 Jan  6 11:24 libmysqlclient_r.a

-rwxr-xr-x  1 root root     893 Jan  6 11:24 libmysqlclient_r.la

lrwxrwxrwx  1 root root      22 Jan  6 11:24 libmysqlclient_r.so -> ../libmysqlc

lient_r.so

-rw-r--r--  1 root root 4450028 Jan  6 11:24 libmysqld.a

-rw-r--r--  1 root root  142452 Jan  6 11:24 libmystrings.a

-rw-r--r--  1 root root  255430 Jan  6 11:24 libmysys.a

-rw-r--r--  1 root root  106596 Jan  6 11:24 libnisam.a

-rw-r--r--  1 root root   16470 Jan  6 11:24 libvio.a

```

----------

## stiwi

why i have not the .so files ?

----------

## meshit

 *stiwi wrote:*   

> why i have not the .so files ?

 

Okay I had the same problem  :Smile: 

You have to fix this in creating so fileslinks like this:

```
bash-2.05b$ ls -l /usr/lib/libmysql*.*

lrwxrwxrwx  1 root root 32 jan  7 14:00 /usr/lib/libmysqlclient.12 -> /usr/lib/mysql/libmysqlclient.12

lrwxrwxrwx  1 root root 36 jan  7 14:00 /usr/lib/libmysqlclient.12.0.0 -> /usr/lib/mysql/libmysqlclient.12.0.0

lrwxrwxrwx  1 root root 34 jan  7 14:02 /usr/lib/libmysqlclient_r.12 -> /usr/lib/mysql/libmysqlclient_r.12

lrwxrwxrwx  1 root root 38 jan  7 14:01 /usr/lib/libmysqlclient_r.12.0.0 -> /usr/lib/mysql/libmysqlclient_r.12.0.0

lrwxrwxrwx  1 root root 38 jan  7 14:02 /usr/lib/libmysqlclient_r.so -> /usr/lib/mysql/libmysqlclient_r.12.0.0

lrwxrwxrwx  1 root root 36 jan  7 14:00 /usr/lib/libmysqlclient.so -> /usr/lib/mysql/libmysqlclient.12.0.0

bash-2.05b$ ls -l /usr/lib/mysql/

total 6512

-rw-r--r--  1 root root   12182 jan  6 11:24 libdbug.a

-rw-r--r--  1 root root   36270 jan  6 11:24 libheap.a

-rw-r--r--  1 root root   15100 jan  6 11:24 libmerge.a

-rw-r--r--  1 root root  277794 jan  6 11:24 libmyisam.a

-rw-r--r--  1 root root   26414 jan  6 11:24 libmyisammrg.a

lrwxrwxrwx  1 root root      21 jan  6 11:24 libmysqlclient -> libmysqlclient.12.0.0

lrwxrwxrwx  1 root root      21 jan  6 11:24 libmysqlclient.12 -> libmysqlclient.12.0.0

-rwxr-xr-x  1 root root  259892 jan  6 11:24 libmysqlclient.12.0.0

-rw-r--r--  1 root root  356430 jan  6 11:24 libmysqlclient.a

-rwxr-xr-x  1 root root     879 jan  6 11:24 libmysqlclient.la

lrwxrwxrwx  1 root root      23 jan  6 11:24 libmysqlclient_r -> libmysqlclient_r.12.0.0

lrwxrwxrwx  1 root root      23 jan  6 11:24 libmysqlclient_r.12 -> libmysqlclient_r.12.0.0

-rwxr-xr-x  1 root root  264084 jan  6 11:24 libmysqlclient_r.12.0.0

-rw-r--r--  1 root root  365328 jan  6 11:24 libmysqlclient_r.a

-rwxr-xr-x  1 root root     893 jan  6 11:24 libmysqlclient_r.la

lrwxrwxrwx  1 root root      22 jan  6 11:24 libmysqlclient_r.so -> ../libmysqlclient_r.so

lrwxrwxrwx  1 root root      20 jan  6 11:24 libmysqlclient.so -> ../libmysqlclient.so

-rw-r--r--  1 root root 4450028 jan  6 11:24 libmysqld.a

-rw-r--r--  1 root root  142452 jan  6 11:24 libmystrings.a

-rw-r--r--  1 root root  255430 jan  6 11:24 libmysys.a

-rw-r--r--  1 root root  106596 jan  6 11:24 libnisam.a

-rw-r--r--  1 root root   16470 jan  6 11:24 libvio.a

```

----------

## stiwi

ok, two commands and sasl compiles without errors.

```

cd /usr/lib/mysql

ln -s libmysqlclient.12.0.0 libmysqlclient.so

ln -s libmysqlclient_r.12.0.0 libmysqlclient_r.so

```

but it still did not work  :Sad: 

```

Jan 20 14:53:13 [postfix/smtpd] warning: unknown[217.111.5.xxx]: SASL LOGIN authentication failed

Jan 20 14:53:13 [postfix/smtpd] lost connection after AUTH from unknown[217.111.5.xxx]

```

----------

## meshit

 *stiwi wrote:*   

> ok, two commands and sasl compiles without errors.
> 
> ```
> 
> cd /usr/lib/mysql
> ...

 

Are you sure SASL did compile without any error or warning ? When I compiled sasl (cyrus-sasl), I had no errors at end of compilation, but the libmysqlclient test was failing, even  libmysqlclient was found during the compilation. That was just because the libmysqlclient wasn't in /usr/lib and the link to libmysqlclient.12.0.0 did not exists....

did you execute an env-update after the links creation ?

Did you compile on the same environnement then ?

What auth mechanism  are you using excatly ? are you using authdaemond ? did you restart saslauthd ?

----------

## Valentin

Whow! thx for the tips! After fixing this mysql and saslauth stuff the mailserver runs perfectly again  :Smile: 

----------

