Subject: [netatalk-admins] Compiling netatalk on Solaris 7

From: Prentice Bisbal <[email-masked]>
Date: Wed, 29 Sep 1999 15:48:47 -0400

Has anyone been successful compiling netatalk on Solaris 7/SPARC? I am
attempting to do it with netatalk-1.4b2+asun2.1.3, and I haven't had much
luck. I should point out I am not an expert on compiling/linking and makefiles.

Solaris 7 has it's own DES libraries. The include file is /usr/include/des/des.h
The library files are

/usr/lib/libcrypt.a       /usr/lib/libcrypt.so.1    /usr/lib/libcrypt_i.so
/usr/lib/libcrypt.so      /usr/lib/libcrypt_i.a     /usr/lib/libcrypt_i.so.1

I woud like to compile netatalk using these files (if possible) instead of
compiling libdes into /usr/local. No real reason for this, other than I would
like to have only one set of DES libraries on the system.  It looks like even
if I specify DESDIR=/usr, make is looking on the wrong place for des.h. This
problem arises when trying to compile etc/afpd/auth.c. 

Any ideas? 

Here's what a make looks like for me:

make  DESTDIR=/usr/local/netatalk RESDIR=/etc/netatalk ETCDIR=/etc/netatalk TCPWRAPDIR=/usr/local
DESDIR=/usr

(skipping to relevant make output...)

if [ x"" != x ]; then \
    KRBLIBS="-lkrb -ldes"; \
    KRBLIBDIRS="-L/lib"; \
    KRBINCPATH="-I/include"; \
    KRBDEFS="-DKRB"; \
fi; \
if [ x"" != x ]; then \
    AFSLIBS="-lkauth -lprot -lubik -lauth -lsys -lrxkad -lrx -laudit \
        -llwp -lcmd -lcom_err /lib/afs/util.a -ldes"; \
    AFSLIBDIRS="-L/lib -L/lib/afs"; \
    AFSINCPATH="-I/include"; \
    AFSDEFS="-DAFS"; \
fi; \
if [ x"/usr" != x ]; then \
    DESLIBS="-ldes"; \
    if [ "/usr" != "/usr" ]; then \
      DESLIBDIRS="-L/usr/lib"; \
      DESINCPATH="-I/usr/include"; \
    fi; \
    DESDEFS="-DUAM_RNDNUM"; \
fi; \
if [ x"/usr/local" != x ]; then \
    TCPWRAPLIBS="-lwrap"; \
    if [ "/usr/local" != "/usr" ]; then \
      TCPWRAPLIBDIRS="-L/usr/local/lib"; \
    fi; \
fi; \
if [ x"/usr" != x ]; then \
    PAMLIBS="-lpam -ldl"; \
    if [ "/usr" != "/usr" ]; then \
      PAMLIBDIRS="-L/usr/lib"; \
      PAMINCPATH="-I/usr/include"; \
    fi; \
    PAMDEFS="-DUSE_PAM"; \
fi; \
if [ x"" != x ]; then \
    DB2LIBS="-ldb"; \
    if [ "" != "/usr" ]; then \
      DB2LIBDIRS="-L/lib"; \
      DB2INCPATH="-I/include"; \
    fi; \
