SUMMARY: Building amd under Solaris 2.5.1

From: Jay Sekora (jay@ccs.neu.edu)
Date: Wed Jul 09 1997 - 14:58:33 CDT


Hi. My original question was:

  Hi. I'm trying to build amd (amd-upl102) under Solaris 2.5.1, with
  very little success.
  
  Parts of it are documented as not being buildable with gcc, and sure
  enough, I couldn't. :-)
  
  There's support in the Makefile for building it partly with gcc and
  partly with Sun's commercial compiler, or building it completely with
  Sun's commercial compiler. Both of those options fail for me with
  a syntax error in /usr/include/nfs/nfs_clnt.h (and building with Sun's
  cc also complains about a missing NULL parameter to gettimeofday).
  
  The chunk of nfs_clnt.h that causes problems is
  
  struct nfs_commit_req {
          void (*commit)(); /* pointer to commit function */
          page_t *plist; /* page list */
          offset3 offset; /* starting offset */
          count3 count; /* size of range to be commited */
  };
  
  which looks fine to me, and I've grepped for the tokens in it in the
  amd source code in case something was #define'd without finding anything
  that looks like a problem.
  
  So, the short of it is, has anybody out there built amd for Solaris
  2.5 or 2.5.1, and if so, can I have a copy of any Makefiles you modified
  and/or any patches you needed? It looks like just this one structure
  that's causing the problem, but I can't figure out what gcc and cc
  don't like about it.

I got a couple of responses asking why I didn't just use automount
(because we've got many complex autmatically-generated site-wide amd
NIS maps that define our filesystem environment across platforms), a
couple offers of binaries, and a couple of answers from people who said
they didn't have any problems. One of these, Dieter
<gobbers@faw.uni-ulm.de>, was able to determine that this is a
2.5.1-specific problem - doesn't happen on plain 2.5 or earlier
versions. (Dunno 'bout 2.6.)

I still don't know why the syntax error occurs or what the compiler
thinks is wrong with the above struct, but amd compiles cleanly with
the offending #include commented out.

So I ended up building amd-upl102 with the following recipe:
  Parts of amd *need* to be built with Sun's cc; gcc doesn't work for
  them. (This is documented.) I had trouble building hlfsd/stubs.c
  with SunPro cc, so I used a mixture of cc and gcc (well-documented
  and supported by the distribution Makefile).
  
  Had to add a NULL second parameter for gettimeofday in config/mtab_svr4.c .
  
  Had to comment out #include <nfs/nfs_clnt.h> in hlfsd/hlfsd.c . (Per
  somebody on sun-managers mailing list, it builds fine with that left
  in under 2.5, just not under 2.5.1.)
  
  Besides those files, modified config/Makefile.local.sos5 .
  
  Then, "make; make install; make install_man"
  
  Files modified:
  config/mtab_svr4.c hlfsd/hlfsd.c config/Makefile.local.sos5

Thanks to:
  Nadya Williams <nadya@bog.ucsd.edu>
  Tim Carlson <tim@santafe.edu>
  LDC - Eduardo Blanco <eduardo@ldc.usb.ve>
and especially
  Dieter Gobbers <gobbers@faw.uni-ulm.de>



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:58 CDT