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

Cheyenne Wills cwills@sinenomine.net
Fri, 18 Apr 2025 17:18:54 -0600


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).=20

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. =20

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).

--=20
Cheyenne Wills
cwills@sinenomine.net



On Fri, 18 Apr 2025 11:43:15 -0400
Eric Matlis <ematlis@nd.edu> wrote:
> Dear developers-
>=20
> 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:
>=20
> 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-s=
td=3Dc23=E2=80=99 onwards
> iomgr.c:50:1: warning: useless type name in empty declaration
>   50 | typedef unsigned char bool;
>=20
> 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".
>=20
> Let me know if I can provide any other information.
>=20
> Thank you and please advise,
> Eric
>=20
> **********************************************
> Eric Matlis
> Associate Research Professor
> 114 Hessert Laboratory
> Aerospace and Mechanical Engineering
> University of Notre Dame
> Notre Dame, IN
> 574-631-6054