Subject: Re: Problems building pine 3.94 with add'l info.

From: Mark Crispin <[email-masked]>
Date: Thu, 20 Jun 1996 22:56:34 -0700

Are you using unmodified Pine 3.94 sources?

I'm a bit surprised that you're having this problem, since it tends to
imply that your system has two definitions of iovec?!  [We no longer
define it as of 3.94]

-- Mark --

DoD #0105, R90/6 pilot, FAX: (206) 685-4045  ICBM: N 47 39'35" W 122 18'39"
Science does not emerge from voting, party politics, or public debate.

---

From: "Kevin S. Ford" <[email-masked]>
Date: Fri, 21 Jun 1996 11:11:55 GMT

> Are you using unmodified Pine 3.94 sources?

Yes.

> imply that your system has two definitions of iovec?!  [We no longer

Boy, that is strange.  Any ideas on how I can investigate this further?  
I've had a couple of problems building other software packages 
(xanim27062 and findutils-4.1), and I haven't figured out if the 
problem was also related to iovec, but by far the majority of packages 
that I install have no problems with the build.

I would really appreciate any suggestions...

> Science does not emerge from voting, party politics, or public debate.

___________________________________________________________________________
 Plan ahead.  Promote swift colonization of the solar system...  *First* 
____________________________________________
__________________

If you have a procedure with 10 parameters, you probably missed some.

_______________________
____________Kevin S Ford__________
[email-masked]

---

From: "Kevin S. Ford" <[email-masked]>
Date: Thu, 20 Jun 1996 17:55:16 GMT

Hi all-

I just wanted to see if anyone can tell me exactly what needs to be fixed
here.  At the bottom of this message is a copy of a message I posted to
usenet a couple of days ago with no response yet, and then I was browsing
the Pine Discussion Forum Archives and found a very similar problem so I
thought I'd include it for reference. 

The similar article follows immediately:

--------------

To: [email-masked] 
      Subject: Re: Help me compile PINE 3.92 for Linux 
      From: Mark Crispin <[email-masked]> 
      Date: Sat, 6 Apr 1996 16:35:11 -0800 
      In-Reply-To: <[email-masked]> 
      References: <[email-masked]> 
<[email-masked]> 
      Sender: [email-masked] 

It looks like you have an unusually broken variant of Linux that doesn't
prevent multiple includes of <sys/uio.h>.  Since there are almost as many
variants of Linux as there are Linux systems, I recommend that you either
run our prebuilt binaries or fix your /usr/include/sys/uio.h to have a
wrapper to prevent it from being included more than once.

We define iovec ourselves in the Linux port because older versions of
Linux have the wrong definition (a void * instead of a caddr_t).

On 6 Apr 1996, Martin Wickman wrote:

> On Thu, 04 Apr 1996 06:40:57 GMT, Martin Wickman 
> <[email-masked]> wrote:
> 
> Sorry for replying to my own post, but now I have returned to my beloved
> Linux box at home :-). Here's the errors that make produces. I hope it 
> makes
> sense to anyone. Again, please help me:
> 
> In file included from /usr/include/linux/socket.h:6,
>                  from /usr/include/sys/socket.h:5,
>                  from os_lnx.c:42:
> /usr/include/linux/uio.h:18: redefinition of `struct iovec'
> writev.c: In function `safe_writev':
> In file included from env_unix.c:68,
>                  from os_lnx.c:56:
> writev.c:63: warning: passing arg 2 of `writev' from incompatible 
> pointer type
[snipped for brevity]

------------------------

My problem is very similar, but that's not obvious from the paste that I
included in the original usenet message, because I didn't paste enough of
the output from make.  Here I correct that, and include what seems to be
the relevant output, and from this you'll see the similarity.  My question
is:  Exactly what do I need to do to fix this "unusually broken variant of
Linux that doesn't prevent multiple includes of <sys/uio.h>"???? 

Is it a library thing or what?  I ask not only because I would like to
build it on my system (sure, I know I could get the binary, but I'd really
rather build it -- it's a principle thing I guess), but also because I
seem to be suffering from a number of build problems in attempting to
install other software too, and if I have an "unusually broken variant of
Linux", then I'd like to fix it.

Anyway, here is the relevant output from make.  The reason that I pasted
all of it this time is that there are several serious-sounding compiler
warnings that occur before the mention of uio.h, and I was wondering if
they are indicative of other problems. 

Here it is:

darkstar:/usr2/local/src/pine3.94# build lnx
make args are "CC=cc "

ln: c-client: File exists
ln: imapd: File exists
Making c-client library, mtest and imapd
make build SYSTYPE=ANSI OS=lnx
make[1]: Entering directory `/usr2/local/src/pine3.94/imap'
echo lnx > OSTYPE
rm -rf systype
ln -s ANSI systype
cd ANSI/c-client; make lnx
make[2]: Entering directory `/usr2/local/src/pine3.94/imap/ANSI/c-client'
make mtest OS=lnx EXTRADRIVERS="" \
        STDPROTO=bezerkproto MAILSPOOL=/var/spool/mail \
        ACTIVEFILE=/usr/lib/news/active NEWSSPOOL=/var/spool/news \
        RSHPATH=/usr/bin/rsh CFLAGS="-g -O -DNFSKLUDGE "
make[3]: Entering directory `/usr2/local/src/pine3.94/imap/ANSI/c-client'
./drivers  imap nntp pop3 mh tenex mtx mmdf bezerk news phile dummy
rm -f CCTYPE CFLAGS LDFLAGS osdep.h
echo cc > CCTYPE
echo -g -O -DNFSKLUDGE  > CFLAGS
echo   > LDFLAGS
ln -s os_lnx.h osdep.h
cc -g -O -DNFSKLUDGE    -c mail.c -o mail.o
cc -g -O -DNFSKLUDGE    -c bezerk.c -o bezerk.o
cc -g -O -DNFSKLUDGE    -c mtx.c -o mtx.o
cc -g -O -DNFSKLUDGE    -c tenex2.c -o tenex2.o
cc -g -O -DNFSKLUDGE    -c mbox.c -o mbox.o
cc -g -O -DNFSKLUDGE    -c mh.c -o mh.o
mh.c: In function `mh_ping':
mh.c:810: warning: passing arg 3 of `scandir' from incompatible pointer type
mh.c:810: warning: passing arg 4 of `scandir' from incompatible pointer type
mh.c: In function `mh_append':
mh.c:1052: warning: passing arg 3 of `scandir' from incompatible pointer type
mh.c:1052: warning: passing arg 4 of `scandir' from incompatible pointer type
cc -g -O -DNFSKLUDGE    -c mmdf.c -o mmdf.o
cc -g -O -DNFSKLUDGE    -c imap2.c -o imap2.o
cc -g -O -DNFSKLUDGE    -c pop3.c -o pop3.o
cc -g -O -DNFSKLUDGE    -c news.c -o news.o
news.c: In function `news_open':
news.c:312: warning: passing arg 3 of `scandir' from incompatible pointer 
type
news.c:312: warning: passing arg 4 of `scandir' from incompatible pointer 
type
cc -g -O -DNFSKLUDGE    -c nntpcunx.c -o nntpcunx.o
cc -g -O -DNFSKLUDGE    -c phile.c -o phile.o
cc -g -O -DNFSKLUDGE    -c dummy.c -o dummy.o
cc -g -O -DNFSKLUDGE    -c smtp.c -o smtp.o
cc -g -O -DNFSKLUDGE    -c nntp.c -o nntp.o
cc -g -O -DNFSKLUDGE    -c rfc822.c -o rfc822.o
cc -g -O -DNFSKLUDGE    -c misc.c -o misc.o
cc -g -O -DNFSKLUDGE  -DSTDPROTO=bezerkproto 
-DMAILSPOOL=\"/var/spool/mail\" \
-DACTIVEFILE=\"/usr/lib/news/active\" -DNEWSSPOOL=\"/var/spool/news\" \
-DRSH=\"rsh\" -DRSHPATH=\"/usr/bin/rsh\" \
 -c os_lnx.c
In file included from /usr/include/linux/socket.h:6,
                 from /usr/include/sys/socket.h:5,
                 from os_lnx.c:42:
/usr/include/linux/uio.h:18: redefinition of `struct iovec'
env_unix.c: In function `env_init':
In file included from os_lnx.c:56:
env_unix.c:258: warning: passing arg 1 of `cpystr' discards `const' from 
pointer target type
tcp_unix.c: In function `tcp_open':
In file included from os_lnx.c:58:
tcp_unix.c:216: warning: passing arg 1 of `cpystr' discards `const' from 
pointer target type
tcp_unix.c: In function `tcp_aopen':
tcp_unix.c:293: warning: passing arg 1 of `cpystr' discards `const' from 
pointer target type
make[3]: *** [osdep.o] Error 1
make[3]: Leaving directory `/usr2/local/src/pine3.94/imap/ANSI/c-client'
make[2]: *** [lnx] Error 2
make[2]: Leaving directory `/usr2/local/src/pine3.94/imap/ANSI/c-client'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/usr2/local/src/pine3.94/imap'
make: *** [lnx] Error 2

