Subject: Re: Building PINE 3.91 on Solaris 2.4?

From: Marc Andersen SFE <[email-masked]>
Date: 27 Jun 1995 09:42:37 GMT

[email-masked] (Johan Henselmans) wrote:
>I don't seem to get it to work with sol2.4.
Understandable, sorry I forgot to mention a change in another file.
Here it goes, hopefully more succesfull. Note that I am using gcc, 2.3.3, and
may have different organisation of include files that you have. Here is what I
did:

0) This works only for pine, a similar problem exist for imapd.

1) Used the build script
      build CC=gcc sol

2) Edited the file pine/makefile.sol around line 80, by adding -DANSI,
   so it looks like this:
   
   # Use these for the gcc compiler
   # Yep, marc
   CC=	gcc
   CFLAGS=	-DSV4 $(OPTIMIZE) $(PROFILE) $(DEBUG) -DSYSTYPE=\"SOL\" -DANSI

3) Changed around line 194 from

BAD:    /*----------------- Are we ANSI?----------------------------------*/
BAD:    /* #define ANSI          /* this is an ANSI compiler */  
BAD:    #define	const		/* compiler doesn't support const */

    to
/*----------------- Are we ANSI? ---------------------------------------*/
/* Changed ma, using gcc which is ansi and understand const */
/* #define ANSI          /* this is an ANSI compiler */

#ifndef ANSI
#define	const		/* compiler doesn't support const */
#endif

4) In pine subdirectory
    make -f makefile.sol

If you want to track the error down, then try in the pine directory:

gcc -E -DSV4   -g -DDEBUG -DSYSTYPE=\"SOL\"  -c  addrbook.c | grep "rename(" 

This is the command issued from makefile.sol. The -E option sends the
preprocessor output to stdout, and grep rename searches for defintions of
rename.
Output is:

extern int      rename(const char *, const char *);
extern int rename(  char *,   char *);

Explaining
> /usr/local/lib/gcc-lib/sparc-sun-solaris2.4/2.7.0/include/unistd.h:225:
> conflicting types for `rename'
> /usr/local/lib/gcc-lib/sparc-sun-solaris2.4/2.7.0/include/stdio.h:153:
> previous declaration of `rename'

Marc Andersen
Department of Biostatistics, University of Copenhagen, Denmark
e-mail [email-masked], phone +45 35 32 79 04, fax +45 35 32 79 07