Subject: build s41 fails for ftp

From: [email-masked] (Mike Frizzell)
Date: Fri, 17 Feb 1995 13:35:52 -0600 (CST)

Hello, WU-FTP'ers,
This is my first post to this list.
I am trying to start an anonymous ftp server using wu-ftpd-2.4.tar.Z.
It's been uncompress'ed, and tar xvf'd.  I've more'd README and INSTALL.
I've gotten gcc mounted to the destination platform: SUN IPX SunOS 4.1.3 sun4c.
I had to use the support/ftp.h to get past the complaints "about strunames, 
typenames, modenames", but now when I run "build s41" I get "conflicting 
types for `malloc' and  `realloc'" due to "previous declaration of" the same. 
Please see transcript and error message below:

# build s41
Making ftpd.
gcc -g -DDEBUG -I.. -I../support -L../support  -target sun4 -c  ftpd.c
yacc  ftpcmd.y
mv y.tab.c ftpcmd.c
gcc -g -DDEBUG -I.. -I../support -L../support  -target sun4 -c  ftpcmd.c
In file included from config.h:21, from ftpcmd.c:47:
/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/malloc.h:41: conflicting types for `malloc'
ftpcmd.c:1: previous declaration of `malloc'
/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/malloc.h:42: conflicting types for `realloc'
ftpcmd.c:1: previous declaration of `realloc'
*** Error code 1
make: Fatal error: Command failed for target `ftpcmd.o'

What can I do to get past this "hitch in my git-along"?

Regards,
Mike
 
 |    |'Michael, row    ()     ___|
 |\  /| the boat ashore'||    |     [email-masked]   |  |
 |_\/ | _)  |     _     ||    ___| '__) _) ___  ___   _    |  |
 |    |  |  __/    _)  (())   |    |     |   /    /    _)  |  |
 |    |  |  | \   \    /||\   |    |     |  /    /    \    |  |
_|   _|  | _| _\  __|  \__/  _|   _|    _| ___| ___|  __| _| _|
There's a guru for every question. It's just a matter of
finding the right newsgroup.

---

From: Vidiot <[email-masked]>
Date: Fri, 17 Feb 1995 15:42:28 -0600 (CST)

There have been many messages flying around about dir and ls -l not working
because the ls program is dynamically linked and certain files were not
copied over into the ~ftp area.

I don't remember if the following script came with the wu-ftp program or if
I got it later, but if used, it will set up your anonftp area for you.
The only thing wrong with it is that it set the permission of the incoming
directory incorrectly, so not only couldn't you read what is in there, but
a user couldn't put anything there either.  It is a big help in getting the
area set up from a scratch ftp install.  It is set below for 722, I ultimately
needed 733.

Oh ya, something else.  If you recompiled your libc.so with the resolver 2.1+
stuff and you renamed the old versions, be careful, the following script
grabbed the wrong version of my stuff and installed it.

I hope this is useful for someone.  I have no idea who originally wrote it.

MB
-- 
System Administrator - Extrel FTMS - Madison WI.
e-mail: [email-masked]
phone: (608) 273-8262  fax: (608) 273-8719  voice-mail: (800) 426-6488 ext 6293
Visit - http://www.ftms.com/vidiot/  (Your link to the world of Star Trek)

Name of script: Installing_Anonymous_FTP.sh

#!/bin/sh

# Set this to whoever will maintain your ftp site. root is probably a good bet.
# Your username is another possibility.  ftp is NOT!  No directories or files
# inside ~ftp should be owned by ftp.
YOU=root

# No other parameters should need to be changed

# Get the UID of YOU and ftp
YOUUID=`grep "^$YOU:" /etc/passwd | cut -d: -f3`
if [ "x" = "x$YOUUID" ]; then
  echo User $YOU not found
  exit
fi
FTPDIR=`grep "^ftp:" /etc/passwd | cut -d: -f6`
if [ "x" = "x$FTPDIR" ]; then
  echo ftp home directory not found
  exit
fi

# Find the correct libc.so and libdl.so
LIBC=`ls /usr/lib/libc.so.* | tail -1`
LIBDL=`ls /usr/lib/libdl.so.* | tail -1`

install -d -o $YOU -g wheel -m 755 $FTPDIR
cd $FTPDIR
install -d -o root -g wheel -m 555 bin
install    -o root -g wheel -m 111 /usr/bin/ls bin
install -d -o root -g wheel -m 555 dev
install -d -o root -g wheel -m 555 etc
install -d -o $YOU -g wheel -m 722 incoming
install -d -o $YOU -g wheel -m 755 pub
install -d -o root -g wheel -m 555 usr
install -d -o root -g wheel -m 555 usr/lib
install    -o root -g wheel -m 555 /usr/lib/ld.so  usr/lib
install    -o root -g wheel -m 555 $LIBC usr/lib
if [ "x" != "x$LIBDL" ]; then
install    -o root -g wheel -m 555 $LIBDL usr/lib
fi
install -d -o root -g wheel -m 555 usr/share
install -d -o root -g wheel -m 555 usr/share/lib
install -d -o root -g wheel -m 555 usr/share/lib/zoneinfo
install    -o root -g wheel -m 444 /usr/share/lib/zoneinfo/localtime usr/share/lib/zoneinfo

mknod dev/zero c 3 12
chown root.wheel dev/zero
chmod 444 dev/zero

echo "wheel:*:0:" >etc/group
chown root.wheel etc/group
chmod 444 etc/group

echo "root:*:0:0:::" >etc/passwd
if [ $YOUUID != 0 ]; then
echo "ftpadmin:*:$YOUUID:0:::" >>etc/passwd
fi
chown root.wheel etc/passwd
chmod 444 etc/passwd

exit