From 0ee53d2fe9341e60f420662749d5ae8c6d4b5f24 Mon Sep 17 00:00:00 2001 From: Tim Creech Date: Fri, 13 Dec 2019 22:24:57 -0500 Subject: [PATCH] FBSD: Build vnode_if.h before libafs objs Currently, if we are building with -j2 or higher, we can easily fail to build some libafs objects because vnode_if.h does not exist yet. vnode_if.h is generated by the FreeBSD build, but none of our objects depend on it, so during parallel builds it may not be available by the time we build, for example, src/external/heimdal/hcrypto/sha256.c. This results in build errors that can look like this: --- sha256-kernel.o --- cc -I. -I.. -I../nfs [...]/src/external/heimdal/hcrypto/sha256.c In file included from [...]/src/external/heimdal/hcrypto/sha256.c:34: In file included from [...]/src/crypto/hcrypto/kernel/config.h:30: In file included from [...]/src/afs/sysincludes.h:354: /usr/src/sys/sys/vnode.h:588:10: fatal error: 'vnode_if.h' file not found #include "vnode_if.h" ^~~~~~~~~~~~ 1 error generated. *** [sha256-kernel.o] Error code 1 make[4]: stopped in [...]/src/libafs/MODLOAD 1 error To avoid this, make all of our libafs objects depends on vnode_if.h. [adeason@dson.org: Expanded commit message.] Change-Id: I5a7a6ece8d5fbe6cf1a5b94451c8e8ae93fdc55f Reviewed-on: https://gerrit.openafs.org/13983 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- src/libafs/MakefileProto.FBSD.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libafs/MakefileProto.FBSD.in b/src/libafs/MakefileProto.FBSD.in index ee34518..be7d270 100644 --- a/src/libafs/MakefileProto.FBSD.in +++ b/src/libafs/MakefileProto.FBSD.in @@ -99,6 +99,8 @@ include Makefile.common # we only do the no-NFS case OBJS= ${AFSAOBJS} ${AFSNONFSOBJS} +$(OBJS): vnode_if.h + LIBAFSNONFS= libafs.ko DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT CFLAGS+= $(DEFINES) ${COMMON_INCLUDE} -- 1.9.4