[OpenAFS-devel] JUAFS Makefile missing key defines?

Chaz Chandler clc31@inbox.com
Wed, 10 Feb 2010 13:06:30 -0800


Has anyone else noticed that the JUAFS makefile isn't pulling in all the =
defines it should?  The biggest one I've noticed is it isn't defining the =
platform, but even when I do that manually or add it to the Makefile's =
DEFINES, I'm getting strange errors in bits of code pulled in from other =
directories which normally compile fine...so I'm guessing there are other =
defines left out as well.  I've included the errors below.

I'm not really concerned about getting JUAFS to work (I don't use it and =
IRIX doesn't have anything newer than java 1.4 anyway), but it is part of =
the default compile.  So this is not about getting JUAFS working, rather =
it's about getting the default compile working again.

Without ensuring -DAFS_SGI_ENV (JUAFS/Makefile has=20
=22DEFINES=3D-D_SGI_MP_SOURCE -DKERNEL -DUKERNEL=22):
<pre>
cc -I. -I.. -I../nfs -I/usr/people/clc31/src/openafs-git/src =
-I/usr/people/clc31/src/openafs-git/src/afs =
-I/usr/people/clc31/src/openafs-git/src/afs/UKERNEL =
-I/usr/people/clc31/src/openafs-git/src/config =
-I/usr/people/clc31/src/openafs-git/src/rx =
-I/usr/people/clc31/src/openafs-git/src/rx/UKERNEL =
-I/usr/people/clc31/src/openafs-git/src/rxkad =
-I/usr/people/clc31/src/openafs-git/src/rxkad/domestic =
-I/usr/people/clc31/src/openafs-git/src/util =
-I/usr/people/clc31/src/openafs-git/src =
-I/usr/people/clc31/src/openafs-git/src/afs/UKERNEL =
-I/usr/people/clc31/src/openafs-git/src/afs =
-I/usr/people/clc31/src/openafs-git/src/util =
-I/usr/people/clc31/src/openafs-git/src/rxkad =
-I/usr/people/clc31/src/openafs-git/src/config =
-I/usr/people/clc31/src/openafs-git/src/fsint =
-I/usr/people/clc31/src/openafs-git/src/vlserver =
-I/usr/people/clc31/src/openafs-git/src/libuafs =
-I/usr/people/clc31/src/openafs-git/include =
-I/usr/people/clc31/src/openafs-git/include/afs  -O -DKERNEL =
-DAFS_WEB_ENHANCEMENTS -I. -I.. =
-I/usr/people/clc31/src/openafs-git/src/config -I/usr/include/sys/fs =
-D_SGI_MP_SOURCE -DKERNEL -DUKERNEL   -c =
/usr/people/clc31/src/openafs-git/src/afs/afs_dcache.c
cc-1029 cc: ERROR File =3D =
/usr/people/clc31/src/openafs-git/src/afs/afs_dcache.c, Line =3D 115
  An expression is expected at this point.

      .open     =3D osi_UFSOpen,
      =5E
=2E..
20 errors detected in the compilation of =
=22/usr/people/clc31/src/openafs-git/src/afs/afs_dcache.c=22.
gmake=5B4=5D: *** =5B../JUAFS/afs_dcache.o=5D Error 2
gmake=5B4=5D: Leaving directory =
=60/usr/people/clc31/src/openafs-git/src/libuafs/JUAFS'
</pre>

Which, when you look at the code, is because AFS_SGI_ENV is not defined =
and so the wrong bit of code is being compiled.  Yes, I checked, it's not =
because __c99 is not defined.

