[OpenAFS] Building on AIX

Ben Huntsman ben@huntsmans.net
Fri, 12 Aug 2022 18:12:00 +0000


--_000_MWHPR0701MB3674B3FC0FA5B9C3F7E676E7A7679MWHPR0701MB3674_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Ah, interesting!  Thank you for pointing that out!

Just to test a sloppy fix, I added an include of <sys/time.h> to src/afs/AI=
X/osi_machdep.h, and that allowed the compile to continue.  It stops at src=
/afs/AIX/osi_sleep.c, but I'll treat that as a separate thread.

I'm not sure if including <sys/time.h> from src/afs/AIX/osi_machdep.h is th=
e best way to resolve it, but if so maybe that should be put in a patch?  P=
erhaps it should go in src/afs/sysincudes.h?

Thank you!

-Ben

________________________________
From: Benjamin Kaduk <kaduk@mit.edu>
Sent: Friday, August 12, 2022 9:55 AM
To: Ben Huntsman <ben@huntsmans.net>
Cc: openafs-info@openafs.org <openafs-info@openafs.org>
Subject: Re: [OpenAFS] Building on AIX

Hi Ben,

On Fri, Aug 12, 2022 at 04:41:04PM +0000, Ben Huntsman wrote:
> Hi guys!
>
> Has anyone built this on AIX recently?  I see in the code that there is s=
upport for AIX 6.1, and 7.2.  I was hoping to get it working on 7.1 so I fi=
gured I'd start with a build on AIX 6.1 to make sure it was in working orde=
r before attempting to port it to 7.1.  I'm using XLC 13.1.3 and my AIX lev=
el is 6100-09-12-1846.

It looks like we lost our regular AIX buildbot worker in early 2017, so any
builds since then have been ad hoc/infrequent.
That said, I think we're happy to help work through any issues that have
arisen since then and get things back into a usable state on AIX.

> I checked out the code from git and am using the master branch.  I am usi=
ng the following config options:
>
> CC=3Dxlc_r ./configure --prefix=3D/opt/openafs --enable-tivoli-tsm --enab=
le-kauth --disable-fuse-client --with-gssapi=3D/opt/freeware --with-krb5=3D=
/opt/freeware

[obligatory note that kauth is woefully insecure and should only be used if
you have compatibility requirements with legacy systems that cannot be
upgraded]

> Are those appropriate/reasonable under AIX?  Currently, I'm getting the f=
ollowing error:
>
>           cc -I. -I.. -I../nfs  -I/project/openafs/src/crypto/hcrypto/ker=
nel  -I/project/openafs/src  -I/project/openafs/src/afs  -I/project/openafs=
/src/afs/AIX  -I/project/openafs/src/config  -I/project/openafs/src/rx/AIX =
 -I/project/openafs/src/external/heimdal  -I/project/openafs/src  -I/projec=
t/openafs/src/afs  -I/project/openafs/src/afs/AIX  -I/project/openafs/src/c=
onfig  -I/project/openafs/src/fsint  -I/project/openafs/src/vlserver  -I/pr=
oject/openafs/src/auth  -I/project/openafs/include  -I/project/openafs/incl=
ude/afs   -I. -I.. -I/project/openafs/src/config  -U_IBMR2 -D_POWER -D_AIX =
-DNLS -D_NLS -DMSG -D__STR31__ -Daiws  -D_POWER_RS -D_POWER_PC -D_POWER_RS1=
 -D_POWER_RS2 -D_POWER_RSC  -D_POWER_601 -D_POWER_603 -D_POWER_604 -D_THREA=
