On Sun, Jan 06, 2002 at 12:54:57PM -0700, Amos Gouaux wrote:

> >>>>> On Sun, 6 Jan 2002 03:13:17 -0700,
> >>>>> Irwan Hadi <[EMAIL PROTECTED]> (ih) writes:
> 
> ih> Still the same although I already added those in Makefile.PL
> 
> I feel your pain.  I'm having a horrible time with 2.1 out of CVS.
> I think there are problems with cmulocal/sasl2.m4, but I haven't
> narrowed it down yet.  If I explicitly tell configure where sasl is
> with something like this:

Well the problem is actually when I tried to use the stable one
(cyrus-sasl-1.5.27 and cyrus-imapd-1.6.24), cyrus-sasl-1.5.27 did
compile but when I run ./saslpasswd -c cyrus for example, it always
gives core dumped.
I thought the first time because it couldn't find the cyrus-sasl
library, but although it could found the library, it still gives me core
dumped. (This on Solaris 8 for Sparc).
It worked fine on Linux (the cyrus-sasl-1.5.27).
Just trying to fix this, I spent almost 2 weeks without any result.

Later when I tried to use cyrus-sasl-2.0.5-BETA with hope that it will
run better although it is in beta stage, yes it run smoothly. I can
issued ./saslpasswd -c cyrus, and it did create the user's database at
/etc/sasldb2.
After succeed with cyrus-sasl-2.0.5-BETA, I tried to compile
cyrus-imapd-2.0.16, but since I think that beta should be matched with
beta, I compiled with cyrus-imapd-2.1.0-BETA (all are from
ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/, and I didn't use any from
CVS). Cyrus-imapd-2.1.0-BETA compiled successfully, although before I
compile it I must give
setenv CFLAGS -I/opt/include -I/opt/cyrus/cyrus-sasl/include
or otherwise it will failed because it couldn't find the cyrus-sasl
include files, although in the ./configure I already gave 

[sol]/opt/source/mail/build/cyrus-imapd-2.1.0> head config.status
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host sol:
#
# ./configure  --prefix=/opt/cyrus/cyrus-imapd
# --with-sasl=/opt/cyrus/cyrus-sasl --with-libwrap=/opt
# --with-openssl=/opt --enable-netscapehack --with-cyrus-user=cyrus
# --with-cyrus-group=cyrus
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
[sol]/opt/source/mail/build/cyrus-imapd-2.1.0>

it still couldn't find the appropriate sasl include files.
> 
>   --with-sasl=/usr/local
I compiled all at /opt/cyrus and not to /usr/local, this is to prevent
that in case in the future we need to upgrade the Solaris on the server
from 701 (seven zero-one) to 1001 (ten zero-one) for example, we don't
need to tar the whole /usr/local first, since the /usr will get sweeped
in the instalation.