Making Pico and Pilot
rm -f osdep.c
cp os_unix.c osdep.c
rm -f osdep.h
cp os_unix.h osdep.h
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE attach.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE ansi.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE basic.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE bind.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE browse.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE buffer.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE composer.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE display.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE file.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE fileio.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE line.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE osdep.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE pico.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE random.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE region.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE search.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE spell.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE tcap.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE window.c
cc -c  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE word.c
ar ru libpico.a attach.o ansi.o basic.o bind.o browse.o buffer.o 
composer.o display.o file.o fileio.o line.o osdep.o pico.o random.o 
region.o search.o spell.o tcap.o window.o word.o
ar: creating libpico.a
ranlib libpico.a
cc  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE main.c libpico.a  -ltermcap -o 
pico
cc  -g -Dlnx -DPOSIX -DJOB_CONTROL -DMOUSE pilot.c libpico.a  -ltermcap 
-o pilot

Making Pine.
rm -f os.h
ln -s osdep/os-lnx.h os.h
./cmplhlp2.sh  < pine.hlp > helptext.h
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c addrbook.c -o 
addrbook.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c adrbklib.c -o 
adrbklib.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c args.c -o args.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c context.c -o context.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c filter.c -o filter.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c folder.c -o folder.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c help.c -o help.o
./cmplhelp.sh  < pine.hlp > helptext.c
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c helptext.c -o 
helptext.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c imap.c -o imap.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c init.c -o init.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c mailcap.c -o mailcap.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c mailcmd.c -o mailcmd.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c mailindx.c -o 
mailindx.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c mailpart.c -o 
mailpart.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c mailview.c -o 
mailview.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c newmail.c -o newmail.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c other.c -o other.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c pine.c -o pine.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c reply.c -o reply.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c screen.c -o screen.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c send.c -o send.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c signals.c -o signals.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c status.c -o status.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c strings.c -o strings.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c ttyin.c -o ttyin.o
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c ttyout.c -o ttyout.o
cd osdep; make includer os-lnx.c; cd ..
make[1]: Entering directory `/usr2/local/src/pine3.94/pine/osdep'
cc -o includer includer.c
./includer < os-lnx.ic > os-lnx.c
make[1]: Leaving directory `/usr2/local/src/pine3.94/pine/osdep'
rm -f os.c
ln -s osdep/os-lnx.c os.c
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c os.c -o os.o
os.c: In function `canonical_name':
os.c:1013: warning: return discards `const' from pointer target type
os.c: In function `post_reap':
os.c:1740: warning: passing arg 2 of `waitpid' from incompatible pointer type
make: *** No rule to make target `../c-client/c-client.a'.  Stop.

Links to executables are in bin directory:
size: bin/pine: No such file or directory
size: bin/mtest: No such file or directory
size: bin/imapd: No such file or directory
text    data    bss     dec     hex     filename
262112  12288   2828    277228  43aec   bin/pico
262112  12288   2724    277124  43a84   bin/pilot
Done
darkstar:/usr2/local/src/pine3.94# 

Life is a POPULARITY CONTEST!  I'm REFRESHINGLY CANDID!!

_______________________

---------- Forwarded message ----------
Date: Wed, 19 Jun 1996 17:54:56 +0000
From: Kevin S. Ford <[email-masked]>
Newgroups: comp.mail.pine
Subject: Problems building pine 3.94

Can anyone offer pointers on what the problem is here and how to fix it?  
Here's what I did to compile:

1) dnld and untar/unzip from /usr2/local/src
2) read stuff.
3) said build clean
4) said build lnx

and this is what I got after the compiler chugged away for awhile:

<snip>
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c ttyout.c -o ttyout.o
cd osdep; make includer os-lnx.c; cd ..
make[1]: Entering directory `/usr2/local/src/pine3.94/pine/osdep'
cc -o includer includer.c
./includer < os-lnx.ic > os-lnx.c
make[1]: Leaving directory `/usr2/local/src/pine3.94/pine/osdep'
rm -f os.c
ln -s osdep/os-lnx.c os.c
cc   -g -DDEBUG  -DLNX -DSYSTYPE=\"LNX\" -DMOUSE   -c os.c -o os.o
os.c: In function `canonical_name':
os.c:1013: warning: return discards `const' from pointer target type
os.c: In function `post_reap':
os.c:1740: warning: passing arg 2 of `waitpid' from incompatible pointer type
make: *** No rule to make target `../c-client/c-client.a'.  Stop.

