Re: git: cff482380436 - main - bhyve: Move libcasper dependecy to lib9p

From: Mark Johnston <markj_at_freebsd.org>
Date: Wed, 29 Mar 2023 13:52:46 UTC
On Wed, Mar 29, 2023 at 03:42:21PM +0200, Corvin Köhne wrote:
> 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(-)
> > [...]
> 
> 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?

John dug into this already and posted a series of different solutions:
https://reviews.freebsd.org/D39213
https://reviews.freebsd.org/D39222
https://reviews.freebsd.org/D39245

The last one is probably the one that will end up being committed.  In
the meantime, the easiest workaround is probably to simply revert my
commit.