Subject: make errors in solaris

From: Nelson CHIN <[email-masked]>
Date: Mon, 29 Aug 1994 15:54:55 -0500 (CDT)

can someone help me with this, which i'm trying to build on a solaris:

Making Pine.
cc -DSV4   -g -DDEBUG -DSYSTYPE=\"SOL\"  -c  addrbook.c
"/usr/include/unistd.h", line 171: identifier redeclared: rename
        current : function(pointer to char, pointer to char) returning int
        previous: function(pointer to const char, pointer to const char) 
returning int : "/usr/include/stdio.h", line 112
"addrbook.c", line 2394: warning: semantics of ">" change in ANSI C; use 
explicit cast
"addrbook.c", line 2400: warning: semantics of ">" change in ANSI C; use 
explicit cast
"addrbook.c", line 2569: warning: semantics of "/" change in ANSI C; use 
explicit cast
"addrbook.c", line 2579: warning: semantics of "/" change in ANSI C; use 
explicit cast
"addrbook.c", line 2591: warning: semantics of "/" change in ANSI C; use 
explicit cast
"addrbook.c", line 3729: cannot recover from previous errors
cc: acomp failed for addrbook.c
*** Error code 2
make: Fatal error: Command failed for target `addrbook.o'

Links to executables are in bin directory:
size: bin/pine: cannot open
bin/mtest: 515008 + 26360 + 1904 = 543272
bin/imapd: 542656 + 28392 + 9084 = 580132
bin/pico: 124812 + 24604 + 8260 = 157676
Done

---

From: John Campbell <[email-masked]>
Date: Mon, 29 Aug 1994 20:45:47 -0700 (MST)

> returning int : "/usr/include/stdio.h", line 112

Here are some notes I wrote for pine3.89.  They probably apply to pine3.90 
as well (it's a solaris 2.3 bug--nothing wrong with pine):

7/27/94  jdc

To build pine, I had to modify <unistd.h> on this machine and remove
the prototype for rename().  The man page for rename says it is defined
in stdio.h, but the operating system had it defined in both places.

Build steps:

1) Edit <unisttd.h> and comment out rename() prototype.
 
. . .  (Not relevant to the discussion) . . .

So, try editing /usr/include/unistd.h on your machine and remove the
prototype for rename (it's already in /usr/include/stdio.h).  Then
complain to your vendor about this...
---
	John Campbell               [email-masked]
                                    [email-masked]

---

From: "Michael J. Sheppard" <[email-masked]>
Date: Tue, 30 Aug 1994 06:59:35 +0100 (BST)

Nelson,

>         previous: function(pointer to const char, pointer to const char) 

I had this problem and am using the binary I built after solving it.

The Solaris build is setup to use the BSD compatible compiler under 
Solaris 2.2. I have Solaris 2.3 and the SunPro ANSI Compiler. My system 
is configured so that the default 'cc' command is the ANSI one, this does 
not like addrbook.c at all. To get it to compile I forced it to use the 
BSD compiler by adding the following line to makefile.sol.

CC=/usr/ucb/bin

Using this pine builds without warnings.

BTW. Everything else builds fine with the ANSI compiler.

Regards,

Mike 

E-mail : [email-masked]
Voice  : +44.(0)61.232.9444
Fax    : +44.(0)61.232.9453

---

From: Keith Christopher <[email-masked]>
Date: Tue, 30 Aug 1994 09:38:43 -0400 (EDT)

Add the following line to CFLAGS= in the makefile.sol in the pine subdir

-Dconst=

Keith Christopher
Welch Medical Library
Unix System Adminstrator
---
http://tomahawk.welch.jhu.edu/keithc.html
---

"And what do you call assassins who accuse assassins anyway ?"
	"My friend."

-Marillion

---

---

From: Barry Cornelius <[email-masked]>
Date: Wed, 31 Aug 1994 10:30:38 +0100 (BST)

On Mon, 29 Aug 1994, Nelson CHIN wrote:
> ...

You will get these errrors if you are using Sun's C compiler.   You need 
to ensure that you are running Sun's C compiler with the -Xs option:
   cc -Xs -DSV4   -g -DDEBUG -DSYSTYPE=\"SOL\"  -c  addrbook.c

When compiling the Pine 3.90 distribution for SunOS 5.3 (a part of Solaris
2.3), I make sure that the setting of PATH includes a directory that 
contains a file called cc that contains the following script: 
   #!/bin/sh
   echo Using /opt/SUNWspro/bin/cc -Xs $*
   /opt/SUNWspro/bin/cc -Xs $*

--
Barry Cornelius                      Telephone: (0191 or +44 191) 374 4717
IT Service, Science Site,    IT Service Office: (0191 or +44 191) 374 2892   
University of Durham,                      Fax: (0191 or +44 191) 374 3741
Durham, DH1 3LE, UK                   E-mail: [email-masked]