On Mon, Jan 29, 2007 at 12:59:02PM +0000, Gareth Morris wrote:
> Hi there, i'm using Bill's Linux Qmail Toaster
> (http://www.shupp.org/toaster/index.php) to set up my mailserver. All
> has been well until the Courier part of the installation.
(If you have problems following those instructions, then probably your first
port of call should be the author of those instructions)
> I'm using courier-imap-4.1.0 and courier-authlib-0.58 in keeping with
> the toaster, however I have tried the latest versions of Courier and
> get the same error as below.
>
> Not sure if this is relevant - I struggled at first with compiling
> courier-authlib - i had to remove "-mtune=i686" and add "-lcrypt" to
> the CFLAGS line in the Makefile generated by ./configure in order to
> make it compile. I couldn't find anybody else who had that problem
> with authlib but I got there eventually.
If you posted the actual command lines you typed, and the actual errors
given by 'make', then it might have been possible to diagnose these
problems.
Actually, the string 'i686' doesn't occur anywhere in the courier-imap
source tree, so almost certainly this is something picked up from your build
environment (e.g. make.conf or CFLAGS/CPPFLAGS)
> Now when trying to compile courier-imap I am having trouble:
>
> # tar -xjf courier-imap-4.1.0
> # chown -R vpopmail:vchkpw courier-imap-4.1.0
> # cd courier-imap-4.1.0
> # su vpopmail
> $ umask 0022
> $ ./configure
> $ make
That's not necessary, you can just follow courier's instructions in
INSTALL.html
(1) Login as your normal uid (e.g. 'garethm' or whatever)
(2) untar as above
(3) configure
(4) make
(5) su root
(6) make install
(7) make install-configure
Job done. You don't need to be root, you don't need to change the source
code ownership to vpopmail nor to compile the code as vpopmail. I don't
think this is the cause of your problem though.
> Compiling mailboxlist.c
> mailboxlist.c:91: error: conflicting types for `maildir_shared_index_file'
> ../maildir/maildirnewshared.h:124: error: previous declaration of
> `maildir_shared_index_file'
That error shouldn't occur.
In courier-imap/imap/mailboxlist.c around line 91 I see:
const char *maildir_shared_index_file()
{
...
In courier-imap/maildir/maildirnewshared.h line 124 I see:
extern const char *maildir_shared_index_file();
So the first thing to do is to check you have exactly that too on your
system. If not, then maybe you've mixed and matched different bits or
different versions of courier-imap. rm -rf your entire source tree and untar
from scratch.
If they are the same as above, then those definitions are compatible and
should not generate any compiler error. However they are not strictly
ANSI-C, which would have (void) instead of ().
So my guess is you've inherited some more bad CFLAGS from your environment.
The solution is to clean up your environment, to the point where you no
longer have to make the manual changes you mentioned above when building
courier-authlib, and that will probably fix courier-imap as well.
Alternatively, maybe Slackware comes with some strange, very old or very new
version of gcc which doesn't work the same as most other people's
installation.
To isolate this program, paste the following into testprog.c:
/* Compile and run this program using:
* gcc -Wall -o testprog testprog.c
* ./testprog
*/
#include <stdio.h>
extern const char *maildir_shared_index_file();
int main(void)
{
printf("%s\n", maildir_shared_index_file());
return 0;
}
const char *maildir_shared_index_file()
{
return "OK!";
}
Then follow the instructions in the comment to build it. For me (running
Ubuntu 6.06):
[EMAIL PROTECTED]:~$ gcc -Wall -o testprog testprog.c
[EMAIL PROTECTED]:~$ ./testprog
OK!
[EMAIL PROTECTED]:~$
If it compiles and runs OK, this proves something wrong with your build
environment when building courier. Have a look at the CFLAGS which
./configure generates, and add them to the gcc command line one at a time,
if you really want to find the offending one. But better to start with a
clean environment in the first place.
Brian.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap