Subject: [netatalk-admins] Solaris 2.6 problems :-(

From: Neil Morris <[email-masked]>
Date: Mon, 30 Nov 1998 16:34:15 +0000

I am trying to compile netatalk-1.4b2+asun2.1.0 on a Sparc 20 but have
encountered a number of problems:

i) 	redefinitions of msgdsize and allocb in ddptp_utls.c.

I solved this using the suggestion made by Robert J. Marinchick in a
posting earlier this year (23 Jan 1998) of commenting them out.

ii) 	the problem with nbp_util.c and "structure has no member name 'S_un'."

I commented out the definition of s_net in /usr/include/netinet/in.h (which
suggested that it was obsolete anyway).

iii) 	problems with flock.c:

flock.c:14: /usr/ucbinclude/sys/file.h: No such file or directory
make[3]: *** [flock.o] Error 1
make[3]: Leaving directory
`/opt/sources/software/netatalk/netatalk-1.4b2/libatalk/compat'
make[2]: *** [compat] Error 2
make[2]: Leaving directory
`/opt/sources/software/netatalk/netatalk-1.4b2/libatalk'
make[1]: *** [../../libatalk] Error 2
make[1]: Leaving directory
`/opt/sources/software/netatalk/netatalk-1.4b2/sys/solaris'
make: *** [all] Error 2

I changed the include statement as I don't have a /usr/ucbinclude/sys/file.h
#include </usr/include/sys/file.h>

when I try that I get the following:

flock.c: In function `flock':
flock.c:24: `LOCK_NB' undeclared (first use in this function)
flock.c:24: (Each undeclared identifier is reported only once
flock.c:24: for each function it appears in.)
flock.c:30: `LOCK_EX' undeclared (first use in this function)
flock.c:34: `LOCK_SH' undeclared (first use in this function)
flock.c:38: `LOCK_UN' undeclared (first use in this function)
make[3]: *** [flock.o] Error 1
make[3]: Leaving directory
`/opt/sources/software/netatalk/netatalk-1.4b2/libatalk/compat'
make[2]: *** [compat] Error 2
make[2]: Leaving directory
`/opt/sources/software/netatalk/netatalk-1.4b2/libatalk'
make[1]: *** [../../libatalk] Error 2
make[1]: Leaving directory
`/opt/sources/software/netatalk/netatalk-1.4b2/sys/solaris'
make: *** [all] Error 2

I have followed the procedure for compiling Solaris (i.e edit netconfig,
install driver) so am a bit flummoxed by the above. Does anyone know where
I am going wrong?

Cheers,

Neil

---

From: Neil Morris <[email-masked]>
Date: Mon, 30 Nov 1998 18:13:24 +0000

>encountered a number of problems:

Slight error there .... this was what happended when trying to compile
netatalk-1.4b2 not netatalk-1.4b2+asun2.1.0

The problem in iii) below went away when I defined LOCK_* as follows (taken
from /usr/ucbinclude/sys/file.h on a SunOS system)

/*
 * Flock call.
 */
#define LOCK_SH         1       /* shared lock */
#define LOCK_EX         2       /* exclusive lock */
#define LOCK_NB         4       /* don't block when locking */
#define LOCK_UN         8       /* unlock */

However they are defined in other functions as well and so fails elsewhere.

Are these definitions not present in Solaris? Is it OK to put these
definitions in? Is there an updated version of the header file I can use?

I have tried compiling netatalk-1.4b2+asun2.1.0 and that also fails with a
similar message:

ad_lock.c: In function `ad_flock_lock':
ad_lock.c:28: `LOCK_SH' undeclared (first use in this function)
ad_lock.c:28: (Each undeclared identifier is reported only once
ad_lock.c:28: for each function it appears in.)
ad_lock.c:28: `LOCK_EX' undeclared (first use in this function)
ad_lock.c:28: `LOCK_UN' undeclared (first use in this function)
ad_lock.c:30: `LOCK_NB' undeclared (first use in this function)
ad_lock.c: In function `ad_flock_tmplock':
ad_lock.c:96: `LOCK_EX' undeclared (first use in this function)
ad_lock.c:101: `LOCK_SH' undeclared (first use in this function)
ad_lock.c:101: `LOCK_UN' undeclared (first use in this function)
ad_lock.c:104: `LOCK_NB' undeclared (first use in this function)
make[3]: *** [ad_lock.o] Error 1
make[3]: Leaving directory
`/opt/sources/software/netatalk/netatalk-1.4b2+asun2.1.0/libatalk/adouble'
make[2]: *** [adouble] Error 2
make[2]: Leaving directory
`/opt/sources/software/netatalk/netatalk-1.4b2+asun2.1.0/libatalk'
make[1]: *** [../../libatalk] Error 2
make[1]: Leaving directory
`/opt/sources/software/netatalk/netatalk-1.4b2+asun2.1.0/sys/solaris'
make: *** [all] Error 2

I have put the definitions in the various places and it compiles OK (except
that there are a few #includes to /usr/ucbinclude/sys/file.h which needed
changing to /usr/include/sys/file.h). All I need to do now is see if afpd
works ... that can wait for another day ;-)

Neil

>I commented out the definition of s_net in /usr/include/netinet/in.h
>(which suggested that it was obsolete anyway).
>