[OpenAFS-devel] trying to compile for sunx86_58

Jeffrey Hutzelman jhutz@cmu.edu
Fri, 14 Sep 2001 23:14:46 -0400 (EDT)


On Fri, 14 Sep 2001, John Tang Boyland wrote:

> On Frim 14 Sep 2001, Jeffrey Hutzelman wrote:
> ] On Tue, 11 Sep 2001, John Tang Boyland wrote:
> ] 
> ] [...]
> ] 
> ] > Next, the code assumes that IPv6 is available even though IPv6 is
> ] > optional in Solaris 8 (and not installed on the machine I am compiling
> ] > on):
> ] > 	/opt/SUNWspro/bin/cc -I. -I..
> ] >        -I/users/csfac/boyland/src/openafs-1.1.1a/src/config -DAFSDEBUG
> ] >        -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
> ] >        -Dsun4c -DSUN4C_60 -DNFSCLIENT -DSYSACCT -DOLDSCSI -DVDDRV
> ] >        -D_KERNEL -DSYSV -dn -c ../afs/afs_analyze.c;
> ] > 	"../afs/afs_analyze.c", line 44: cannot find include file:
> ] >        <netinet/ip6.h>
> ] > 	cc: acomp failed for ../afs/afs_analyze.c
> ] > afs_{cell,conn,server,user,util,volume}.c in the same directory have
> ] > the same problem, as does src/rx/SOLARIS/rx_knet.c
> ] 
> ] Um..  Do you get a different kernel if you don't have IPV6
> ] installed?
> 
> I think so, although the basic kernel is not changed.
> When you install Solaris 8, it asks whether to add IPv6 support
> and if so, it apparently adds various .h files as well
> as several IPv6 kernel modules that are then modload'ed
> on system start up.  I'm not completely familiar with
> how Solaris 8 works, so I don't know whether my guess is right here.
> If so, would that count as a "different kernel" ?

No.  By "different kernel" I mean one that was compiled differently.  In
this case, it would have to have been compiled with preprocessor flags
that changed data structures in such a way that no IPv6-specific fields
are present.  Merely getting additional kernel modules indicates that
there is only one kernel, whose data structures always contain the fields
used by IPv6.

If it compiles _and works_ without the ipv6 headers, then either they
never needed to be there or it isn't really working, and will fail later
in a way that is subtle and hard to debug.

> The last problem I had mentioned earlier: the fs_freevfs error message
> comes from the vfsops structure (in sys/vfsops.h) being different in
> different versions of Solaris 8 x86 !!  The older version (where I was
> compiling openafs, because it has the Sun cc compiler) doesn't have
> the last field in the struct (named vfs_freevfs) although a machine
> with a newer version of Solaris 8 x86 *does* have the field (which the
> openafs source is expecting)
> 
> Should OpenAFS bother about this older version of Solaris 8 x86 ?
> (and use some horrible condition like #if sizeof(struct vfsops)==4*9)
> or should it not, and let those people who want OpenAFS to edit the
> code by hand to remove the extra line ?

This is something that configure should be able to test for fairly easily.
It may be more complicated to determine what to do about it...

> In any case, it seems that I have a problem: I can't compile
> on an old machine to get executables for a newer one..

Indeed.  You'll need to build the kernel module on a machine whose headers
match those of the kernel you'll be running with.

-- Jeffrey T. Hutzelman (N3NHS) <jhutz+@cmu.edu>
   Sr. Research Systems Programmer
   School of Computer Science - Research Computing Facility
   Carnegie Mellon University - Pittsburgh, PA