[OpenAFS-devel] Clang (Open XL C 17.1+) on AIX
Ben Huntsman
ben@huntsmans.net
Sat, 30 Nov 2024 22:52:56 +0000
--_000_BYAPR07MB58798A94CE1C7BA4B74BC003A72B2BYAPR07MB5879namp_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi everyone-
The latest few versions of the XL C compiler on AIX are clang-based. Th=
ere are quite a few changes that need to be made in order for the kernel mo=
dule to compile. I made a few updates to the Makefiles to compensate for s=
ome command line argument differences. The first error we encounter is thi=
s:
In file included from /home/build/openafs/src/external/heimdal/hcrypto/sha2=
56.c:34:
In file included from /home/build/openafs/src/crypto/hcrypto/kernel/config.=
h:30:
In file included from /home/build/openafs/src/afs/sysincludes.h:276:
../sys/socketvar.h:158:57: error: array has incomplete element type 'struct=
free_sock_hash_bucket'
extern struct free_sock_hash_bucket free_sock_hash_table[];
^
../sys/socketvar.h:158:15: note: forward declaration of 'struct free_sock_h=
ash_bucket'
extern struct free_sock_hash_bucket free_sock_hash_table[];
^
Unfortunately sys/socketvar.h is an AIX-supplied header file, so we can'=
t change it. I could open a bug report with IBM but even if they fix it in=
the future we still need to deal with this situation for this version.
Any ideas for how to deal with this? My initial thought is to use some =
macros to not include the header, and just copy over the bits from the syst=
em headers we need, for just the case of AIX 7.2+ with XLC 17.1+. Does tha=
t sound like a reasonable approach? And if so, is there a preference as to=
where the copied bits from the headers should go? Or is there a better wa=
y to handle this situation?
Thank you very much!
-Ben
--_000_BYAPR07MB58798A94CE1C7BA4B74BC003A72B2BYAPR07MB5879namp_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
Hi everyone-</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
The latest few versions of the XL C compiler on AIX are clang-=
based. There are quite a few changes that need to be made in order fo=
r the kernel module to compile. I made a few updates to the Makefiles=
to compensate for some command line argument differences.
The first error we encounter is this:</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"text-align: left; text-indent: 0px; =
background-color: rgb(255, 255, 255); margin: 0px; font-family: Aptos, Apto=
s_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-s=
ize: 12pt; color: rgb(0, 0, 0);">
In file included from /home/build/openafs/src/external/heimdal/hcrypto/sha2=
56.c:34:</div>
<div class=3D"elementToProof" style=3D"text-align: left; text-indent: 0px; =
background-color: rgb(255, 255, 255); margin: 0px; font-family: Aptos, Apto=
s_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-s=
ize: 12pt; color: rgb(0, 0, 0);">
In file included from /home/build/openafs/src/crypto/hcrypto/kernel/config.=
h:30:</div>
<div class=3D"elementToProof" style=3D"text-align: left; text-indent: 0px; =
background-color: rgb(255, 255, 255); margin: 0px; font-family: Aptos, Apto=
s_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-s=
ize: 12pt; color: rgb(0, 0, 0);">
In file included from /home/build/openafs/src/afs/sysincludes.h:276:</div>
<div style=3D"text-align: left; text-indent: 0px; background-color: rgb(255=
, 255, 255); margin: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSF=
ontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, =
0, 0);">
../sys/socketvar.h:158:57: error: array has incomplete element type 'struct=
free_sock_hash_bucket'</div>
<div style=3D"text-align: left; text-indent: 0px; background-color: rgb(255=
, 255, 255); margin: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSF=
ontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, =
0, 0);">
extern struct free_sock_hash_bucket free_sock_hash_table[];</div>
<div style=3D"text-align: left; text-indent: 0px; background-color: rgb(255=
, 255, 255); margin: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSF=
ontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, =
0, 0);">
 =
; &nb=
sp; ^</div>
<div style=3D"text-align: left; text-indent: 0px; background-color: rgb(255=
, 255, 255); margin: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSF=
ontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, =
0, 0);">
../sys/socketvar.h:158:15: note: forward declaration of 'struct free_sock_h=
ash_bucket'</div>
<div style=3D"text-align: left; text-indent: 0px; background-color: rgb(255=
, 255, 255); margin: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSF=
ontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, =
0, 0);">
extern struct free_sock_hash_bucket free_sock_hash_table[];</div>
<div style=3D"text-align: left; text-indent: 0px; background-color: rgb(255=
, 255, 255); margin: 0px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSF=
ontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, =
0, 0);">
^</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
Unfortunately sys/socketvar.h is an AIX-supplied header file, =
so we can't change it. I could open a bug report with IBM but even if=
they fix it in the future we still need to deal with this situation for th=
is version.</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
Any ideas for how to deal with this? My initial thought =
is to use some macros to not include the header, and just copy over the bit=
s from the system headers we need, for just the case of AIX 7.2+ with XLC 1=
7.1+. Does that sound like a reasonable approach?
And if so, is there a preference as to where the copied bits from the head=
ers should go? Or is there a better way to handle this situation?</di=
v>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
Thank you very much!</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
-Ben</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>
--_000_BYAPR07MB58798A94CE1C7BA4B74BC003A72B2BYAPR07MB5879namp_--