Now, with the addition of -DAFS_SGI_ENV to JUAFS/Makefile as:
=22DEFINES=3D-D_SGI_MP_SOURCE -DKERNEL -DUKERNEL -DAFS_SGI_ENV=22
I get:
<pre>
cc -I. -I.. -I../nfs -I/usr/people/clc31/src/openafs-git/src =
-I/usr/people/clc31/src/openafs-git/src/afs =
-I/usr/people/clc31/src/openafs-git/src/afs/UKERNEL =
-I/usr/people/clc31/src/openafs-git/src/config =
-I/usr/people/clc31/src/openafs-git/src/rx =
-I/usr/people/clc31/src/openafs-git/src/rx/UKERNEL =
-I/usr/people/clc31/src/openafs-git/src/rxkad =
-I/usr/people/clc31/src/openafs-git/src/rxkad/domestic =
-I/usr/people/clc31/src/openafs-git/src/util =
-I/usr/people/clc31/src/openafs-git/src =
-I/usr/people/clc31/src/openafs-git/src/afs/UKERNEL =
-I/usr/people/clc31/src/openafs-git/src/afs =
-I/usr/people/clc31/src/openafs-git/src/util =
-I/usr/people/clc31/src/openafs-git/src/rxkad =
-I/usr/people/clc31/src/openafs-git/src/config =
-I/usr/people/clc31/src/openafs-git/src/fsint =
-I/usr/people/clc31/src/openafs-git/src/vlserver =
-I/usr/people/clc31/src/openafs-git/src/libuafs =
-I/usr/people/clc31/src/openafs-git/include =
-I/usr/people/clc31/src/openafs-git/include/afs  -O -DKERNEL =
-DAFS_WEB_ENHANCEMENTS -I. -I.. =
-I/usr/people/clc31/src/openafs-git/src/config -I/usr/include/sys/fs =
-D_SGI_MP_SOURCE -DKERNEL -DUKERNEL -DAFS_SGI_ENV   -c =
/usr/people/clc31/src/openafs-git/src/afs/afs_daemons.c
cc-1204 cc: WARNING File =3D =
/usr/people/clc31/src/openafs-git/src/afs/afs_prototypes.h, Line =3D 1166
  The indicated declaration is not visible outside of the function.

                      struct pathname *pnp, int flags, struct vnode =
*rdir,=20
                             =5E

cc-1204 cc: WARNING File =3D =
/usr/people/clc31/src/openafs-git/src/afs/afs_prototypes.h, Line =3D 1224
  The indicated declaration is not visible outside of the function.

                      char *aname2, struct pathname *npnp,=20
                                           =5E

cc-1515 cc: ERROR File =3D =
/usr/people/clc31/src/openafs-git/src/afs/afs_daemons.c, Line =3D 581
  A value of type =22int=22 cannot be assigned to an entity of type =
=22struct cred *=22.

      tmpcred =3D OSI_GET_CURRENT_CRED();
              =5E

cc-1020 cc: ERROR File =3D =
/usr/people/clc31/src/openafs-git/src/afs/afs_daemons.c, Line =3D 589
  The identifier =22vnode_t=22 is undefined.

      AFS_RWLOCK((vnode_t *) tvc, 1);
      =5E

cc-1029 cc: ERROR File =3D =
/usr/people/clc31/src/openafs-git/src/afs/afs_daemons.c, Line =3D 589
  An expression is expected at this point.

      AFS_RWLOCK((vnode_t *) tvc, 1);
      =5E

cc-1018 cc: ERROR File =3D =
/usr/people/clc31/src/openafs-git/src/afs/afs_daemons.c, Line =3D 589
  An unmatched left parentheses =22(=22 appears in an expression.

      AFS_RWLOCK((vnode_t *) tvc, 1);
      =5E

cc-1029 cc: ERROR File =3D =
/usr/people/clc31/src/openafs-git/src/afs/afs_daemons.c, Line =3D 596
  An expression is expected at this point.

      AFS_RWUNLOCK((vnode_t *) tvc, 1);
      =5E

cc-1018 cc: ERROR File =3D =
/usr/people/clc31/src/openafs-git/src/afs/afs_daemons.c, Line =3D 596
  An unmatched left parentheses =22(=22 appears in an expression.

      AFS_RWUNLOCK((vnode_t *) tvc, 1);
      =5E

6 errors detected in the compilation of =
=22/usr/people/clc31/src/openafs-git/src/afs/afs_daemons.c=22.
gmake=5B1=5D: *** =5B../JUAFS/afs_daemons.o=5D Error 2
gmake=5B1=5D: Leaving directory =
=60/usr/people/clc31/src/openafs-git/src/libuafs/JUAFS/JUAFS'
gmake: *** =5BJUAFS/libjuafs.a=5D Error 2
</pre>

Strange because these don't cause problems outside of UAFS.  So rather =
than hunt down spurious problems elsewhere, I think it's an issue with the =
UAFS makefiles.

Note that any changes you make to any of the UAFS makefiles are =
overwritten if you do a make from the source root, so to continue the =
compilation with custom changes you have to do a make from within the =
JUAFS dir.

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop=21
Check it out at http://www.inbox.com/earth