[OpenAFS-devel] AIX 5.2 compile

Scott J Baker sjbaker@us.ibm.com
Thu, 4 Mar 2004 12:53:37 -0700


This is a multipart message in MIME format.
--=_alternative 006CF1FD85256E4D_=
Content-Type: text/plain; charset="us-ascii"

I'm compiling openafs 1.3.52 for AIX 5.2 with VAC 6.0, which I believe has 
the correct patches.  Here's the config line im using:
./configure --with-afs-sysname=rs_aix51

Compile fails on dir.c with the following errors:

xlc_r -I. -I.. -I../nfs -I/compile/build/openafs-1.3.52/src 
-I/compile/build/openafs-1.3.52/src/afs 
-I/compile/build/openafs-1.3.52/src/afs/UKERNEL 
-I/compile/build/openafs-1.3.52/src/config 
-I/compile/build/openafs-1.3.52/src/rx 
-I/compile/build/openafs-1.3.52/src/rx/UKERNEL 
-I/compile/build/openafs-1.3.52/src/rxkad 
-I/compile/build/openafs-1.3.52/src/rxkad/domestic 
-I/compile/build/openafs-1.3.52/src/util 
-I/compile/build/openafs-1.3.52/src 
-I/compile/build/openafs-1.3.52/src/afs/UKERNEL 
-I/compile/build/openafs-1.3.52/src/afs 
-I/compile/build/openafs-1.3.52/src/util 
-I/compile/build/openafs-1.3.52/src/rxkad 
-I/compile/build/openafs-1.3.52/src/config 
-I/compile/build/openafs-1.3.52/src/fsint 
-I/compile/build/openafs-1.3.52/src/vlserver 
-I/compile/build/openafs-1.3.52/src/libuafs 
-I/compile/build/openafs-1.3.52/include 
-I/compile/build/openafs-1.3.52/include/afs  -O -DKERNEL 
-DAFS_WEB_ENHANCEMENTS -I. -I.. -I/compile/build/openafs-1.3.52/src/config 
 -DKERNEL -DUKERNEL   -c /compile/build/openafs-1.3.52/src/dir/dir.c -o 
afs_dir.o
"/compile/build/openafs-1.3.52/include/afs/dir.h", line 102.31: 1506-310 
(I) The type "struct buffer" was introduced in a parameter list, and will 
go out of scope at the end of the function declaration or definition.
"/compile/build/openafs-1.3.52/src/dir/dir.c", line 168.18: 1506-280 (E) 
Function argument assignment between types "struct buffer*" and "struct 
DirEntry*" is not allowed.
"/compile/build/openafs-1.3.52/src/dir/dir.c", line 169.18: 1506-280 (E) 
Function argument assignment between types "struct buffer*" and "unsigned 
short*" is not allowed.
"/compile/build/openafs-1.3.52/src/dir/dir.c", line 187.18: 1506-280 (E) 
Function argument assignment between types "struct buffer*" and "struct 
DirEntry*" is not allowed.
....


I looked into the definitions for those types, and C is right, they don't 
appear to be even kinda sorta compatible. What's going on here? Is this 
just beyond my meger C knowlege, or is this really wrong?

struct buffer {
    /* fid is used for Unique cache key + i/o addressing.
     * fid size is based on 4 + size of inode and size of pointer
     */
    afs_int32 fid[BUFFER_FID_SIZE];
    afs_int32 page;
    afs_int32 accesstime;
    struct buffer *hashNext;
    void *data;
    char lockers;
    char dirty;
    char hashIndex;
    struct Lock lock;
};

struct DirEntry {
    /* A directory entry */
    char flag;
    char length;                /* currently unused */
    unsigned short next;
    struct MKFid fid;
    char name[16];
};



Dir.c:
158: register struct DirEntry *ep;
...
168:    DRelease(ep, 0);

Dir.h:
extern void DRelease(register struct buffer *bp, int flag);


Thanks,
Scott Baker
IBM Global Services - Network Services
Network Measurements
Office:   (919)993-4531     T/L 589-4531 
Internet:  sjbaker@us.ibm.com
--=_alternative 006CF1FD85256E4D_=
Content-Type: text/html; charset="us-ascii"