Links to executables are in bin directory:
size: bin/pine: No such file or directory
size: bin/mtest: No such file or directory
size: bin/imapd: No such file or directory
text    data    bss     dec     hex     filename
262112  12288   2828    277228  43aec   bin/pico
262112  12288   2724    277124  43a84   bin/pilot
Done
darkstar:/usr2/local/src/pine3.94# 

So it seems that pine, mtest, imapd were not built.

Any ideas?  Thanks!

I smell like a wet reducing clinic on Columbus Day!

_______________________

---

From: [email-masked] (M.Firoze Lafeer)
Date: Fri, 21 Jun 1996 22:16:21 GMT

Thanks for the info here, I was having the same problem compiling
pine3.94 on my brand new linux box. I installed the latest version of 
slackware from ftp.cc.gatech.edu last week, and this is the first
package I've tried to compile since then.

It turns out the "iovec" is defined in <sys/uio.h> AND in
<linux/uio.h> on my machine. As a matter of fact, there is a comment
in <linux/uio.h> that says you ought to remove the other definition.

So.. I just commented it out of <sys/uio.h> and #included
<linux/uio.h> within <sys/uio.h> (since it needs "struct iovec" later
on). 

Now, I'm not an expert in Linux, so I'm not sure if what I did is
smart or safe, but it works and now I'm using Pine 3.94 !

- Firoze Lafeer
[email-masked]