[OpenAFS-devel] Openafs on kernel 6.14 Fedora 42 patched but fails to compile

Eric Matlis ematlis@nd.edu
Fri, 18 Apr 2025 21:06:37 -0400


--000000000000cd81b10633173f0f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Thank you for the quick response.  Using export CC=3D"gcc -std=3Dc99" befor=
e
rpmbuild --rebuild resolved this issue, however, not I get the following
errors:

osi_vnodeops.c: In function =E2=80=98afs_linux_dentry_revalidate=E2=80=99:
osi_vnodeops.c:1636:10: error: =E2=80=98nd=E2=80=99 undeclared (first use i=
n this
function); did you mean =E2=80=98fd=E2=80=99?
1636 |     if ((nd->flags & LOOKUP_RCU) !=3D 0) {
     |          ^~
     |          fd
osi_vnodeops.c:1636:10: note: each undeclared identifier is reported only
once for each function it appears in
osi_vnodeops.c: At top level:
osi_vnodeops.c:1727:25: error: initialization of =E2=80=98int (*)(struct in=
ode *,
const struct qstr *, struct dentry *, unsigne
d int)=E2=80=99 from incompatible pointer type =E2=80=98int (*)(struct dent=
ry *, int)=E2=80=99
[-Wincompatible-pointer-types]
1727 |   .d_revalidate =3D       afs_linux_dentry_revalidate,
     |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
osi_vnodeops.c:1727:25: note: (near initialization for
=E2=80=98afs_dentry_operations.d_revalidate=E2=80=99)
osi_vnodeops.c:1623:1: note: =E2=80=98afs_linux_dentry_revalidate=E2=80=99 =
declared here
1623 | afs_linux_dentry_revalidate(struct dentry *dp, int flags)
     | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
 CC [M]  Kpagcb.xdr.o
make[6]: ***
[/usr/src/kernels/6.14.2-300.fc42.x86_64/scripts/Makefile.build:207:
osi_vnodeops.o] Error 1
make[6]: *** Waiting for unfinished jobs....


**********************************************
Eric Matlis
Associate Research Professor
114 Hessert Laboratory
Aerospace and Mechanical Engineering
University of Notre Dame
Notre Dame, IN
574-631-6054


On Fri, Apr 18, 2025 at 7:18=E2=80=AFPM Cheyenne Wills <cwills@sinenomine.n=
et>
wrote:

> iomgr.c is not dependent on the Linux kernel (iomgr.c is used for
> some of the openafs servers and it's not used within the kernel
> module).
>
> The error message is related to the C compiler and the -std=3Dc23 option.
>
> It appears that fedora 42 is setting the default compiler standard to
> -std=3Dgnu23, which in a superset of C23.
>
> To build under fedora 42, you will need to use a CFLAG of -std=3Dgnu17 or
> -std=3Dc99.
>
> The coding standard that is used within OpenAFS is C89 plus a few
> extensions (or as the coding style doc states "C99 minus a few
> features).
>
> --
> Cheyenne Wills
> cwills@sinenomine.net
>
>
>
> On Fri, 18 Apr 2025 11:43:15 -0400
> Eric Matlis <ematlis@nd.edu> wrote:
> > Dear developers-
> >
> > patches https://gerrit.openafs.org/#/c/16277/ and
> > https://gerrit.openafs.org/#/c/16276/1 fail to fix openafs-1.8.13.2
> > for compilation under Fedora 42 and kernel 6.14.2-300.  The error I
> > get using rpmbuild is:
> >
> > iomgr.c:50:23: error: =E2=80=98bool=E2=80=99 cannot be defined via =E2=
=80=98typedef=E2=80=99
> >   50 | typedef unsigned char bool;
> >      |                       ^~~~
> > iomgr.c:50:23: note: =E2=80=98bool=E2=80=99 is a keyword with =E2=80=98=
-std=3Dc23=E2=80=99 onwards
> > iomgr.c:50:1: warning: useless type name in empty declaration
> >   50 | typedef unsigned char bool;
> >
> > This was after applying the patches manually with "patch -p1 <
> > patchfile" to the source code extracted from the bunzip2 tar file,
> > recreating the tar file, executing the procedure to turn tar files
> > into a src rpm, and issuing "rpmbuild --rebuild xxx.src.rpm".
> >
> > Let me know if I can provide any other information.
> >
> > Thank you and please advise,
> > Eric
> >
> > **********************************************
> > Eric Matlis
> > Associate Research Professor
> > 114 Hessert Laboratory
> > Aerospace and Mechanical Engineering
> > University of Notre Dame
> > Notre Dame, IN
> > 574-631-6054
>
>

--000000000000cd81b10633173f0f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Thank you for the quick=C2=A0response.=C2=A0 Using=C2=
=A0export CC=3D&quot;gcc -std=3Dc99&quot; before rpmbuild --rebuild resolve=
d this issue, however, not I get the following errors:</div><div><br></div>=
<div><span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0)"=
>osi_vnodeops.c: In function =E2=80=98afs_linux_dentry_revalidate=E2=80=99:=
</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">osi_vnodeops.c:1636:10: error: =
=E2=80=98nd=E2=80=99 undeclared (first use in this function); did you mean =
=E2=80=98fd=E2=80=99?</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)"> 1636 | =C2=A0=C2=A0=C2=A0=C2=
=A0if ((nd-&gt;flags &amp; LOOKUP_RCU) !=3D 0) {</span><span style=3D"color=
:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)"> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
| =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0^~</span><span styl=
e=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)"> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
| =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0fd</span><span styl=
e=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">osi_vnodeops.c:1636:10: note: e=
ach undeclared identifier is reported only once for each function it appear=
s in</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">osi_vnodeops.c: At top level:</=
span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">osi_vnodeops.c:1727:25: error: =
initialization of =E2=80=98int (*)(struct inode *, const struct qstr *, str=
uct dentry *, unsigne</span><br>d int)=E2=80=99 from incompatible pointer t=
ype =E2=80=98int (*)(struct dentry *, int)=E2=80=99 [-Wincompatible-pointer=
-types]<span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)"> 1727 | =C2=A0=C2=A0.d_revalida=
te =3D =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0afs_linux_dentry_revalidate,</sp=
an><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)"> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
| =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0^~~=
~~~~~~~~~~~~~~~~~~~~~~~~</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">osi_vnodeops.c:1727:25: note: (=
near initialization for =E2=80=98afs_dentry_operations.d_revalidate=E2=80=
=99)</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">osi_vnodeops.c:1623:1: note: =
=E2=80=98afs_linux_dentry_revalidate=E2=80=99 declared here</span><span sty=
le=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)"> 1623 | afs_linux_dentry_revali=
date(struct dentry *dp, int flags)</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)"> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)"> =C2=A0CC [M] =C2=A0Kpagcb.xdr.=
o</span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">make[6]: *** [/usr/src/kernels/=
6.14.2-300.fc42.x86_64/scripts/Makefile.build:207: osi_vnodeops.o] Error 1<=
/span><span style=3D"color:rgb(0,0,0)">
</span><br><span style=3D"color:rgb(0,0,0)">make[6]: *** Waiting for unfini=
shed jobs....</span><br><span style=3D"color:rgb(0,0,0)">
</span><br></span></div><div><br></div><div><div dir=3D"ltr" class=3D"gmail=
_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div><div d=
ir=3D"ltr"><div>**********************************************</div><div>Er=
ic Matlis</div><div>Associate Research Professor</div><div>114 Hessert Labo=
ratory</div><div>Aerospace and Mechanical Engineering</div><div>University =
of Notre Dame</div><div>Notre Dame, IN</div><div>574-631-6054</div></div></=
div></div></div></div><br></div><br><div class=3D"gmail_quote gmail_quote_c=
ontainer"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Apr 18, 2025 at 7:1=
8=E2=80=AFPM Cheyenne Wills &lt;<a href=3D"mailto:cwills@sinenomine.net">cw=
ills@sinenomine.net</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex">iomgr.c is not dependent on the Linux kernel (iomgr.c is=
 used for<br>
