pam-1.2.1-r2 and pam-1.3.0-r2 install headers under $PREFIX/usr/include instead of under $PREFIX/usr/include/security pam-1.2.1-r2: ls /storage/strogdon/gentoo-rap/var/tmp/portage/sys-libs/pam-1.2.1-r2/image/storage/strogdon/gentoo-rap/usr/include/ _pam_compat.h _pam_macros.h _pam_types.h pam_appl.h pam_client.h pam_ext.h pam_filter.h pam_misc.h pam_modules.h pam_modutil.h pam-1.3.0-r2: ls /storage/strogdon/gentoo-rap/var/tmp/portage/sys-libs/pam-1.3.0-r2/image/storage/strogdon/gentoo-rap/usr/include/ _pam_compat.h _pam_macros.h _pam_types.h pam_appl.h pam_client.h pam_ext.h pam_filter.h pam_misc.h pam_modules.h pam_modutil.h This ultimately causes openrc to fail to install start-stop-daemon.c:52:10: fatal error: security/pam_appl.h: No such file or directory 52 | #include <security/pam_appl.h> | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [../../mk/prog.mk:35: start-stop-daemon.o] Error 1 supervise-daemon.c:54:10: fatal error: security/pam_appl.h: No such file or directory 54 | #include <security/pam_appl.h> | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [../../mk/prog.mk:35: supervise-daemon.o] Error 1
sys-libs/libcap-[2.26-r2 | 2.27] also fail to build for the reason - headers not installed under $PREFIX/include/security
we shouldn't try to install pam in Prefix, we should find the pkgs that depend on it and see why they need it