hi earl,
-- On Tuesday, November 2, 2004 8:17 AM -0500 Earl R Shannon <[EMAIL PROTECTED]> wrote:
I see the PLAIN mech being advertised by the server. I'd check and make sure the SASL libraries can be found by the imtest client.
Regards, Earl Shannon
well, I'll be ... I thought I'd proactively fixed this !?
i'll share what i've found. BOTTOM LINE: i think (?) there's a bug that needs to be fixed ... or at least behavior that needs to be better clarified.
on my system (OSX 10.3.5), cyrus-sasl-2.1.19 has been built/installed in cd /usr/local/cyrus-sasl (the OSX SASL2.framework still gets installed in /Library/Frameworks ... i'll worry abt this later) with (among other settings):
./configure \ --prefix=/usr/local/cyrus-sasl \ --with-plugindir=/usr/local/cyrus-sasl/lib/sasl2 \ ... --with-openssl=/usr/local/ssl \ ... --with-dblib=berkeley \ --with-bdb-libdir=/usr/lib \ --with-bdb-incdir=/usr/include \ ...
of course, per numerous messages on the board, in building cyrus-imap you've got to make sure to pick up the right sasl2 libs ... NOT the OSX 'native' installs in /usr.
to that end, i SPECIFICALLY built cyrus-imapd-2.2.8 with:
setenv LDFLAGS "-L/usr/local/cyrus-sasl/lib -lsasl2" setenv CPPFLAGS "-I/usr/local/cyrus-sasl/include/sasl"
and
--with-sasl=/usr/local/cyrus-sasl \
as:
./configure \ --prefix=/usr/local/cyrus-imap \ --with-cyrus-prefix=/usr/local/cyrus-imap/bin \ --with-service-path=/usr/local/cyrus-imap/libexec \ --with-sasl=/usr/local/cyrus-sasl \ --with-snmp=/usr/local/net-snmp \ --with-auth=unix \ --enable-listext \ --with-bdb \ --with-bdb-libdir=/usr/lib \ --with-bdb-incdir=/usr/include \ --with-openssl=/usr/local/ssl \ --with-syslogfacility=LOCAL6 \ --with-perl=/usr/bin/perl \ --with-libwrap \ --enable-sieve \ --enable-server \ --disable-gssapi \ --with-syslogfacility=LOCAL6
then
make depend make all
changing
# this is another issue for later ... -------------------------------------- (EDITOR) perl/imap/Makefile perl/sieve/managesieve/Makefile --- PERLPREFIX = $(PREFIX) +++ PERLPREFIX = / --------------------------------------
followed by
make install
all was (so i thought) OK.
per your mail message, tho i checked AGAIN:
otool -L /usr/local/cyrus-imap/bin/imtest
to find:
Load command 5 cmd LC_LOAD_DYLIB cmdsize 56 name /usr/lib/libsasl2.2.0.1.dylib (offset 24)
STILL linked against the wrong library!
some digging finds multiple ocurrences of:
EXTRALIBS = -L/usr/lib -ldb-4.2 -L/usr/local/cyrus-sasl/lib -lsasl2 -L/usr/local/ssl/lib -L/usr/local/ssl/lib -lssl -lcrypto
and
LDLOADLIBS = -L/usr/lib -ldb-4.2 -L/usr/local/cyrus-sasl/lib -lsasl2 -L/usr/local/ssl/lib -L/usr/local/ssl/lib -lssl -lcrypto
note the "-ldb-4.2" PREPENDED by "-L/usr/lib"!
this seems to be picked up from the specification of:
--with-bdb \ --with-bdb-libdir=/usr/lib \ --with-bdb-incdir=/usr/include \
in configure.
if I remove the libdir/incdir lines from configure, and reconfigure with just
--with-bdb \
after:
make depend make all
i find:
EXTRALIBS = -ldb-4.2 -L/usr/local/cyrus-sasl/lib -lsasl2 -L/usr/local/ssl/lib -L/usr/local/ssl/lib -lssl -lcrypto
and
LDLOADLIBS = -ldb-4.2 -L/usr/local/cyrus-sasl/lib -lsasl2 -L/usr/local/ssl/lib -L/usr/local/ssl/lib -lssl -lcrypto
NOTE: *NO* prepended "-L/usr/lib"
a subsequent:
make install
goes smoothly, and a check of the rebuilt bin:
otool -L /usr/local/cyrus-imap/bin/imtest
shows what I expected the first time around:
Load command 5 cmd LC_LOAD_DYLIB cmdsize 80 name /usr/local/cyrus-sasl/lib/libsasl2.2.dylib (offset 24)
now linked against the SASL *I* built ...
I'd suggest that the code should be mod'd to pull SASL2 from where it's told to EVEN IN THE EVENT that another lib (e.g., dbd) is being pulled from /usr.
thanks for the 'thump' on the head!
richard
--- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html