Repository: spack/spack

Issue:
package error linux-pam: fatal error: rpc/rpc.h: No such file or directory
I'm trying to install flux-security, and this looks to be a dependency "linux-pam"

```console
==> Installing linux-pam-1.5.2-offodszhf3suwkcqq5z2c4anlyfzwykm [69/79]
==> No binary for linux-pam-1.5.2-offodszhf3suwkcqq5z2c4anlyfzwykm found: installing from source
==> Using cached archive: /opt/spack-environment/spack/var/spack/cache/_source-cache/archive/e4/e4ec7131a91da44512574268f493c6d8ca105c87091691b8e9b56ca685d4f94d.tar.xz
==> No patches needed for linux-pam
==> linux-pam: Executing phase: 'autoreconf'
==> linux-pam: Executing phase: 'configure'
==> linux-pam: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j16' 'V=1'

5 errors found in build log:
     964     mv -f .deps/unix_chkpwd-unix_chkpwd.Tpo .deps/unix_chkpwd-unix_chkpwd.Po
     965     libtool: compile:  /opt/spack-environment/spack/lib/spack/env/gcc/gcc -DHAVE_CONFIG_H -I. -I../.. -I../../libpam/include -I../../libpamc/include -DCHKPWD_HELPER=\"/opt/soft
             ware/linux-ubuntu22.04-neoverse_v1/gcc-11.4.0/linux-pam-1.5.2-offodszhf3suwkcqq5z2c4anlyfzwykm/sbin/unix_chkpwd\" -DUPDATE_HELPER=\"/opt/software/linux-ubuntu22.04-neoverse
             _v1/gcc-11.4.0/linux-pam-1.5.2-offodszhf3suwkcqq5z2c4anlyfzwykm/sbin/unix_update\" -W -Wall -Wbad-function-cast -Wcast-align -Wcast-align=strict -Wcast-qual -Wdeprecated -W
             inline -Wmain -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wshadow -Wstrict-prototypes -Wuninitialized -Wwrite-stri
             ngs -g -O2 -MT bigcrypt.lo -MD -MP -MF .deps/bigcrypt.Tpo -c bigcrypt.c  -fPIC -DPIC -o .libs/bigcrypt.o
     966     /bin/bash ../../libtool  --tag=CC   --mode=compile /opt/spack-environment/spack/lib/spack/env/gcc/gcc -DHAVE_CONFIG_H -I. -I../..    -I../../libpam/include -I../../libpamc/
             include -DCHKPWD_HELPER=\"/opt/software/linux-ubuntu22.04-neoverse_v1/gcc-11.4.0/linux-pam-1.5.2-offodszhf3suwkcqq5z2c4anlyfzwykm/sbin/unix_chkpwd\" -DUPDATE_HELPER=\"/opt/
             software/linux-ubuntu22.04-neoverse_v1/gcc-11.4.0/linux-pam-1.5.2-offodszhf3suwkcqq5z2c4anlyfzwykm/sbin/unix_update\" -W -Wall -Wbad-function-cast -Wcast-align -Wcast-align
             =strict -Wcast-qual -Wdeprecated -Winline -Wmain -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wshadow -Wstrict-prot
             otypes -Wuninitialized -Wwrite-strings -g -O2 -MT md5_good.lo -MD -MP -MF .deps/md5_good.Tpo -c -o md5_good.lo md5_good.c
     967     mv -f .deps/unix_update-unix_update.Tpo .deps/unix_update-unix_update.Po
     968     /bin/bash ../../libtool  --tag=CC   --mode=compile /opt/spack-environment/spack/lib/spack/env/gcc/gcc -DHAVE_CONFIG_H -I. -I../..    -I../../libpam/include -I../../libpamc/
             include -DCHKPWD_HELPER=\"/opt/software/linux-ubuntu22.04-neoverse_v1/gcc-11.4.0/linux-pam-1.5.2-offodszhf3suwkcqq5z2c4anlyfzwykm/sbin/unix_chkpwd\" -DUPDATE_HELPER=\"/opt/
             software/linux-ubuntu22.04-neoverse_v1/gcc-11.4.0/linux-pam-1.5.2-offodszhf3suwkcqq5z2c4anlyfzwykm/sbin/unix_update\" -W -Wall -Wbad-function-cast -Wcast-align -Wcast-align
             =strict -Wcast-qual -Wdeprecated -Winline -Wmain -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wshadow -Wstrict-prot
             otypes -Wuninitialized -Wwrite-strings -g -O2 -MT md5_broken.lo -MD -MP -MF .deps/md5_broken.Tpo -c -o md5_broken.lo md5_broken.c
     969     libtool: compile:  /opt/spack-environment/spack/lib/spack/env/gcc/gcc -DHAVE_CONFIG_H -I. -I../.. -I../../libpam/include -I../../libpamc/include -DCHKPWD_HELPER=\"/opt/soft
             ware/linux-ubuntu22.04-neoverse_v1/gcc-11.4.0/linux-pam-1.5.2-offodszhf3suwkcqq5z2c4anlyfzwykm/sbin/unix_chkpwd\" -DUPDATE_HELPER=\"/opt/software/linux-ubuntu22.04-neoverse
             _v1/gcc-11.4.0/linux-pam-1.5.2-offodszhf3suwkcqq5z2c4anlyfzwykm/sbin/unix_update\" -W -Wall -Wbad-function-cast -Wcast-align -Wcast-align=strict -Wcast-qual -Wdeprecated -W
             inline -Wmain -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wshadow -Wstrict-prototypes -Wuninitialized -Wwrite-stri
             ngs -g -O2 -MT pam_unix_sess.lo -MD -MP -MF .deps/pam_unix_sess.Tpo -c pam_unix_sess.c  -fPIC -DPIC -o .libs/pam_unix_sess.o
  >> 970     pam_unix_passwd.c:80:11: fatal error: rpc/rpc.h: No such file or directory
     971        80 | # include <rpc/rpc.h>
     972           |           ^~~~~~~~~~~
     973     compilation terminated.
```

I tried installing rpc.h on my host, but to no avail - it likely needs to be defined with the package here. Thanks for the help!


Discussion:
`rpc.h` was removed from glibc at some point, and moved into libtirpc.

Looks like a missing dependency.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/linux-pam/package.py b/var/spack/repos/builtin/packages/linux-pam/package.py
--- a/var/spack/repos/builtin/packages/linux-pam/package.py
+++ b/var/spack/repos/builtin/packages/linux-pam/package.py
@@ -20,6 +20,8 @@ class LinuxPam(AutotoolsPackage):
     version("1.4.0", sha256="cd6d928c51e64139be3bdb38692c68183a509b83d4f2c221024ccd4bcddfd034")
     version("1.3.1", sha256="eff47a4ecd833fbf18de9686632a70ee8d0794b79aecb217ebd0ce11db4cd0db")
 
+    depends_on("libtirpc")
+
     depends_on("m4", type="build")
     depends_on("autoconf", type="build")
     depends_on("automake", type="build")


Test patch: