Subject: Re: HELP: Compiling Pine on LINUX ?! Error ?!

From: Mark Crispin <[email-masked]>
Date: Sat, 13 Jan 1996 22:37:15 -0800

Try this patch: in pine3.91/imap/ANSI/c-client/os_lnx.c, change a line
which reads:
	#include <sys/socket.h>
to be:
	#define iovec blurdybloop
	#include <sys/socket.h>
	#undef iovec

Many versions of Linux have the wrong definition of struct iovec in
<sys/types.h>, so c-client defines it with the right definition.  In some
other versions of Linux, <sys/uio.h> defines struct iovec, and for some
reason <sys/uio.h> is included by <sys/socket.h>.

Linux is not for the faint-hearted.  There are many different variants of
Linux floating around, and it can be difficult to make source files that
compile correctly on every variant.  We make Pine compile correctly on the
variant that runs on our Linux boxes.  We do distribute pre-built binaries
for Linux, so if you have trouble in the future you may wish to use our
pre-built binary instead of dealing with sources.

On 13 Jan 1996, Martin Opitz wrote:

>
> Hi
>
> I use Linux & Kernel 1.3.33. I wanted to compile pine 3.91 on this
> system. I make a
>
> build clean
> build lnx
>
> Then it goes on but makes the following: (see below)
> (Something with this mysterious "c-client")
>
> Could anyone help me. I would like to use pine.
>
> Many Thanks !
> Martin
>
> --------------------------------------------------------------------------
>
> make args are "CC=cc"
>
> Making c-client library, mtest and imapd
> make build SYSTYPE=ANSI OS=lnx
> make[1]: Entering directory `/tmp/pine3.91/imap'
> echo lnx > OSTYPE
> rm -rf systype
> ln -s ANSI systype
> cd ANSI/c-client; make lnx
> make[2]: Entering directory `/tmp/pine3.91/imap/ANSI/c-client'
> make mtest OS=lnx EXTRADRIVERS="" \
> 	STDPROTO=bezerkproto \
> 	RSHPATH=/usr/bin/rsh CFLAGS="-g -O "
> make[3]: Entering directory `/tmp/pine3.91/imap/ANSI/c-client'
> ./drivers  imap nntp pop3 mh mtx tenex mmdf bezerk news phile dummy
> rm -f OSTYPE CFLAGS LDFLAGS osdep.h
>
> :
> :
>
> cc -g -O    -c misc.c -o misc.o
> cc -g -O  -DSTDPROTO=bezerkproto \
> -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:57:
> env_unix.c:206: 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:162: warning: passing arg 1 of `cpystr' discards `const' from pointer target type
> tcp_unix.c: In function `tcp_aopen':
> tcp_unix.c:225: warning: passing arg 1 of `cpystr' discards `const' from pointer target type
> make[3]: *** [osdep.o] Error 1
> make[3]: Leaving directory `/tmp/pine3.91/imap/ANSI/c-client'
> make[2]: *** [lnx] Error 2
> make[2]: Leaving directory `/tmp/pine3.91/imap/ANSI/c-client'
> make[1]: *** [build] Error 2
> make[1]: Leaving directory `/tmp/pine3.91/imap'
> make: *** [lnx] Error 2
>
> :
> :
>
> Making Pine.
>
> :
> :
>
> make[1]: Leaving directory `/tmp/pine3.91/pine/osdep'
> rm -f os.c
> ln -s osdep/os-lnx.c os.c
> cc -DLNX  -DSYSTYPE=\"LNX\"   -DDEBUG   -c os.c -o os.o
> os.c: In function `canonical_name':
> os.c:894: warning: return discards `const' from pointer target type
> make: *** No rule to make target `../c-client/c-client.a', needed by `pine'.  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
> 112340 	19944  	1444   	133728 	20a60  	bin/pico
> Done
> --
> _____________________________________________________________  /--i--\   . __
> | Martin Opitz - Internet: [email-masked]  ''''||\___/|  |
> | University of Frankfurt am Main, Germany (computer science)     ||o - o|  |
> |  "As to Gina winning her gamble...                              | /---\ \ |
> |   that's a secret between her and me."   Fio, "Porco Rosso"     E/^ ^ ^\W |
> `----------------------------------------------------------------  \m___m/ -'
>
>

-- 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.