[OpenAFS] 1.8.0pre5 Build Error on FreeBSD 11.1

Michael H Lambert lambert@psc.edu
Wed, 21 Feb 2018 10:52:41 -0500


When building 1.8.0pre5 with the defaults (./configure with no =
arguments) on FreeBSD 11.1

-----
% uname -a
FreeBSD arsenal 11.1-RELEASE-p4 FreeBSD 11.1-RELEASE-p4 #0: Tue Nov 14 =
06:12:40 UTC 2017     =
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
-----

I get the following errors in building afs_pioctl.c:

-----
cc -I. -I.. -I../nfs  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/crypto/hcrypto/kernel  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/afs  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/afs/FBSD  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/config  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/rx/FBSD  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/external/heimdal  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/afs  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/afs/FBSD  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/config  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/fsint  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/vlserver  =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/auth  =
-I/home/lambert/openafs/openafs-1.8.0pre5/include  =
-I/home/lambert/openafs/openafs-1.8.0pre5/include/afs  -DAFSDEBUG =
-DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT  -Werror =
-D_KERNEL -DKLD_MODULE -nostdinc  -I. -I.. -I../nfs =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/crypto/hcrypto/kernel =
-I/home/lambert/openafs/openafs-1.8.0pre5/src =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/afs =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/afs/FBSD =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/config =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/rx/FBSD =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/external/heimdal =
-I/home/lambert/openafs/openafs-1.8.0pre5/src =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/afs =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/afs/FBSD =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/config =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/fsint =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/vlserver =
-I/home/lambert/openafs/openafs-1.8.0pre5/src/auth =
-I/home/lambert/openafs/openafs-1.8.0pre5/include =
-I/home/lambert/openafs/openafs-1.8.0pre5/include/afs -I. -I/usr/src/sys =
-fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   =
-mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  =
-fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector =
-Wno-redundant-decls  -mno-aes -mno-avx  -std=3Diso9899:1999 =
-DAFS_NONFSTRANS -o afs_pioctl.o -c =
/home/lambert/openafs/openafs-1.8.0pre5/src/afs/afs_pioctl.c
/home/lambert/openafs/openafs-1.8.0pre5/src/afs/afs_pioctl.c:5169:28: =
error:=20
      passing 'afs_uint32 *' (aka 'unsigned int *') to parameter of type
      'afs_int32 *' (aka 'int *') converts between pointers to integer =
types
      with different sign [-Werror,-Wpointer-sign]
    if (afs_pd_getInt(ain, &addr) !=3D 0)
                           ^~~~~
/home/lambert/openafs/openafs-1.8.0pre5/src/afs/afs_pioctl.c:130:49: =
note:=20
      passing argument to parameter 'val' here
afs_pd_getInt(struct afs_pdata *apd, afs_int32 *val)
                                                ^
/home/lambert/openafs/openafs-1.8.0pre5/src/afs/afs_pioctl.c:5236:46: =
error:=20
      passing 'afs_uint32 *' (aka 'unsigned int *') to parameter of type
      'afs_int32 *' (aka 'int *') converts between pointers to integer =
types
      with different sign [-Werror,-Wpointer-sign]
            code =3D RXAFS_CallBackRxConnAddr(rxconn, &addr);
                                                    ^~~~~
/home/lambert/openafs/openafs-1.8.0pre5/src/fsint/afsint.h:1389:23: =
note:=20
      passing argument to parameter 'addr' here
        /*IN 0*/ afs_int32 * addr);
                             ^
2 errors generated.
-----

The compiler is clang:

-----
% cc --version
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on =
LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.1
Thread model: posix
InstalledDir: /usr/bin
-----

Thanks,

Michael

-----
Michael H Lambert, GigaPoP Manager             Phone: +1 412 268-4960
Pittsburgh Supercomputing Center/3ROX          FAX:   +1 412 268-5832
300 S Craig St, Pittsburgh, PA  15213 USA      lambert@psc.edu