I have imap 2.0.13 on Solaris 8 built with gcc and software from the
companion CDROM.

There are a number of things to look out for.

1) You should build your own copy of perl with gcc, the one supplied
with
Solaris expects Sun's cc compiler to be available. I built my own
copy of perl 5.6.0 and put it in /usr/local.

2) It is probably best not to have BerkeleyDB from the companion CDROM
installed if you compile your own version of BerkeleyDB.

3) cyrus-sasl-1.5.24 has a bug where it builds shared libraries
incorrectly.
I applied the following patch to the libtool file in cyrus-sasl-1.5.24
to
'fix' the problem in my case:

178c178
< archive_cmds="\$LD -G\${allow_undefined_flag} -h \$soname -o \$lib
\$libobjs \$deplibs \$linkopts"
---
> archive_cmds="gcc -shared -Wl,-h,\$soname -o \$lib \$libobjs \$deplibs \$linkopts"

(there should be a better fix).


4) The following files in cyrus-imap-2.0.13 need to be modified:
./perl/imap/Makefile.PL
./perl/sieve/acap/Makefile.PL
./perl/sieve/managesieve/Makefile.PL

- insert -L/usr/local/ssl/lib before -lssl (or the path
to where your OpenSSL libraries are installed.

For reference, 

I configured perl with:

sh Configure -de -Dcc=gcc

I configured SASL 1.5.24 with:

CC=gcc CPPFLAGS=-I/usr/local/BerkeleyDB.3.2/include
LDFLAGS=-L/usr/local/BerkeleyDB.3.2/lib ./configure

I configured Cyrus imapd 2.0.13 with:

CC=gcc CPPFLAGS=-I/usr/local/BerkeleyDB.3.2/include
LDFLAGS=-L/usr/local/BerkeleyDB.3.2/lib ./configure
--with-openssl=/usr/local/ssl --with-libwrap=/opt/sfw


Nick


kc wrote:
> 
> I'm using gcc to compile cyrus imapd 2.0.13 and although I had some
> minor problems with it not being able to find some libraries that I
> fixed by moving them into the main compile directory.
>  But now I'm stumped. The compile gets to a certain point and now wants
> cc...what am I doing wrong?
> 
> Here's a cut of the compile.
> gcc -c -I. -I.. -I../sieve -I. -I./../lib -I./../acap -I../acap
> -I./../et -I./../sieve -I/usr/local/include -DHAVE_CONFIG_H -g -O2 \
> ctl_deliver.c
> gcc -L/usr/local/lib -R/usr/local/lib  -g -O2 -o \
>  ctl_deliver ctl_deliver.o libimap.a ../acap/libacap.a ../lib/libcyrus.a
> -lsasl -ldl -lssl -lcrypto  -ldb  -lsocket -lnsl  ../et/libcom_err.a
> ### Making all in /usr/local/src/cyrus-imapd-2.0.13/imtest
> gcc -c -I. -I.. -I. -I./../lib -I./../et -I/usr/local/include
> -DHAVE_CONFIG_H -g imtest.c
> gcc -g -L/usr/local/lib -R/usr/local/lib -o imtest imtest.o
> ../lib/libcyrus.a -lsasl -ldl -lssl -lcrypto  -ldb  -lsocket -lnsl
> ### Making all in /usr/local/src/cyrus-imapd-2.0.13/perl
> (cd imap; \
>  SASL_LIB="-lsasl" SASL_INC="" CC="gcc" \
>    perl Makefile.PL PREFIX=/usr/local)
> Checking if your kit is complete...
> Looks good
> Warning: -L../../lib changed to
> -L/usr/local/src/cyrus-imapd-2.0.13/perl/imap/../../lib
> Note (probably harmless): No library found for -lsasl
> Note (probably harmless): No library found for -lssl
> Note (probably harmless): No library found for -lcrypto
> Writing Makefile for Cyrus::IMAP
> ### Making all in /usr/local/src/cyrus-imapd-2.0.13/perl/imap
> mkdir blib
> mkdir blib/lib
> mkdir blib/lib/Cyrus
> mkdir blib/arch
> mkdir blib/arch/auto
> mkdir blib/arch/auto/Cyrus
> mkdir blib/arch/auto/Cyrus/IMAP
> mkdir blib/lib/auto
> mkdir blib/lib/auto/Cyrus
> mkdir blib/lib/auto/Cyrus/IMAP
> mkdir blib/man1
> mkdir blib/man3
> cp IMAP/Shell.pm blib/lib/Cyrus/IMAP/Shell.pm
> cp IMAP.pm blib/lib/Cyrus/IMAP.pm
> cp IMAP/Admin.pm blib/lib/Cyrus/IMAP/Admin.pm
> cp IMAP/IMSP.pm blib/lib/Cyrus/IMAP/IMSP.pm
> /usr/bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503
> /usr/perl5/5.00503/ExtUtils/xsubpp  -typemap
> /usr/perl5/5.00503/ExtUtils/typemap -typemap typemap IMAP.xs >xstmp.c &&
> mv xstmp.c IMAP.c
> sh: cc: not found
> *** Error code 1
> make: Fatal error: Command failed for target `IMAP.o'
> Current working directory /usr/local/src/cyrus-imapd-2.0.13/perl/imap
> *** Error code 1
> make: Fatal error: Command failed for target `all'
> Current working directory /usr/local/src/cyrus-imapd-2.0.13/perl
> *** Error code 1
> make: Fatal error: Command failed for target `all'
> 
> Any thoughts? I've checked the individual make files and they seem to
> have the correct information and point to gcc.
> 
> you can direct replies to the list or email me at [EMAIL PROTECTED]
> 
> thanks in advance.
> 
> Kevin

Reply via email to