DS -M  -D_KERNEL  -D_POWER_MP -UKOFF -DAFSDEBUG -DVICE -DNFS -DUFS -DINET -=
DQUOTA  -DGETMOUNT -H8 -DAFS -DAFS_COMMON -D_VOPS -D_SUN -DKERNEL -q64 -DAF=
S_64BIT_KERNEL -D__64BIT_KERNEL -g -I/project/openafs/src/rxkad -I/project/=
openafs/src/rxkad -o rxkad_common.o -c /project/openafs/src/rxkad/rxkad_com=
mon.c
> "/project/openafs/src/afs/AIX/osi_machdep.h", line 90.12: 1506-007 (S) "s=
truct timestruc_t" is undefined.
> "../sys/time.h", line 587.17: 1506-343 (S) Redeclaration of curtime diffe=
rs from previous declaration on line 91 of "/project/openafs/src/afs/AIX/os=
i_machdep.h".
> "../sys/time.h", line 587.17: 1506-050 (I) Return type "void" in redeclar=
ation is not compatible with the previous return type "int".
> make: 1254-004 The error code from the last command is 1.
>
>
> Has anyone seen this?  Certainly that struct is defined in /usr/include/s=
ys/time.h, but this seems like it's probably something obvious and I'm will=
ing to bet it's on my end and not a problem with the code.

That looks like some fallout from https://gerrit.openafs.org/#/c/14238/ and
given the lack of any remark about testing on AIX in the review notes, I'm
more inclined to think it's an issue with the OpenAFS code than your setup.

What does curtime() look like on your system?
We just need a way to get the current time in seconds+microseconds
precision (converting from, e.g., nanoseconds if needed).  We may have just
typo'd something in the src/afs/AIX/osi_machdep.h chunk, for all I know.

Thanks,

Ben

P.S. If you think you might be able to contribute some resources to have a
regular AIX buildbot worker again, we'd be delighted to talk about that!

--_000_MWHPR0701MB3674B3FC0FA5B9C3F7E676E7A7679MWHPR0701MB3674_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Ah, interesting!&nbsp; Thank you for pointing that out!</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Just to test a sloppy fix, I added an include of &lt;sys/time.h&gt; to&nbsp=
;src/afs/AIX/osi_machdep.h, and that allowed the compile to continue.&nbsp;=
 It stops at src/afs/AIX/osi_sleep.c, but I'll treat that as a separate thr=
ead.</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
I'm not sure if including &lt;sys/time.h&gt; from src/afs/AIX/osi_machdep.h=
 is the best way to resolve it, but if so maybe that should be put in a pat=
ch?&nbsp; Perhaps it should go in src/afs/sysincudes.h?</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Thank you!</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
-Ben</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div id=3D"appendonsend"></div>
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st=
yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> Benjamin Kaduk &lt;ka=
duk@mit.edu&gt;<br>
<b>Sent:</b> Friday, August 12, 2022 9:55 AM<br>
<b>To:</b> Ben Huntsman &lt;ben@huntsmans.net&gt;<br>
<b>Cc:</b> openafs-info@openafs.org &lt;openafs-info@openafs.org&gt;<br>
<b>Subject:</b> Re: [OpenAFS] Building on AIX</font>
<div>&nbsp;</div>
</div>
<div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt;=
">
<div class=3D"PlainText">Hi Ben,<br>
<br>
On Fri, Aug 12, 2022 at 04:41:04PM +0000, Ben Huntsman wrote:<br>
&gt; Hi guys!<br>
&gt; <br>
&gt; Has anyone built this on AIX recently?&nbsp; I see in the code that th=
ere is support for AIX 6.1, and 7.2.&nbsp; I was hoping to get it working o=
n 7.1 so I figured I'd start with a build on AIX 6.1 to make sure it was in=
 working order before attempting to port it to
 7.1.&nbsp; I'm using XLC 13.1.3 and my AIX level is 6100-09-12-1846.<br>
<br>
It looks like we lost our regular AIX buildbot worker in early 2017, so any=
<br>
builds since then have been ad hoc/infrequent.<br>
That said, I think we're happy to help work through any issues that have<br=
>
arisen since then and get things back into a usable state on AIX.<br>
<br>
&gt; I checked out the code from git and am using the master branch.&nbsp; =
I am using the following config options:<br>
&gt; <br>
&gt; CC=3Dxlc_r ./configure --prefix=3D/opt/openafs --enable-tivoli-tsm --e=
nable-kauth --disable-fuse-client --with-gssapi=3D/opt/freeware --with-krb5=
=3D/opt/freeware<br>
<br>
[obligatory note that kauth is woefully insecure and should only be used if=
<br>
you have compatibility requirements with legacy systems that cannot be<br>
upgraded]<br>
<br>
&gt; Are those appropriate/reasonable under AIX?&nbsp; Currently, I'm getti=
ng the following error:<br>
&gt; <br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cc -I. -I.=
. -I../nfs&nbsp; -I/project/openafs/src/crypto/hcrypto/kernel&nbsp; -I/proj=
ect/openafs/src&nbsp; -I/project/openafs/src/afs&nbsp; -I/project/openafs/s=
rc/afs/AIX&nbsp; -I/project/openafs/src/config&nbsp; -I/project/openafs/src=
/rx/AIX&nbsp; -I/project/openafs/src/external/heimdal&nbsp;
 -I/project/openafs/src&nbsp; -I/project/openafs/src/afs&nbsp; -I/project/o=