some of the openafs servers and it&#39;s not used within the kernel<br>
module). <br>
<br>
The error message is related to the C compiler and the -std=3Dc23 option.<b=
r>
<br>
It appears that fedora 42 is setting the default compiler standard to<br>
-std=3Dgnu23, which in a superset of C23.=C2=A0 <br>
<br>
To build under fedora 42, you will need to use a CFLAG of -std=3Dgnu17 or<b=
r>
-std=3Dc99.<br>
<br>
The coding standard that is used within OpenAFS is C89 plus a few<br>
extensions (or as the coding style doc states &quot;C99 minus a few<br>
features).<br>
<br>
-- <br>
Cheyenne Wills<br>
<a href=3D"mailto:cwills@sinenomine.net" target=3D"_blank">cwills@sinenomin=
e.net</a><br>
<br>
<br>
<br>
On Fri, 18 Apr 2025 11:43:15 -0400<br>
Eric Matlis &lt;<a href=3D"mailto:ematlis@nd.edu" target=3D"_blank">ematlis=
@nd.edu</a>&gt; wrote:<br>
&gt; Dear developers-<br>
&gt; <br>
&gt; patches <a href=3D"https://gerrit.openafs.org/#/c/16277/" rel=3D"noref=
errer" target=3D"_blank">https://gerrit.openafs.org/#/c/16277/</a> and<br>
&gt; <a href=3D"https://gerrit.openafs.org/#/c/16276/1" rel=3D"noreferrer" =
target=3D"_blank">https://gerrit.openafs.org/#/c/16276/1</a> fail to fix op=
enafs-1.8.13.2<br>
&gt; for compilation under Fedora 42 and kernel 6.14.2-300.=C2=A0 The error=
 I<br>
&gt; get using rpmbuild is:<br>
&gt; <br>
&gt; iomgr.c:50:23: error: =E2=80=98bool=E2=80=99 cannot be defined via =E2=
=80=98typedef=E2=80=99<br>
&gt;=C2=A0 =C2=A050 | typedef unsigned char bool;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^~~~<br>
&gt; iomgr.c:50:23: note: =E2=80=98bool=E2=80=99 is a keyword with =E2=80=
=98-std=3Dc23=E2=80=99 onwards<br>
&gt; iomgr.c:50:1: warning: useless type name in empty declaration<br>
&gt;=C2=A0 =C2=A050 | typedef unsigned char bool;<br>
&gt; <br>
&gt; This was after applying the patches manually with &quot;patch -p1 &lt;=
<br>
&gt; patchfile&quot; to the source code extracted from the bunzip2 tar file=
,<br>
&gt; recreating the tar file, executing the procedure to turn tar files<br>
&gt; into a src rpm, and issuing &quot;rpmbuild --rebuild xxx.src.rpm&quot;=
.<br>
&gt; <br>
&gt; Let me know if I can provide any other information.<br>
&gt; <br>
&gt; Thank you and please advise,<br>
&gt; Eric<br>
&gt; <br>
&gt; **********************************************<br>
&gt; Eric Matlis<br>
&gt; Associate Research Professor<br>
&gt; 114 Hessert Laboratory<br>
&gt; Aerospace and Mechanical Engineering<br>
&gt; University of Notre Dame<br>
&gt; Notre Dame, IN<br>
&gt; 574-631-6054<br>
<br>
</blockquote></div>

--000000000000cd81b10633173f0f--