Subject: [netatalk-admins] error compiling netatalk-1.4b2+asun2.0a18.2

From: Rich Martin <[email-masked]>
Date: Mon, 6 Apr 1998 12:53:05 -0400

I downloaded the already-patched Netatalk/asun source from asun's FTP site
and decompressed it just fine. Since this is my first time doing this,
I thought I would do a 'dry run' before attempting a full-fledged install.
So I edited the toplevel Makefile, specifying a (nonexistant) directory
in my home tree. I assume the makefile will create that folder itself.
That was the only change I made, then I invoked 'make'. Things scrolled
merrily along (merrily we scroll along...) until:

make[4]: Entering directory
         `/home/rich/updates/netatalk-1.4b2+asun2.0a18.2/etc/afpd'
gcc     -DUAM_RNDNUM -O5 -fomit-frame-pointer -fsigned-char -Wunused
        -Wuninitialized -I../../include   -I/usr/local/include  -DUSE_PAM
        -DAPPLCNAME -DCRLF    -c unix.c -o unix.o
unix.c:63: sys/quota.h: No such file or directory
make[4]: *** [unix.o] Error 1
make[4]: Leaving directory
         `/home/rich/updates/netatalk-1.4b2+asun2.0a18.2/etc/afpd'
make[3]: *** [all] Error 2
make[3]: Leaving directory
         `/home/rich/updates/netatalk-1.4b2+asun2.0a18.2/etc/afpd'
make[2]: *** [afpd] Error 2
make[2]: Leaving directory
         `/home/rich/updates/netatalk-1.4b2+asun2.0a18.2/etc'
make[1]: *** [../../etc] Error 2
make[1]: Leaving directory
         `/home/rich/updates/netatalk-1.4b2+asun2.0a18.2/sys/linux'
make: *** [all] Error 2

whoops!

so, I do this:
$ locate quota.h
/usr/include/rpcsvc/rquota.h
/usr/src/linux-2.0.30/include/linux/quota.h

Now I figure if I make a symbolic link to this include file (or copy it),
unix.c will compile properly (and I'll be well on my way to my next compile
error) but how do I know where unix.c expects to find this #include? My
first guess was /home/rich/updates/netatalk-1.4b2+asun2.0a18.2/sys but that
did no good.

Any ideas? most of the compiling and linking options are mysterious to me.
PS: RedHat Linux 4.2 Pentium with netatalk-1.4b2 already installed

  -- Rich Martin                       --= [email-masked] =--
     Data Wrangler, Planet Interactive

---

From: Steven Bonneville <[email-masked]>
Date: Mon, 6 Apr 1998 13:22:29 -0500 (CDT)

> unix.c:63: sys/quota.h: No such file or directory

[...] 

> first guess was /home/rich/updates/netatalk-1.4b2+asun2.0a18.2/sys but that

I looked at the code of netatalk-1.4b2+asun2.0a18.2/etc/afpd/unix.c, and
the offending code is nested inside an "#ifdef linux" define block in 
there.  To make it compile, I had to either define NEED_QUOTACTL_WRAPPER
or comment out the line "#ifdef NEED_QUOTACTL_WRAPPER" and the lines for
the else statement and #endif for that block.

Then the compile selects linux/quota.h (from the kernel tree), among a
couple of other things.

  -- Steve Bonneville

---

From: Vivek <[email-masked]>
Date: Tue, 7 Apr 1998 10:05:58 +0100 (BST)

> make[4]: *** [unix.o] Error 1
[snip]
> PS: RedHat Linux 4.2 Pentium with netatalk-1.4b2 already installed

I think you need -DNEED_QUOTACTL_WRAPPERS [I think that's what it's
called: check the docs] I ran into the same thing here, and the define
sorted things out for me, AFAICT.

--
fsck -f -b 8193 /dev/cortex