fi; \
make  CC="gcc" ADDLIBS="-lsocket -lnsl" DEFS="-D__svr4__ -DSOLARIS -I../../sys/solaris" \
    OPTOPTS="-O" DESTDIR="/usr/local/netatalk" DESDIR="/usr" \
    SBINDIR="/usr/local/netatalk/etc" BINDIR="/usr/local/netatalk/bin" RESDIR="/etc/netatalk" \
    ETCDIR="/etc/netatalk" LIBDIR="/usr/local/netatalk/lib" INCDIR="/usr/local/netatalk/include" \
    PAMDIR="/usr" TCPWRAPDIR="/usr/local" \
    DB2DIR="" \
    KRBLIBS="${KRBLIBS}" KRBLIBDIRS="${KRBLIBDIRS}" \
    KRBINCPATH="${KRBINCPATH}" KRBDEFS="${KRBDEFS}" \
    AFSLIBS="${AFSLIBS}" AFSLIBDIRS="${AFSLIBDIRS}" \
    DESLIBS="${DESLIBS}" DESLIBDIRS="${DESLIBDIRS}" \
    PAMLIBS="${PAMLIBS}" PAMLIBDIRS="${PAMLIBDIRS}" \
    TCPWRAPLIBS="${TCPWRAPLIBS}" TCPWRAPLIBDIRS="${TCPWRAPLIBDIRS}" \
    DB2LIBS="${DB2LIBS}" DB2LIBDIRS="${DB2LIBDIRS}" \
    DESINCPATH="${DESINCPATH}" DESDEFS="${DESDEFS}" \
    PAMINCPATH="${PAMINCPATH}" PAMDEFS="${PAMDEFS}" \
    AFSINCPATH="${AFSINCPATH}" AFSDEFS="${AFSDEFS}" \
    DB2INCPATH="${DB2INCPATH}" \
    afpd
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O -I../../include        -DUSE_PAM -DAPPLCNAME  -c  unix.c
In file included from unix.c:13:
../../include/netatalk/endian.h:32: warning: redefinition of `int32_t'
/usr/include/sys/int_types.h:69: warning: `int32_t' previously declared here
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O -I../../include        -DUSE_PAM -DAPPLCNAME  -c  afs.c
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O -I../../include        -DUSE_PAM -DAPPLCNAME  -c  kuam.c
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O -I../../include        -DUSE_PAM -DAPPLCNAME  -c  send_to_kdc.c
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O -I../../include        -DUSE_PAM -DAPPLCNAME  -c  lifetime.c
In file included from lifetime.c:15:
../../include/netatalk/endian.h:32: warning: redefinition of `int32_t'
/usr/include/sys/int_types.h:69: warning: `int32_t' previously declared here
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O -I../../include        -DUSE_PAM -DAPPLCNAME  -c  ofork.c
In file included from ../../include/atalk/adouble.h:37,
                 from ofork.c:12:
../../include/netatalk/endian.h:32: warning: redefinition of `int32_t'
/usr/include/sys/int_types.h:69: warning: `int32_t' previously declared here
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O -I../../include        -DUSE_PAM -DAPPLCNAME  -c  main.c
In file included from main.c:20:
../../include/netatalk/endian.h:32: warning: redefinition of `int32_t'
/usr/include/sys/int_types.h:69: warning: `int32_t' previously declared here
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O -I../../include        -DUSE_PAM -DAPPLCNAME  -c  switch.c
In file included from ../../include/atalk/afp.h:28,
                 from switch.c:26:
../../include/netatalk/endian.h:32: warning: redefinition of `int32_t'
/usr/include/sys/int_types.h:69: warning: `int32_t' previously declared here
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O -I../../include        -DUSE_PAM -DAPPLCNAME  -c  auth.c
auth.c:145: des.h: No such file or directory
*** Error code 1
make: Fatal error: Command failed for target `auth.o'
Current working directory /u/pbisbal/source/netatalk-1.4b2+asun2.1.3/etc/afpd
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /u/pbisbal/source/netatalk-1.4b2+asun2.1.3/etc/afpd
*** Error code 1
make: Fatal error: Command failed for target `afpd'
Current working directory /u/pbisbal/source/netatalk-1.4b2+asun2.1.3/etc
*** Error code 1
make: Fatal error: Command failed for target `../../etc'
Current working directory /u/pbisbal/source/netatalk-1.4b2+asun2.1.3/sys/solaris
*** Error code 1
make: Fatal error: Command failed for target `all'

-- 
Prentice Bisbal
[email-masked]
Princeton Plasma Physics Lab
http://www.pppl.gov

---

From: Craig Robinson <[email-masked]>
Date: Thu, 30 Sep 1999 08:38:18 +1000

