If you installed mysql from source then your include files are in
/usr/local/mysql/include/mysql not /usr/local/mysql/include.  Same with the
libraries.

-Clayton

-----Original Message-----
From: DARCY,MATTHEW (Non-HP-UnitedKingdom,ex2)
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 8:00 AM
To: '[EMAIL PROTECTED]'
Subject: [vchkpw] Compilgin Vpopmail with Mysql General Questions.


Hello all,

I am new to this list, I am in the process of testing some installs of
various mail options.

I am trying to learn a little about some of them and set up some test
machines before I decide which one to go with.

At the moment, I am trying ot build on a redhat 7.3 system, a mail system
that handles multiple virtual domains and users.A good way of doing this
appears to be with qmail/vpopmail/mysql.

I am using qmail as the MTA, and I would like vpopmail to manage the virtual
domains and users / auth through mysql.

I have qmail in and working and I have patched qmail and uscpi tools with
the Matt toaster and Matt Mysql patch.

My Mysql install is in the directory /usr/local/mysql

I have configured vpopmail with the following options

./configure --enable-qmaildir=/var/qmail --enable-vpopuser=vpopmail
--enable-vpopgroup=vchkpw --enable-roaming-users=n
--enable-tcpserver-file=~vpopmail/etc/tcp.smtp --enable-mysql-logging=y
--enable-default-domain=mdlan.co.uk --enable-mysql=y --enable-valias=y
--enable-ip-alias-domains=y --enable-incdir=/usr/local/mysql/include/
--enable-libdir=/usr/local/mysql/lib --enable-libs=/usr/local/mysql/lib
--enable-sqlincdir=/usr/local/mysql/include/

Which seems to run well and return a good output

vpopmail directory = /home/vpopmail
               uid = 517
               gid = 90
          ip alias = ON  --enable-ip-alias-domains=y
address extentions = OFF --enable-qmail-ext=n (default)
     roaming users = OFF --enable-roaming-users=n default
        user quota = OFF --enable-defaultquota=NOQUOTA default
       auth module = mysql --enable-mysql=y
 mysql replication = OFF --enable-mysql-replication=n default
table optimization = many domains --enable-many-domains=y default
  system passwords = OFF --enable-passwd=n default
      file locking = ON  --enable-file-locking=y default
         file sync = OFF --enable-file-sync=n default disable vdelivermail
fsync
      auth logging = ON  --enable-auth-logging=y default
     mysql logging = ON  --enable-mysql-logging=y
      clear passwd = ON  --enable-clear-passwd=y (default)
 valias processing = ON  --enable-valias=y
        pop syslog = show only failure attempts
                     --enable-logging=e default
    default domain = mdlan.co.uk --enable-default-domain=mdlan.co.uk
          auth inc = -I/usr/local/mysql/include/
          auth lib = -L/usr/local/mysql/lib  -lmysqlclient -lz


I have hacked the mysql.h in /usr/local/src/vpopmail-5.2.1 to look like this

---snip

/*
 * vmyvsql.h
 * part of the vchkpw package
 *
 * Copyright (C) 1999 Inter7 Internet Technologies, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 */
#ifndef VPOPMAIL_MYSQL_H
#define VPOPMAIL_MYSQL_H

/* Edit to match your set up */
#define MYSQL_UPDATE_SERVER "localhost"
#define MYSQL_UPDATE_USER   "root"
#define MYSQL_UPDATE_PASSWD "password"

#define MYSQL_READ_SERVER   "localhost"
#define MYSQL_READ_USER     "root"
#define MYSQL_READ_PASSWD   "password"
/* End of setup section*/

-- snip


(the rest of the file I have not customised)



when I run make I get the following error

[root@jordan vpopmail-5.2.1]# make
make  all-recursive
make[1]: Entering directory `/usr/local/src/vpopmail-5.2.1'
Making all in cdb
make[2]: Entering directory `/usr/local/src/vpopmail-5.2.1/cdb'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/vpopmail-5.2.1/cdb'
make[2]: Entering directory `/usr/local/src/vpopmail-5.2.1'
gcc -I. -I/usr/local/mysql/include/      -g -O2 -Wall -c vauth.c
vauth.c:28:19: mysql.h: No such file or directory
make[2]: *** [vauth.o] Error 1
make[2]: Leaving directory `/usr/local/src/vpopmail-5.2.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/vpopmail-5.2.1'
make: *** [all-recursive-am] Error 2
[root@jordan vpopmail-5.2.1]#


I understand that it is complaining it cannot find mysql.h
my qustion is

1.) Which mysql.h is it looking for, the installed/compiled one from the
install or the one from /usr/local/src/mysql-3.23 (where I build mysql from)
2.) Why can it not find mysql.h as I have specified the lib/include dirs in
my configure command which seems fine
3.) my /etc/ld.so.conf looks like this

/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib
/usr/include
/usr/local/include
/usr/local/mysql/lib
/usr/local/mysql/include
/usr/local/mysql/include/mysql
/usr/local/kde/lib
/usr/lib/qt/lib
/usr/lib/qt-3.0.4/lib
/usr/lib/qt-3.0.3/lib
/usr/local/lib
/usr/lib/qt2/lib
/usr/lib/qt-1.45/lib
/usr/lib/qt
/usr/local/lib/python1.5/site-packages

which contains the mysql.h file and I HAVE run ldconfig many times.

I have also removed config.cache and re-ran configure.

Can someone explain the problem to me, and perhaps give me a hint as to how
to fix it.

google suggests copying mysql.h or libmysqlauth.o to /usr/lib or linking it
?? I understand how this may fix it but not why it is causing a problem now.

thanks,

Matt.



Reply via email to