In src.conf: WITHOUT_CAPSICUM= WITHOUT_CASPER= ... ===> usr.bin/newkey (all) ld: error: unable to find library -lcasper ld: error: unable to find library -lcap_pwd ld: error: unable to find library -lcap_grp cc: error: linker command failed with exit code 1 (use -v to see invocation) --- bhyve --- *** [bhyve] Error code 1 make[4]: stopped in /usr/src/usr.sbin/bhyve
Created attachment 221203 [details] patch Hello, Could you please verify this patch? Thank you, Mariusz
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=966026246e62769f3bcd8247a47fe0f4f0433aba commit 966026246e62769f3bcd8247a47fe0f4f0433aba Author: Mariusz Zaborski <oshogbo@FreeBSD.org> AuthorDate: 2021-01-03 16:18:22 +0000 Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> CommitDate: 2021-01-03 16:21:28 +0000 bhyve: fix build without casper/capsicum support PR: 252353 usr.sbin/bhyve/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
Sorry for delay, system was busy by rebuilding all ports. This is with current main: ===> usr.sbin/wpa/wpa_supplicant (all) ld: error: /tmp/obj.world/usr/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined reference to cap_getgrgid_r [--no-allow-shlib-undefined] ld: error: /tmp/obj.world/usr/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined reference to cap_getpwuid_r [--no-allow-shlib-undefined] ld: error: /tmp/obj.world/usr/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined reference to cap_close [--no-allow-shlib-undefined] ld: error: /tmp/obj.world/usr/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined reference to cap_getpwnam [--no-allow-shlib-undefined] ld: error: /tmp/obj.world/usr/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined reference to cap_init [--no-allow-shlib-undefined] ld: error: /tmp/obj.world/usr/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined reference to cap_service_open [--no-allow-shlib-undefined] ld: error: /tmp/obj.world/usr/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined reference to cap_setgroupent [--no-allow-shlib-undefined] ld: error: /tmp/obj.world/usr/src/amd64.amd64/tmp/usr/lib/lib9p.so: undefined reference to cap_setpassent [--no-allow-shlib-undefined] cc: error: linker command failed with exit code 1 (use -v to see invocation) --- bhyve --- *** [bhyve] Error code 1 make[4]: stopped in /usr/src/usr.sbin/bhyve
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=381073282961af9d11d6225fcf9dfdf650915acf commit 381073282961af9d11d6225fcf9dfdf650915acf Author: Mariusz Zaborski <oshogbo@FreeBSD.org> AuthorDate: 2021-01-04 19:48:48 +0000 Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> CommitDate: 2021-01-04 19:48:48 +0000 lib9p: fix building on systems without capser PR: 252353 lib/lib9p/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Hello, I just pushed almost are changes that make it possible to build system without Capsicum/Casper (we should remove this options). The last missing part is in libp9 which is in contrib. I created a pull request (https://github.com/conclusiveeng/lib9p/pull/16). I'm not sure if I should commit this change or wait for upstream. Thanks, Mariusz PS. Can I ask why you are building without it?
> I'm not sure if I should commit this change or wait for upstream. Generally speaking I think it's fair to commit a change to contrib/ for a build fix as long as there's an upstream report/pull request/patch in the pipeline.
(In reply to Mariusz Zaborski from comment #5) Thanks, looks like all OK at this time, no error. I am prefer to not build staff that I do not use, don't know or don't understand why it may be used for my purposes. As bonus - less build time required. My kernel is only 14mb, with all modules - 18mb for server and 45mb for desktop. Configs: http://www.netlab.linkpc.net/download/software/os_cfg/FBSD/ Capsicum - gives nothing. It is used in few apps that I do not use or that no need to some "extended protection". I like MAC, but use it time to times, with my custom kernel module to allow raw sockets/broadcasts for unprivileged users (requires for some games under wine). May be I am wrong, but IMHO MAC can do same and even more than capsicum.
As I understand all fixes are committed in current and this can be closed. Do I miss something?
Yes. Everything should work. Thank you for reporting :)