Subject: wu-FTP compile on Solaris2.5+gcc2.7.0

From: "Y.Hariyama" <[email-masked]>
Date: Thu, 5 Dec 1996 15:41:13 +0900

I have a problem to compile wu-FTP2.4.

My machine & system
Sun SS5 compatible + Solaris 2.5
gcc 2.7.0

My procedure
1:I got wu-FTP2.4 from ftp site and spreded out.

2:I edited src/pathnames.h
  #define _PATH_FTPUSERS  "/etc/ftpusers"
  #define _PATH_FTPACCESS "/usr/local/etc/ftpaccess"
  #define _PATH_EXECPATH  "/bin/ftp-exec"
  #define _PATH_PIDNAMES  "/usr/local/daemon/ftpd/ftp.pids-%s"
  #define _PATH_CVT       "/usr/local/etc/ftpconversions"
  #define _PATH_XFERLOG   "/var/log/xferlog"
  #define _PATH_PRIVATE   "/etc/ftpgroups"

  #ifndef _PATH_UTMP
  #define _PATH_UTMP      "/var/adm/utmp"
  #define _PATH_WTMP      "/var/adm/wtmp"
  #define _PATH_LASTLOG   "/usr/adm/lastlog"
  #endif

  #define _PATH_BSHELL    "/bin/sh"
  #define _PATH_DEVNULL   "/dev/null"

  #ifdef  HOST_ACCESS
  #define _PATH_FTPHOSTS  "/usr/local/etc/ftphosts"
  #endif

3:I edited src/Makefile & support/Makefile, changed cc to gcc.

4:I copyed support/ftp.h to /usr/include/arpa/ftp.h 

5:./build sol command.
  mail2# !!
  ./build sol
  make args are :
  make opts are :

  Linking Makefiles.
  
  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:182: `MAXHOSTNAMELEN' undeclared here (not in a function)
  ftpd.c:183: `MAXHOSTNAMELEN' undeclared here (not in a function)
  ftpd.c:184: `MAXHOSTNAMELEN' undeclared here (not in a function)
  ftpd.c:194: `MAXHOSTNAMELEN' undeclared here (not in a function)
  ftpd.c:195: `MAXHOSTNAMELEN' undeclared here (not in a function)
  ftpd.c: In function `user':
  ftpd.c:725: `MAXHOSTNAMELEN' undeclared (first use this function)
  ftpd.c:725: (Each undeclared identifier is reported only once
  ftpd.c:725: for each function it appears in.)
  *** Error code 1
  make: Fatal error: Command failed for target `ftpd.o'

  Making ftpcount.
  gcc -g -DDEBUG -I.. -I../support -L../support -o ftpcount ftpcount.c
vers.o     -lsu
  pport -lsocket -lnsl -lgen
  gcc: vers.o: No such file or directory
  *** Error code 1
  make: Fatal error: Command failed for target `ftpcount'

  Making ftpshut.
  gcc -g -DDEBUG -I.. -I../support -L../support -o ftpshut ftpshut.c vers.o
-lsupp
  ort -lsocket -lnsl -lgen
  gcc: vers.o: No such file or directory
  *** Error code 1
  make: Fatal error: Command failed for target `ftpshut'

  Making ckconfig.
  `ckconfig' is up to date.

  Links to executables are in bin directory:
  size: bin/ftpd: cannot open
  size: bin/ftpcount: cannot open
  size: bin/ftpshut: cannot open
  size: bin/ftpwho: cannot open
  bin/ckconfig: 3656 + 1769 + 327 = 5752
  Done

So, I can't compile wu-FTP2.4 complete.

Please inform me about true procedure.

**********************************************************************
          ( Yoshiyuki Hariyama ) | E-Mail : [email-masked]
FastNet, Inc.  INTERNET Project  | URL    : http://www.fine.ad.jp
TEL     : +81-45-476-5261        | Meguro Build. 3-22-5, Sin-yokohama
FAX     : +81-45-476-3489(G4/G3) | Kouhoku-ku,  Yokomaha  222, Japan
**********************************************************************

---

From: Alain Magloire <[email-masked]>
Date: Thu, 5 Dec 1996 11:32:04 -0500 (EST)

> 2:I edited src/pathnames.h

[..deleted..]

> 4:I copyed support/ftp.h to /usr/include/arpa/ftp.h 
[..deleted..]
>   ftpd.c:182: `MAXHOSTNAMELEN' undeclared here (not in a function)

[..deleted..]

> Please inform me about true procedure.

Well it looks like MAXHOSTNAMELEN  is not defined !! ;-)
Usually on Solaris it's defined in 

/usr/include/netdb.h
Unless you destroy it by installing BIND

To remedy you can add to ftpd.c
#define MAXHOSTNAMELEN 256

or get the latest beta release of wu-ftpd. The problem
is fixed.

You can get the beta release on .... ???
wait let me get `Michael Brennen' email !!
Damn deleted !! Well it's in the FAQ somewhere...
Don't ask me where's the FAQ :(

BTW I would not do step 4, leave the OS headers
alone.

--
alain