> 
> Then it seems as if -lsasl2 is not added to LIB_DYN_SASL, which is
> used to build SASL_LIB.  Furthermore, it seems that this autoconf
> code could benefit from the use of andrew_runpath_switch.  This
> variable already determines that -R is desirable for the linker,
> but the sasl2 autoconf stuff doesn't make use of this.
> 
> Since we have the SASL libs under /usr/local (at least via sym
> links--don't ask), I left off the --with-sasl configure switch to
> see what that would do.
> 
> Okay, looks like when compiling managesieve.so and IMAP.so the
> -lsasl2 parameter is now being supplied.  Ah, the difference between
> this compile and the previous is that now -lsasl2 is provided,
> before only -L/usr/local/lib was provided.  So there is a problem with
> using the --with-sasl configure switch.  Though, because the logic for
> andrew_runpath_switch isn't being used, I suspect this will still
> blow up with unresolved references.  (Yeah, I can use crle that now
> exists on Solaris 8, but I hate to rely exclusively on that because
> if for some reason someone forgets to set that, everything will blow
> up horribly.  Besides, using -R is more efficient for loading since
> a search is not needed.)
> 
> While I'm on this, is there any way on this fair planet to get the
> cyradm script to go into some place other than INST_SCRIPT
> (/usr/local/bin)?  Since cyradm is more an administrative command, I
> would prefer to put it some place like /usr/local/sbin.  I thought
> I'd be clever (fat chance!) and just define INST_SCRIPT on the gmake
> command like during "gmake install".  However, what ends up
> happening is that cyradm goes into BOTH, what I specified on the
> command line and the default value for INST_SCRIPT.  Geez Louise.
> 
> Oh, and there's one other small issue that I came across: I had to
> change sieve/md5.c as follows:
> 
> *** md5.c._orig Tue Jan  4 22:51:51 2000
> --- md5.c       Sun Jan  6 00:28:43 2002
> ***************
> *** 29,37 ****
>   #include <sys/socket.h>
>   #include <netinet/in.h>
>   
> ! #include "md5global.h"
>   #include "md5.h"
> ! #include "hmac-md5.h"
>   
>   /* Constants for MD5Transform routine.
>   */
> --- 29,37 ----
>   #include <sys/socket.h>
>   #include <netinet/in.h>
>   
> ! #include "sasl/md5global.h"
>   #include "md5.h"
> ! #include "sasl/hmac-md5.h"
>   
>   /* Constants for MD5Transform routine.
>   */
> 
> Though, I don't know if this gets back to the problems with the
> --with-sasl configure switch or not.  Since I haven't noticed other

I got the above problem also, thats why in addition of those CFLAGS
above, before the compilation I also need to give
"-I/opt/cyrus/cyrus-sasl/include/sasl" too, otherwise it
won't compile ;(

In my problem right now is although the cyrus-imapd compiled and
successfully, it still lacking of the perl module, which I think when I
issued make install should be installed.
Actually the perl modules were installed, though it installed at 
[sol]/opt/cyrus/cyrus-imapd/lib> ls -ls
total 712
   1 drwxr-xr-x    3 root     other         512 Dec 29 23:06 5.6.1
  62 -rw-r--r--    1 root     other       62652 Dec 31 01:15 libacap.a
 648 -rw-r--r--    1 root     other      654400 Dec 31 01:15 libcyrus.a
   1 drwxr-xr-x    3 root     other         512 Dec 29 23:06 site_perl
[sol]/opt/cyrus/cyrus-imapd/lib>

which should be installed at /opt/perl/lib

When I compiled the perl modules manually, although I already added the
lib path for sasl2 and ssl at the LD_LIBRARY_PATH, and to Makefile.PL
file, it still complaints lacking of those library.
WriteMakefile(
    'NAME'      => 'Cyrus::IMAP',
    'ABSTRACT'  => 'Cyrus administrative interface',
    'VERSION_FROM' => 'IMAP.pm', # finds $VERSION
    'macro'     => {'IMCLIENT_LIBS' => ''},     # hack
    'clean'     => {'FILES' => 'libcyrperl.a cyradm'},
    'OBJECT'    => 'IMAP.o',
    'MYEXTLIB'  => '../../lib/libcyrus.a /opt/lib/libcrypto.a
/opt/lib/libssl.a',
    'LIBS'      => ["$SASL_LIB -lssl -lcrypto"],
    'DEFINE'    => '-DPERL_POLLUTE',     # e.g., '-DHAVE_SOMETHING'
    'INC'       => "-I../../lib $SASL_INC -I/opt/include
-I/opt/gnu/include -I/opt/cyrus/cyrus-sasl/include -R/opt/lib
-R/opt/gnu/lib -R/opt/cyrus/cyrus-sasl/lib",
    'EXE_FILES' => [cyradm],
);
[sol]:

[sol]: echo $LD_LIBRARY_PATH
/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/ccs/lib:/opt/gnu/lib:/opt/lib:/usr/ucblib:/opt/hpnp/lib:/opt/cyrus/cyrus-sasl/lib:/opt/cyrus/cyrus-sasl/lib/sasl2
[sol]: echo $SASL_PATH
/opt/cyrus/cyrus-sasl
[sol]:

[sol]: ls /opt/lib/*ssl*
/opt/lib/libssl.a
[sol]: ls /opt/lib/*crypt*
/opt/lib/libcrypto.a
[sol]:

[sol]: perl Makefile.PL
Note (probably harmless): No library found for -lsasl2
Note (probably harmless): No library found for -lssl
Note (probably harmless): No library found for -lcrypto
Writing Makefile for Cyrus::IMAP
[sol]: make
cc -c -I../../lib  -I/opt/include -I/opt/gnu/include
-I/opt/cyrus/cyrus-sasl/include -R/opt/lib -R/opt/gnu/lib
-R/opt/cyrus/cyrus-sasl/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-O   -DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -KPIC
-I/opt/perl/lib/5.6.1/sun4-solaris-ld/CORE -DPERL_POLLUTE IMAP.c
"IMAP.xs", line 496: warning: argument #2 is incompatible with
prototype:
        prototype: pointer to function(pointer to struct imclient {},
pointer to void, pointer to struct imclient_reply {pointer to char
Perl_keyword, long msgno, pointer to char text}) returning void :
"../../lib/imclient.h", line 85
        argument : pointer to void
Running Mkbootstrap for Cyrus::IMAP ()
chmod 644 IMAP.bs
rm -f blib/arch/auto/Cyrus/IMAP/IMAP.so
LD_RUN_PATH="" cc  -G -L/opt/gnu/lib -L/opt/SUNWspro/WS6U1/lib
-L/opt/SUNWspro/lib -R/opt/SUNWspro/lib IMAP.o
 -o blib/arch/auto/Cyrus/IMAP/IMAP.so ../../lib/libcyrus.a
/opt/lib/libcrypto.a /opt/lib/libssl.a
chmod 755 blib/arch/auto/Cyrus/IMAP/IMAP.so
cp IMAP.bs blib/arch/auto/Cyrus/IMAP/IMAP.bs
chmod 644 blib/arch/auto/Cyrus/IMAP/IMAP.bs
cp cyradm blib/script/cyradm
/usr/bin/perl -I/opt/perl/lib/5.6.1/sun4-solaris-ld
-I/opt/perl/lib/5.6.1 -MExtUtils::MakeMaker -e "MY->fixin(shift)"
blib/script/cyradm
Manifying blib/man3/Cyrus::IMAP.3
Manifying blib/man3/Cyrus::IMAP::Admin.3
Manifying blib/man1/cyradm.1
Manifying blib/man3/Cyrus::IMAP::IMSP.3
Manifying blib/man3/Cyrus::IMAP::Shell.3
[sol]:
[sol]: make test
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
-I/opt/perl/lib/5.6.1/sun4-solaris-ld -I/opt/perl/lib/5.6.1 -e 'use
Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/01-imclient.......Can't load 'blib/arch/auto/Cyrus/IMAP/IMAP.so' for
module Cyrus::IMAP: ld.so.1: /usr/bin/perl: fatal: relocation error:
file blib/arch/auto/Cyrus/IMAP/IMAP.so: symbol sasl_client_init:
referenced symbol not found at
/opt/perl/lib/5.6.1/sun4-solaris-ld/DynaLoader.pm line 206.
 at t/01-imclient.t line 49
Compilation failed in require at t/01-imclient.t line 49.
BEGIN failed--compilation aborted at t/01-imclient.t line 49.
t/01-imclient.......dubious
        Test returned status 255 (wstat 65280, 0xff00)
t/02-admin..........Can't load 'blib/arch/auto/Cyrus/IMAP/IMAP.so' for
module Cyrus::IMAP: ld.so.1: /usr/bin/perl: fatal: relocation error:
file blib/arch/auto/Cyrus/IMAP/IMAP.so: symbol sasl_client_init:
referenced symbol not found at
/opt/perl/lib/5.6.1/sun4-solaris-ld/DynaLoader.pm line 206.
 at blib/lib/Cyrus/IMAP/Admin.pm line 43
Compilation failed in require at blib/lib/Cyrus/IMAP/Admin.pm line 43.
BEGIN failed--compilation aborted at blib/lib/Cyrus/IMAP/Admin.pm line
43.
Compilation failed in require at t/02-admin.t line 49.
BEGIN failed--compilation aborted at t/02-admin.t line 49.
t/02-admin..........dubious
        Test returned status 255 (wstat 65280, 0xff00)
FAILED--2 test scripts could be run, alas--no output ever seen
make: *** [test_dynamic] Error 2
[sol]:

So what I'm doing wrong then in this case, or should I do to make it run ?

Thanks


> reports about this problem perhaps it is just something stupid that
> I'm doing.
> 
> -- 
> Amos

Reply via email to