<br><font size=2 face="sans-serif">I'm compiling openafs 1.3.52 for AIX 5.2 with VAC 6.0, which I believe has the correct patches. &nbsp;Here's the config line im using:</font>
<br><font size=2 face="sans-serif">./configure --with-afs-sysname=rs_aix51</font>
<br>
<br><font size=2 face="sans-serif">Compile fails on dir.c with the following errors:</font>
<br>
<br><font size=2 face="sans-serif">xlc_r -I. -I.. -I../nfs -I/compile/build/openafs-1.3.52/src -I/compile/build/openafs-1.3.52/src/afs -I/compile/build/openafs-1.3.52/src/afs/UKERNEL -I/compile/build/openafs-1.3.52/src/config -I/compile/build/openafs-1.3.52/src/rx -I/compile/build/openafs-1.3.52/src/rx/UKERNEL -I/compile/build/openafs-1.3.52/src/rxkad -I/compile/build/openafs-1.3.52/src/rxkad/domestic -I/compile/build/openafs-1.3.52/src/util -I/compile/build/openafs-1.3.52/src -I/compile/build/openafs-1.3.52/src/afs/UKERNEL -I/compile/build/openafs-1.3.52/src/afs -I/compile/build/openafs-1.3.52/src/util -I/compile/build/openafs-1.3.52/src/rxkad -I/compile/build/openafs-1.3.52/src/config -I/compile/build/openafs-1.3.52/src/fsint -I/compile/build/openafs-1.3.52/src/vlserver -I/compile/build/openafs-1.3.52/src/libuafs -I/compile/build/openafs-1.3.52/include -I/compile/build/openafs-1.3.52/include/afs &nbsp;-O -DKERNEL -DAFS_WEB_ENHANCEMENTS -I. -I.. -I/compile/build/openafs-1.3!
 .52/src/config &nbsp;-DKERNEL -DUKERNEL &nbsp; -c /compile/build/openafs-1.3.52/src/dir/dir.c -o afs_dir.o</font>
<br><font size=2 face="sans-serif">&quot;/compile/build/openafs-1.3.52/include/afs/dir.h&quot;, line 102.31: 1506-310 (I) The type &quot;struct buffer&quot; was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.</font>
<br><font size=2 face="sans-serif">&quot;/compile/build/openafs-1.3.52/src/dir/dir.c&quot;, line 168.18: 1506-280 (E) Function argument assignment between types &quot;struct buffer*&quot; and &quot;struct DirEntry*&quot; is not allowed.</font>
<br><font size=2 face="sans-serif">&quot;/compile/build/openafs-1.3.52/src/dir/dir.c&quot;, line 169.18: 1506-280 (E) Function argument assignment between types &quot;struct buffer*&quot; and &quot;unsigned short*&quot; is not allowed.</font>
<br><font size=2 face="sans-serif">&quot;/compile/build/openafs-1.3.52/src/dir/dir.c&quot;, line 187.18: 1506-280 (E) Function argument assignment between types &quot;struct buffer*&quot; and &quot;struct DirEntry*&quot; is not allowed.</font>
<br><font size=2 face="sans-serif">....</font>
<br>
<br>
<br><font size=2 face="sans-serif">I looked into the definitions for those types, and C is right, they don't appear to be even kinda sorta compatible. What's going on here? Is this just beyond my meger C knowlege, or is this really wrong?</font>
<br>
<br><font size=2 face="sans-serif">struct buffer {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; /* fid is used for Unique cache key + i/o addressing.</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp;* fid size is based on 4 + size of inode and size of pointer</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp;*/</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; afs_int32 fid[BUFFER_FID_SIZE];</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; afs_int32 page;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; afs_int32 accesstime;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; struct buffer *hashNext;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; void *data;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; char lockers;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; char dirty;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; char hashIndex;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; struct Lock lock;</font>
<br><font size=2 face="sans-serif">};</font>
<br>
<br><font size=2 face="sans-serif">struct DirEntry {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; /* A directory entry */</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; char flag;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; char length; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* currently unused */</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; unsigned short next;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; struct MKFid fid;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; char name[16];</font>
<br><font size=2 face="sans-serif">};</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">Dir.c:</font>
<br><font size=2 face="sans-serif">158: register struct DirEntry *ep;</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">168: &nbsp; &nbsp; &nbsp; &nbsp;DRelease(ep, 0);</font>
<br>
<br><font size=2 face="sans-serif">Dir.h:</font>
<br><font size=2 face="sans-serif">extern void DRelease(register struct buffer *bp, int flag);</font>
<br>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br><font size=2 face="sans-serif">Scott Baker<br>
IBM Global Services - Network Services<br>
Network Measurements<br>
Office: &nbsp; (919)993-4531 &nbsp; &nbsp; T/L 589-4531 <br>
Internet: &nbsp;sjbaker@us.ibm.com</font>
--=_alternative 006CF1FD85256E4D_=--