git.iko.soy/typeable/nixpkgs
on master help sign in
sssd: fix build on glibc-2.32

For https://hydra.nixos.org/build/128488320 which errored with: src/responder/nss/nss_cmd.c:733:16: error: 'nss_setnetgrent' redeclared as different kind of symbol 733 | static errno_t nss_setnetgrent(struct cli_ctx *cli_ctx, | ^~~~~~~~~~~~~~~ In file included from ./src/sss_client/sss_cli.h:28, from ./src/db/sysdb.h:27, from src/responder/nss/nss_cmd.c:26: /nix/store/a2n8nrsf215x01a7fv8l94crdjwf69pa-glibc-2.32-dev/include/nss.h:184:25: note: previous declaration of 'nss_setnetgrent' was here 184 | typedef enum nss_status nss_setnetgrent (const char *, struct __netgrent *); | ^~~~~~~~~~~~~~~ make[2]: *** [Makefile:17818: src/responder/nss/nss_cmd.o] Error 1 make[2]: Leaving directory '/build/sssd-1.16.4' make[1]: *** [Makefile:33824: all-recursive] Error 1 make[1]: Leaving directory '/build/sssd-1.16.4' make: *** [Makefile:10123: all] Error 2

commit22965d84d5e57307d4f6f02d32b50adac2cbb6bb authorGraham Christensen <graham@grahamc.com> dateTue 24 Nov 2020, 09:48 (6 years ago) parent79086e5
1 file changed+10
pkgs/os-specific/linux/sssd/default.nix+10
pkgs/os-specific/linux/sssd/default.nix+10
@@ -54,6 +54,16 @@ stdenv.mkDerivation rec {
5454 configureFlagsArray+=("--with-sudo")
5555 '';
5656
57+ preBuild = ''
58+ # glibc-2.32 includes a full set of NSS stub module declarations
59+ # that conflict with the ones in sssd source. Define _NSS_H to
60+ # prevent them from breaking the compilation, but just for this
61+ # one file.
62+ cat >> Makefile <<EOF
63+ src/responder/nss/nss_cmd.\$(OBJEXT) : DEFS = -DHAVE_CONFIG_H -D_NSS_H
64+ EOF
65+ '';
66+
5767 enableParallelBuilding = true;
5868 buildInputs = [ augeas dnsutils c-ares curl cyrus_sasl ding-libs libnl libunistring nss
5969 samba nfs-utils doxygen python python3 popt