Prentice,
Try netatalk-990130.tar.gz found at 
http://sunsite.doc.ic.ac.uk/pub/packages/netatalk/.  I had lots of trouble 
getting 2.1.3 working (although it compiled fine), but this one worked 
perfectly first time (on an UltraSPARC 10).
Cheers, Craig
([email-masked])

-----Original Message-----
From:	Prentice Bisbal [SMTP:[email-masked]]
Sent:	Thursday, September 30, 1999 5:49 AM
To:	[email-masked]
Subject:	[netatalk-admins] Compiling netatalk on Solaris 7

Has anyone been successful compiling netatalk on Solaris 7/SPARC? I am
attempting to do it with netatalk-1.4b2+asun2.1.3, and I haven't had much
luck. I should point out I am not an expert on compiling/linking and 
makefiles.

Solaris 7 has it's own DES libraries. The include file is 
/usr/include/des/des.h
The library files are

/usr/lib/libcrypt.a       /usr/lib/libcrypt.so.1    /usr/lib/libcrypt_i.so
/usr/lib/libcrypt.so      /usr/lib/libcrypt_i.a 
    /usr/lib/libcrypt_i.so.1

I woud like to compile netatalk using these files (if possible) instead of
compiling libdes into /usr/local. No real reason for this, other than I 
would
like to have only one set of DES libraries on the system.  It looks like 
even
if I specify DESDIR=/usr, make is looking on the wrong place for des.h. 
This
problem arises when trying to compile etc/afpd/auth.c.

Any ideas?

make  DESTDIR=/usr/local/netatalk RESDIR=/etc/netatalk ETCDIR=/etc/netatalk 
TCPWRAPDIR=/usr/local
DESDIR=/usr

if [ x"" != x ]; then \
    KRBLIBS="-lkrb -ldes"; \
    KRBLIBDIRS="-L/lib"; \
    KRBINCPATH="-I/include"; \
    KRBDEFS="-DKRB"; \
fi; \
if [ x"" != x ]; then \
    AFSLIBS="-lkauth -lprot -lubik -lauth -lsys -lrxkad -lrx -laudit \
        -llwp -lcmd -lcom_err /lib/afs/util.a -ldes"; \
    AFSLIBDIRS="-L/lib -L/lib/afs"; \
    AFSINCPATH="-I/include"; \
    AFSDEFS="-DAFS"; \
fi; \
if [ x"/usr" != x ]; then \
    DESLIBS="-ldes"; \
    if [ "/usr" != "/usr" ]; then \
      DESLIBDIRS="-L/usr/lib"; \
      DESINCPATH="-I/usr/include"; \
    fi; \
    DESDEFS="-DUAM_RNDNUM"; \
fi; \
if [ x"/usr/local" != x ]; then \
    TCPWRAPLIBS="-lwrap"; \
    if [ "/usr/local" != "/usr" ]; then \
      TCPWRAPLIBDIRS="-L/usr/local/lib"; \
    fi; \
fi; \
if [ x"/usr" != x ]; then \
    PAMLIBS="-lpam -ldl"; \
    if [ "/usr" != "/usr" ]; then \
      PAMLIBDIRS="-L/usr/lib"; \
      PAMINCPATH="-I/usr/include"; \
    fi; \
    PAMDEFS="-DUSE_PAM"; \
fi; \
if [ x"" != x ]; then \
    DB2LIBS="-ldb"; \
    if [ "" != "/usr" ]; then \
      DB2LIBDIRS="-L/lib"; \
      DB2INCPATH="-I/include"; \
    fi; \
fi; \
make  CC="gcc" ADDLIBS="-lsocket -lnsl" DEFS="-D__svr4__ -DSOLARIS 
-I../../sys/solaris" \
    OPTOPTS="-O" DESTDIR="/usr/local/netatalk" DESDIR="/usr" \
    SBINDIR="/usr/local/netatalk/etc" BINDIR="/usr/local/netatalk/bin" 
RESDIR="/etc/netatalk" \
    ETCDIR="/etc/netatalk" LIBDIR="/usr/local/netatalk/lib" 
