[Dovecot] configure change for 1.0.beta8
Hi,
I'm trying to compile dovecot under Solaris 10 with native Mysql support. Couple changes are needed before configure can detect and compile mysql support. Native Solaris Mysql is installed under /usr/sfw directory. Configure can't find libraries and when these are found -R runtime path is needed for linking. Also if library name is given before library path it can't find it.
These changes are needed for configure script line 29533 for i in /usr /usr/local /usr/local/mysql /usr/sfw; do
line 29548 LIBS="$LIBS -L$MYSQL_LIBDIR -R$MYSQL_LIBDIR"
line 29559 LIBS="$LIBS -lmysqlclient"
line 29770 SQL_LIBS="$SQL_LIBS -L$MYSQL_LIBDIR -R$MYSQL_LIBDIR"
line 29780 LIBS="$LIBS -lmysqlclient"
Tomppa
On Thu, May 18, 2006 at 03:25:24PM +0300, Tomi Vainio wrote:
Hi,
I'm trying to compile dovecot under Solaris 10 with native Mysql support. Couple changes are needed before configure can detect and compile mysql support. Native Solaris Mysql is installed under /usr/sfw directory. Configure can't find libraries and when these are found -R runtime path is needed for linking. Also if library name is given before library path it can't find it.
These changes are needed for configure script line 29533 for i in /usr /usr/local /usr/local/mysql /usr/sfw; do
line 29548 LIBS="$LIBS -L$MYSQL_LIBDIR -R$MYSQL_LIBDIR"
I disagree with adding /usr/sfw to the default paths that are searched. what if you have another installation of it somewhere else and want to use that one? this approach closes doors for other sysadmins who may not wish to use /usr/sfw mysql.
the right way to do this is to set CPPFLAGS/CFLAGS/LDFLAGS in your environment when you call configure. configure will then find the libraries and headers in exactly where you've told it to.
leaving things to chance by trying to be smart about auto detecting stuff in configure is almost always fraught with danger, and at the very least it can make life difficult for others.
I am guessing that -R is not used because it is not portable across all platforms that Dovecot should be able to be built on. again, this is why you should use LDFLAGS.
"the administrator knows better than the configure script." :)
and I speak as someone who runs dovecot in a production Solaris environment (though without mysql). mmm, pkgsrc :)
grant.
Greetings -
--On 19 May 2006 06:48:33 +1000 grant beattie <grant@grunta.com> wrote:
I disagree with adding /usr/sfw to the default paths that are searched. what if you have another installation of it somewhere else and want to use that one? this approach closes doors for other sysadmins who may not wish to use /usr/sfw mysql.
the right way to do this is to set CPPFLAGS/CFLAGS/LDFLAGS in your environment when you call configure. configure will then find the libraries and headers in exactly where you've told it to.
leaving things to chance by trying to be smart about auto detecting stuff in configure is almost always fraught with danger, and at the very least it can make life difficult for others.
Could I voice my agreement with Grant: I lost nearly 2 days trying to get Dovecot to build and work with SSL support. Why? Because I was trying to use the Blastwave distribution of OpenSSL: I had remember to add the "-I..." to the environment variable but had overlooked "-L..." (being so used to the run-time link editor's search-path resolving these).
The trouble was that a Sun FreeWare version of OpenSSL had crept onto the system that was older than the Blastwave one, and Dovecot's autoconfigure scripts use of "pkg-config" had sniffed the latter out to link against.
After I'd eventually convinced myself I hadn't mucked up the certificates etc I found the real problem and easily fixed it.
But for me the less sniffing around an autoconfigure system does to track down libraries the better. In my case a comiple/link time "unresolved symbols" would have given me the clue I needed within minutes, rather than giving me an executable that crashed when I tried to establish a secure connection and a mystery to solve.
Cheers, Mike B-)
-- The Computing Service, University of York, Heslington, York Yo10 5DD, UK Tel:+44-1904-433811 FAX:+44-1904-433740
- Unsolicited commercial e-mail is NOT welcome at this e-mail address. *
participants (3)
-
grant beattie
-
Mike Brudenell
-
Tomi Vainio