Bug 277462 - lib/libpam: build error: "LDADD_pam is recursive" in NO_SHARED= build
Summary: lib/libpam: build error: "LDADD_pam is recursive" in NO_SHARED= build
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.0-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-03 22:59 UTC by Siva Mahadevan
Modified: 2024-03-04 01:42 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Siva Mahadevan 2024-03-03 22:59:50 UTC
When building FreeBSD stable/14 HEAD using NO_SHARED=, I run into make errors like the following on all subdirs that depend on PAM through "LIBADD+= pam":

Variable LDADD_pam is recursive.                                                                                                                               
        in /usr/local/poudriere/jails/poudriere_stable14_MYN100M/usr/src/share/mk/bsd.libnames.mk:178                                                          
        in /usr/local/poudriere/jails/poudriere_stable14_MYN100M/usr/src/share/mk/bsd.prog.mk:269                                                              
        in /usr/local/poudriere/jails/poudriere_stable14_MYN100M/usr/src/secure/usr.sbin/sshd/Makefile:70                                                      
                                                                                                                                                               
make[5]: stopped in /usr/local/poudriere/jails/poudriere_stable14_MYN100M/usr/src/secure/usr.sbin/sshd

I see that the reason is due to libpam depending on libpam_modules, which in turn depends on libpam.

@bdrewery This commit[0] removes the old logic of hacking around this case. How can I do a successful base system build with NO_SHARED= ?

[0] https://cgit.freebsd.org/src/commit/lib/libpam/modules/Makefile.inc?id=7cbd0a2953a27e74f8b1b261808068719c1f5260