INCDIR="/usr/local/netatalk/include" \
    PAMDIR="/usr" TCPWRAPDIR="/usr/local" \
    DB2DIR="" \
    KRBLIBS="${KRBLIBS}" KRBLIBDIRS="${KRBLIBDIRS}" \
    KRBINCPATH="${KRBINCPATH}" KRBDEFS="${KRBDEFS}" \
    AFSLIBS="${AFSLIBS}" AFSLIBDIRS="${AFSLIBDIRS}" \
    DESLIBS="${DESLIBS}" DESLIBDIRS="${DESLIBDIRS}" \
    PAMLIBS="${PAMLIBS}" PAMLIBDIRS="${PAMLIBDIRS}" \
    TCPWRAPLIBS="${TCPWRAPLIBS}" TCPWRAPLIBDIRS="${TCPWRAPLIBDIRS}" \
    DB2LIBS="${DB2LIBS}" DB2LIBDIRS="${DB2LIBDIRS}" \
    DESINCPATH="${DESINCPATH}" DESDEFS="${DESDEFS}" \
    PAMINCPATH="${PAMINCPATH}" PAMDEFS="${PAMDEFS}" \
    AFSINCPATH="${AFSINCPATH}" AFSDEFS="${AFSDEFS}" \
    DB2INCPATH="${DB2INCPATH}" \
    afpd
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O 
-I../../include        -DUSE_PAM -DAPPLCNAME  -c  unix.c
In file included from unix.c:13:
../../include/netatalk/endian.h:32: warning: redefinition of `int32_t'
/usr/include/sys/int_types.h:69: warning: `int32_t' previously declared 
here
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O 
-I../../include        -DUSE_PAM -DAPPLCNAME  -c  afs.c
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O 
-I../../include        -DUSE_PAM -DAPPLCNAME  -c  kuam.c
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O 
-I../../include        -DUSE_PAM -DAPPLCNAME  -c  send_to_kdc.c
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O 
-I../../include        -DUSE_PAM -DAPPLCNAME  -c  lifetime.c
In file included from lifetime.c:15:
../../include/netatalk/endian.h:32: warning: redefinition of `int32_t'
/usr/include/sys/int_types.h:69: warning: `int32_t' previously declared 
here
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O 
-I../../include        -DUSE_PAM -DAPPLCNAME  -c  ofork.c
In file included from ../../include/atalk/adouble.h:37,
                 from ofork.c:12:
../../include/netatalk/endian.h:32: warning: redefinition of `int32_t'
/usr/include/sys/int_types.h:69: warning: `int32_t' previously declared 
here
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O 
-I../../include        -DUSE_PAM -DAPPLCNAME  -c  main.c
In file included from main.c:20:
../../include/netatalk/endian.h:32: warning: redefinition of `int32_t'
/usr/include/sys/int_types.h:69: warning: `int32_t' previously declared 
here
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O 
-I../../include        -DUSE_PAM -DAPPLCNAME  -c  switch.c
In file included from ../../include/atalk/afp.h:28,
                 from switch.c:26:
../../include/netatalk/endian.h:32: warning: redefinition of `int32_t'
/usr/include/sys/int_types.h:69: warning: `int32_t' previously declared 
here
gcc -D__svr4__ -DSOLARIS -I../../sys/solaris   -DUAM_RNDNUM -O 
-I../../include        -DUSE_PAM -DAPPLCNAME  -c  auth.c
auth.c:145: des.h: No such file or directory
*** Error code 1
make: Fatal error: Command failed for target `auth.o'
Current working directory 
/u/pbisbal/source/netatalk-1.4b2+asun2.1.3/etc/afpd
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory 
/u/pbisbal/source/netatalk-1.4b2+asun2.1.3/etc/afpd
*** Error code 1
make: Fatal error: Command failed for target `afpd'
Current working directory /u/pbisbal/source/netatalk-1.4b2+asun2.1.3/etc
*** Error code 1
make: Fatal error: Command failed for target `../../etc'
Current working directory 
/u/pbisbal/source/netatalk-1.4b2+asun2.1.3/sys/solaris
*** Error code 1
make: Fatal error: Command failed for target `all'