Subject: Re: compiling 2.4 on solaris 2.6

From: Bob Luckin <[email-masked]>
Date: Tue, 4 Aug 98 22:10:57 CDT

Gregory said :-

> Koos, this used to be in the distribution kit, but has gotten lost some
> time ago.  A few years ago, it was also a FAQ.  While it dropped off for
> some time, it's re-emerged.  If it's not in the FAQ, how about adding it? 
> 
> On Tue, 4 Aug 1998, Yilmaz Oztanir wrote:
> 
> > > ftpd.c:1972: `typenames' undeclared (first use this function)
> > > ftpd.c:1974: `formnames' undeclared (first use this function)
> > > ftpd.c:1982: `strunames' undeclared (first use this function)
> > > ftpd.c:1982: `modenames' undeclared (first use this function)
> 
> > Back up a copy of the existing /usr/include/arpa/ftp.h Copy the
> > support/ftp.h file to /usr/include/arpa/ftp.h (i.e. the 'ftp.h' file
> > provided in th WU distribution in the 'support' directory). 

Actually, this _is_ in the INSTALL file for 2.4, which is what Yilmaz is
building.  It says :-

    If cc complains about strunames, typenames, modenames, ... being undefined
    you need to install support/ftp.h as /usr/include/arpa/ftp.h (always make
    a backup of the old ftp.h just in case!) and do the build again.  The new
    ftp.h should be a compatible superset of your existing ftp.h, so you
    shouldn't have problems with this replacement.

I had to do this when I built 2.4.  But this text has gone from the INSTALL
file included with 2.4.2-beta-16 (and presumably later versions).  And when I
built 2.4.2-beta-16 I did not have a problem, so I assumed it was fixed.
(However the ftp.h file was still included with the 2.4.2-beta-16 release...)

(I'm not sure if it was ever in the FAQ, since it was already in the INSTALL
file included with the release.)

But perhaps if Yilmaz gets the latest beta and builds that, his problem will
go away ?  (Or he could use the ftp.h file provided and build the 2.4
version, but this has known security holes...)

Cheers, Bob

---

From: Gregory A Lundberg <[email-masked]>
Date: Tue, 4 Aug 1998 23:25:24 -0400 (EDT)

On Tue, 4 Aug 1998, Bob Luckin wrote:

> But perhaps if Yilmaz gets the latest beta and builds that, his problem
> will go away ?  (Or he could use the ftp.h file provided and build the
> 2.4 version, but this has known security holes...) 

Maybe I'm wrong, but it seems to me that some people have been having the
problem with later betas.  It could be we're seeing a sudden spate of
people trying to build really really old distributions (like 2.4) though. 
Still, a couple words in the FAQ would help, especially since it'd been SO
long since I'd seen the errors; I had to go back to some 1994 postings to
the mailing list to find the mention of the fix in the old INSTALL file. 

----

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195

---

From: Koos van den Hout _U nix and we all_ <[email-masked]>
Date: Wed, 5 Aug 1998 12:28:19 +0200 (MET DST)

> some time, it's re-emerged.  If it's not in the FAQ, how about adding it? 

It's still in the FAQ.. I could make it a bit clearer.

    5. Compiling the wu-ftpd
       In general, editing src/pathnames.h and typing build arch
       should be enough.
         1. cc complains about strunames, typenames, modenames, .. being
            undeclared.
            This error is fully explained in the INSTALL/INSTALL.orig
            file in wu-ftpd package. A few relevant lines :

-- 
  Koos van den Hout,     Internetter, Unix freak, ISFJ and BBS SysOp at large
  [email-masked] (Work)                                Fax: +31-30-2586290
  [email-masked] (Home)                      Workphone: +31-30-2586287
  http://web.cetis.hvu.nl/~koos/   Looking for a license plate with "RFC 822"

---

From: Grant Beattie <[email-masked]>
Date: Tue, 04 Aug 1998 22:23:01 +1000

I'm trying to compile 2.4 on solaris 2.6 with gcc 2.7.2.3. Any help
would be appreciated. Here's what's happening:

grant@mygale# ./build sol CC=gcc
make args are : 
make opts are :  CC=gcc

Linking Makefiles.
ln: makefiles/Makefile.sol and Makefile are identical
ln: config/config.sol and config.h are identical
ln: makefiles/Makefile.sol and Makefile are identical

Making support library.
rm -f libsupport.a
ar cq libsupport.a fnmatch.o strcasestr.o strsep.o authuser.o
touch libsupport.a

Making ftpd.
gcc -g -DDEBUG -I.. -I../support -L../support  -c  ftpd.c
ftpd.c:143: conflicting types for `realpath'
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.7.2.3/include/stdlib.h:186: previous declaration of `realpath'
ftpd.c: In function `statcmd':
ftpd.c:1972: `typenames' undeclared (first use this function)
ftpd.c:1972: (Each undeclared identifier is reported only once
ftpd.c:1972: for each function it appears in.)
ftpd.c:1974: `formnames' undeclared (first use this function)
ftpd.c:1982: `strunames' undeclared (first use this function)
ftpd.c:1982: `modenames' undeclared (first use this function)
*** Error code 1
make: Fatal error: Command failed for target `ftpd.o'

---

From: Gregory A Lundberg <[email-masked]>
Date: Tue, 4 Aug 1998 09:18:27 -0400 (EDT)

----

---

From: Yilmaz Oztanir <[email-masked]>
Date: Tue, 04 Aug 1998 13:36:24 +0100

> make: Fatal error: Command failed for target `ftpd.o'

  What you need to do is edit the 'src/ftpd.c' file at lines 142/143. The original lines are

extern char *getline(),
 *realpath(char *pathname, char *result);

You need to add a const to the realpath declaration to give:

extern char *getline(),
 *realpath(const char *pathname, char *result);

Once you have done that, you should be okay, but the compiler may still give the typename/fornames stuff. If
this is the case, do the following things.

Back up a copy of the existing /usr/include/arpa/ftp.h
Copy the support/ftp.h file to /usr/include/arpa/ftp.h (i.e. the 'ftp.h' file provided in th WU distribution in
the
'support' directory).

That's how I got it to work.

Yilmaz