Re: git: cff482380436 - main - bhyve: Move libcasper dependecy to lib9p
Date: Wed, 29 Mar 2023 13:42:21 UTC
On Tue, 2023-03-07 at 16:13 +0000, Mark Johnston wrote:
> The branch main has been updated by markj:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=cff4823804363cf199c7c87eed8870ad014066cc
>
> commit cff4823804363cf199c7c87eed8870ad014066cc
> Author:Â Â Â Â Vitaliy Gusev <gusev.vitaliy@gmail.com>
> AuthorDate: 2023-03-07 16:09:22 +0000
> Commit:Â Â Â Â Mark Johnston <markj@FreeBSD.org>
> CommitDate: 2023-03-07 16:09:22 +0000
>
> Â Â Â bhyve: Move libcasper dependecy to lib9p
> Â Â Â
> Â Â Â libcasper(3) is not used in bhyve. So move dependency to the
> appropriate
> Â Â Â place.
> Â Â Â
> Â Â Â Reviewed by:Â Â Â markj
> Â Â Â MFC after:Â Â Â Â Â 1 week
> Â Â Â Sponsored by:Â Â vStack
> Â Â Â Differential Revision:Â https://reviews.freebsd.org/D38905
> ---
>  lib/lib9p/Makefile      | 5 +++--
> Â share/mk/src.libnames.mk | 4 ++++
>  usr.sbin/bhyve/Makefile | 8 --------
> Â 3 files changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/lib/lib9p/Makefile b/lib/lib9p/Makefile
> index c810ccd79e64..5d3681104d8c 100644
> --- a/lib/lib9p/Makefile
> +++ b/lib/lib9p/Makefile
> @@ -6,8 +6,11 @@
> Â CFLAGS+=Â Â Â Â Â Â Â -I${.CURDIR}
> Â CFLAGS+=Â Â Â Â Â Â Â -I${.CURDIR}/../../contrib/lib9p
> Â
> +LIBADD=Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â sbuf
> +
> Â .if ${MK_CASPER} != "no"
> Â CFLAGS+=Â Â Â Â Â Â Â -DWITH_CASPER
> +LIBADD+=Â Â Â Â Â Â Â casper cap_pwd cap_grp
> Â .endif
> Â
> Â LIB=Â Â Â Â Â Â Â Â Â Â Â 9p
> @@ -28,6 +31,4 @@ SRCS=Â Â Â Â Â Â Â Â Â connection.c \
> Â INCSDIR=Â Â Â Â Â Â Â ${INCLUDEDIR}/lib9p
> Â INCS=Â Â Â Â Â Â Â Â Â Â fid.h lib9p.h backend/fs.h
> Â
> -LIBADD=Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â sbuf
> -
> Â .include <bsd.lib.mk>
> diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk
> index dd1bc78b1f1a..15971189306a 100644
> --- a/share/mk/src.libnames.mk
> +++ b/share/mk/src.libnames.mk
> @@ -271,6 +271,10 @@
> LIBVERIEXEC?=Â Â Â Â Â Â ${LIBVERIEXECDIR}/libveriexec.a
>  # 2nd+ order consumers. Auto-generating this would be better.
> Â _DP_80211=Â Â Â Â Â sbuf bsdxml
> Â _DP_9p=Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â sbuf
> +.if ${MK_CASPER} != "no"
> +_DP_9p+=Â Â Â Â Â Â Â casper cap_pwd cap_grp
> +.endif
> +
> Â # XXX: Not bootstrapped so uses host version on non-FreeBSD, so
> don't use a
> Â # FreeBSD-specific dependency list
> Â .if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING)
> diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile
> index bf0a17edc59e..1c679a3c1578 100644
> --- a/usr.sbin/bhyve/Makefile
> +++ b/usr.sbin/bhyve/Makefile
> @@ -89,14 +89,6 @@ SRCS+=Â Â Â Â Â Â Â vmm_instruction_emul.c
> Â
> Â LIBADD=Â Â Â Â Â Â Â Â vmmapi md nv pthread z util sbuf cam 9p
> Â
> -.if ${MK_CASPER} != "no"
> -LIBADD+=Â Â Â Â Â Â Â casper
> -LIBADD+=Â Â Â Â Â Â Â cap_pwd
> -LIBADD+=Â Â Â Â Â Â Â cap_grp
> -# Temporary disable capsicum, until we integrate checkpoint code
> with it.
> -#CFLAGS+=-DWITH_CASPER
> -.endif
> -
> Â .if ${MK_BHYVE_SNAPSHOT} != "no"
> Â LIBADD+= ucl xo
> Â .endif
Hi Mark,
I do get build failures for my latest commits. The build log contains:
/usr/local/bin/x86_64-unknown-freebsd13.1-ld:
/tmp/obj/workspace/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined
reference to `cap_setpassent'
/usr/local/bin/x86_64-unknown-freebsd13.1-ld:
/tmp/obj/workspace/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined
reference to `cap_getgrgid_r'
/usr/local/bin/x86_64-unknown-freebsd13.1-ld:
/tmp/obj/workspace/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined
reference to `cap_setgroupent'
/usr/local/bin/x86_64-unknown-freebsd13.1-ld:
/tmp/obj/workspace/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined
reference to `cap_getpwnam'
/usr/local/bin/x86_64-unknown-freebsd13.1-ld:
/tmp/obj/workspace/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined
reference to `cap_getpwuid_r'
collect2: error: ld returned 1 exit status
See
https://ci.FreeBSD.org/job/FreeBSD-main-amd64-gcc12_build/701/console
It seems to be related to this commit. Any ideas how to fix it?
--
Kind regards,
Corvin