make: [aklog_main.o] Error 1

Douglas E. Engert deengert at anl.gov
Fri Oct 3 10:50:20 EDT 2003



James wrote:
> 
> I have unpacked "ak5log.20030606.tar" on a Mac 10.2.6
> system and am trying to recompile it and receiving the
> following error:

I have not tried it on a MAC. But it should work. 

> 
> % make
> gcc -O -g  -I/usr/build/@sys/include
> -I/usr/build/src/include
> -I/usr/build/@sys/include/krb5
> -I/usr/build/src/include/krb5
>  -I/usr/build/@sys/include/kerberosIV
> -I/usr/build/src/include/kerberosIV
> -I/Library/OpenAFS/Tools/include -g -DANLKRB5 -D
> NeXT -DANL_ONLY    -c -o aklog_main.o aklog_main.c

First of all take off the -DANL_ONLY this is a hack for our local
site.

> /Library/OpenAFS/Tools/include/rx/rx_queue.h:61:
> warning: redefinition of macro _Q
> /usr/include/ctype.h:83: warning: this is the location
> of the previous definition

The above looks like an AFS problem with the macro. I would ignore
it, as the ak5log shouldnot be using it. 

> aklog_main.c:108: conflicting types for `sys_errlist'
> /usr/include/stdio.h:266: previous declaration of
> `sys_errlist'
> aklog_main.c:113: warning: `_et_list' initialized and
> declared `extern'
> aklog_main.c: In function `auth_to_cell':
> aklog_main.c:263: warning: passing arg 4 of
> `get_cellconfig' from incompatible pointer type
> aklog_main.c: In function `add_hosts':
> aklog_main.c:810: warning: passing arg 1 of
> `gethostbyaddr' from incompatible pointer type
> make: *** [aklog_main.o] Error 1
> 
> Any tips on how to resolve it? The OpenAFS client is
> 1.2.10 and the Kerberos for Macintosh is 4.5.x which
> is based on MIT Kerberos v5 release 1.2.6.


Try the attached patch. It uses strerror rather then the
older sys_errlist. THe other warnings should not be a problem.

But if you have problems with the _et_list, try adding 
-DNO_ET_LIST to the SYSCFLAGS in the Makefile. 

If you get it to run, please send me a list of the changes you
had to make.

 --- aklog_main.c.orig   Fri Oct  3 09:32:15 2003
+++ aklog_main.c        Fri Oct  3 09:46:05 2003
@@ -104,10 +104,6 @@
 
 extern int errno;
 
-#if !defined(linux)
-extern char *sys_errlist[];
-#endif
-
 /* K5 and AFS both have a com_err, and we need this for the HPUX */
 #ifndef NO_ET_LIST
 extern struct et_list * _et_list = NULL; 
@@ -714,7 +710,7 @@
        if (link = (params.readlink(pathtocheck, linkbuf, 
                                    sizeof(linkbuf)) > 0)) {
            if (++symlinkcount > MAXSYMLINKS) {
-               sprintf(msgbuf, "%s: %s\n", progname, sys_errlist[ELOOP]);
+               sprintf(msgbuf, "%s: %s\n", progname, strerror(ELOOP));
                params.pstderr(msgbuf);
                params.exitprog(AKLOG_BADPATH);
            }
@@ -935,14 +931,14 @@
                 * a problem... 
                 */
                sprintf(msgbuf, "%s: stat(%s): %s\n", progname, 
-                       pathtocheck, sys_errlist[errno]);
+                       pathtocheck, strerror(errno));
                params.pstderr(msgbuf);
                return(AKLOG_BADPATH);
            }
            else if (! isdir) {
                /* Allow only directories */
                sprintf(msgbuf, "%s: %s: %s\n", progname, pathtocheck,
-                       sys_errlist[ENOTDIR]);
+                       strerror(ENOTDIR));
                params.pstderr(msgbuf);
                return(AKLOG_BADPATH);
            }


> 
> Thanks!
> 
> James
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
> _______________________________________________
> krbdev mailing list             krbdev at mit.edu
> https://mailman.mit.edu/mailman/listinfo/krbdev

-- 

 Douglas E. Engert  <DEEngert at anl.gov>
 Argonne National Laboratory
 9700 South Cass Avenue
 Argonne, Illinois  60439 
 (630) 252-5444


More information about the krbdev mailing list