--On Monday, March 05, 2001 10:44 AM +1000 David Richards
<[EMAIL PROTECTED]> wrote:
> I am having problems getting v2.0.12 to compile on Compaq Tru64 v5.1. I
> have gone to quite extensive means to try and make it compile.
Yes, I have had similar problems, but given time, I was able to work most
of these out. I will try to help you as much as I can.
> I searched the mail list archives and found a posting from Ron Roskens
> on 3 Jun, 2000 which suggested something like:
>
> [CONFIGURATION STUFF DELETED]
>
First, I created a RUNME script that contained all the necessary stuff.
It even saves the output to a file for later reference. The most important
aspect of the script is that it does set the environment properly to detect
the BerkeleyDB library, and it sets the necessary compile time flags to
make sure the executable can find the libraries at run-time.
Without further ado, here is the script:
#!/bin/ksh
LOCAL="/usr/local"
BERKELEY="/usr/local/BerkeleyDB.3.2"
rm -f config.status config.log
rm -f configure.output make.output
export CC=cc
export CFLAGS="-g -I$LOCAL/include -I$BERKELEY/include"
export LDFLAGS="-lpthread -L$LOCAL/lib -Wl,-rpath,$LOCAL/lib \
-L$BERKELEY/lib -Wl,-rpath,$BERKELEY/lib"
./configure --with-dbdir=$BERKELEY \
--with-openssl=/usr/local/ssl \
--with-sasl=/usr/local \
--disable-sieve \
--without-agentx \
--without-zephyr \
| tee configure.output
> Then I edited the 'imap/Makefile' and added to the DEPLIBS variable the
> value '/usr/local/BerkeleyDB.3.0/lib/libdb.a' then the thing actually
> compiled. But I got the error:
With the above configuration, you shouldn't have to do this... in fact,
I would start over with freshly unpackaged sources. By the way, I noticed
you were using "--with-sasldir" instead of "--with-sasl". The sasldir
one does not exist in 2.0.12 from what I can see with configuration help.
>From the help, the following is listed:
--with-sasl=DIR Compile with libsasl in <DIR>
> Don't know how to make 'BUILTSOURCES'
This one is easy. Edit imap/Makefile.in and go to line 114, which is the
PROGS section. You will see the following for the PROGS section, as well
as the following BUILTSOURCES section:
PROGS = imapd lmtpd pop3d \
fud reconstruct quota \
mbpath ipurge deliver \
ctl_mboxlist ctl_deliver \
@IMAP_PROGS@
BUILTSOURCES = imap_err.h pushstats.h lmtpstats.h
The problem is that @IMAP_PROGS@ is empty after configuration, which means
the line turns into a blank line. The Make program on Compaq simply sees
something like the following:
ctl_mboxlist ctl_deliver \
BUILTSOURCES = imap_err.h pushstats.h lmtpstats.h
This makes the BUILTSOURCES section look like it is part of the PROGS
section, which is not even in a correct Makefile format. In any the case,
it causes an error.
The solution is to combine @IMAP_PROGS@ with the previous line and remove
the backslash:
PROGS = imapd lmtpd pop3d \
fud reconstruct quota \
mbpath ipurge deliver \
ctl_mboxlist ctl_deliver @IMAP_PROGS@
BUILTSOURCES = imap_err.h pushstats.h lmtpstats.h
Since this is done in Makefile.in, it will persist through all your
configuration runs (since Makefile will be created properly). I will be
sending in a patch to fix this issue. Some "makes" handle this better
than others... but it doesn't hurt to do the above to make it work with
them all.
> So, I gave up. To me it seems like a problem with the Compaq linker
> 'ld'. I am off to install gcc and see how that goes, I will respond to
> this posting (for archives sake) to say what happens. In the meantime,
> if anyone has any pointers for me could you please let me know.
My suggestion is to try the above recipe using CC and not GCC. CC will
produce much better code on Compaq than what GCC will. Also, I recommend
moving to BerkeleyDB 3.2 or something higher than 3.0. Of course, if you
are simply upgrading your IMAP server, you may be commited to 3.0 and may
not want to upgrade your databases, but still, I recommend upgrading.
Incidentally, the above recipe works fine on 5.0a. I haven't had the
opportunity to try it on 5.1 yet, but I know I will be in the near future.
Good luck!
Scott
--
+-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-+
Scott W. Adkins http://www.cns.ohiou.edu/~sadkins/
UNIX Systems Engineer mailto:[EMAIL PROTECTED]
ICQ 7626282 Work (740)593-9478 Fax (740)593-1944
+-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-+
CNS, HDL Center, Suite 301, Ohio University, Athens, OH 45701-2979