penafs/src/afs/AIX&nbsp; -I/project/openafs/src/config&nbsp; -I/project/ope=
nafs/src/fsint&nbsp; -I/project/openafs/src/vlserver&nbsp; -I/project/opena=
fs/src/auth&nbsp; -I/project/openafs/include&nbsp; -I/project/openafs/inclu=
de/afs&nbsp;&nbsp;
 -I. -I.. -I/project/openafs/src/config&nbsp; -U_IBMR2 -D_POWER -D_AIX -DNL=
S -D_NLS -DMSG -D__STR31__ -Daiws&nbsp; -D_POWER_RS -D_POWER_PC -D_POWER_RS=
1 -D_POWER_RS2 -D_POWER_RSC&nbsp; -D_POWER_601 -D_POWER_603 -D_POWER_604 -D=
_THREADS -M&nbsp; -D_KERNEL&nbsp; -D_POWER_MP -UKOFF -DAFSDEBUG
 -DVICE -DNFS -DUFS -DINET -DQUOTA&nbsp; -DGETMOUNT -H8 -DAFS -DAFS_COMMON =
-D_VOPS -D_SUN -DKERNEL -q64 -DAFS_64BIT_KERNEL -D__64BIT_KERNEL -g -I/proj=
ect/openafs/src/rxkad -I/project/openafs/src/rxkad -o rxkad_common.o -c /pr=
oject/openafs/src/rxkad/rxkad_common.c<br>
&gt; &quot;/project/openafs/src/afs/AIX/osi_machdep.h&quot;, line 90.12: 15=
06-007 (S) &quot;struct timestruc_t&quot; is undefined.<br>
&gt; &quot;../sys/time.h&quot;, line 587.17: 1506-343 (S) Redeclaration of =
curtime differs from previous declaration on line 91 of &quot;/project/open=
afs/src/afs/AIX/osi_machdep.h&quot;.<br>
&gt; &quot;../sys/time.h&quot;, line 587.17: 1506-050 (I) Return type &quot=
;void&quot; in redeclaration is not compatible with the previous return typ=
e &quot;int&quot;.<br>
&gt; make: 1254-004 The error code from the last command is 1.<br>
&gt; <br>
&gt; <br>
&gt; Has anyone seen this?&nbsp; Certainly that struct is defined in /usr/i=
nclude/sys/time.h, but this seems like it's probably something obvious and =
I'm willing to bet it's on my end and not a problem with the code.<br>
<br>
That looks like some fallout from <a href=3D"https://gerrit.openafs.org/#/c=
/14238/">
https://gerrit.openafs.org/#/c/14238/</a> and<br>
given the lack of any remark about testing on AIX in the review notes, I'm<=
br>
more inclined to think it's an issue with the OpenAFS code than your setup.=
<br>
<br>
What does curtime() look like on your system?<br>
We just need a way to get the current time in seconds+microseconds<br>
precision (converting from, e.g., nanoseconds if needed).&nbsp; We may have=
 just<br>
typo'd something in the src/afs/AIX/osi_machdep.h chunk, for all I know.<br=
>
<br>
Thanks,<br>
<br>
Ben<br>
<br>
P.S. If you think you might be able to contribute some resources to have a<=
br>
regular AIX buildbot worker again, we'd be delighted to talk about that!<br=
>
</div>
</span></font></div>
</body>
</html>

--_000_MWHPR0701MB3674B3FC0FA5B9C3F7E676E7A7679MWHPR0701MB3674_--