[PATCH] Fix build error where nscd_flush_cache() is available

Steve French smfrench at gmail.com
Tue Aug 12 16:57:01 GMT 2008


If it really is required to link nscd support libs in with cifs kernel
support to get cifs.spnego working, I don't mind, but we need to watch
the ever growing size of this module - since this is a system util
(needed for mount) - not an optional user space program, this util
(cifs.spnego) has to be small enough to fit on very low end (perhaps
embedded systems).   At the moment, it looks like cifs.spnego has
gotten quite big.  On my system, listing Samba files by size - I see
that smbd is 17MB, fairly big, as expected, but the client utils are
much bigger than expected (over 10MB each) - cifs.spnego is already
twice as big as nmbd on disk (10464075) which makes it hard to fit on
some embedded systems.  Even if debug info is stripped out -
cifs.spnego has grown pretty large due to the static library linkage.

On Tue, Aug 12, 2008 at 5:17 AM, Suresh Jayaraman <sjayaraman at suse.de> wrote:
> When I enable cifs.spnego support, I get the following build error:
>
> Linking shared library bin/pam_smbpass.so
> lib/util_nscd.o: In function `smb_nscd_flush_cache':
> /usr/src/packages/BUILD/samba-3.2.0/source/lib/util_nscd.c:25: undefined
> reference to `nscd_flush_cache'
> collect2: ld returned 1 exit status
> make: *** [bin/cifs.spnego] Error 1
>
> This patch fixes this error.
>
> ---
> source/Makefile.in |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/source/Makefile.in b/source/Makefile.in
> index 41753c5..0ea6af6 100644
> --- a/source/Makefile.in
> +++ b/source/Makefile.in
> @@ -1395,7 +1395,7 @@ bin/cifs.spnego at EXEEXT@: $(BINARY_PREREQS)
> $(CIFS_SPNEGO_OBJ) $(LIBSMBCLIENT_OBJ
>        @$(CC) $(FLAGS) -o $@ $(CIFS_SPNEGO_OBJ) $(DYNEXP) $(LDFLAGS) \
>                -lkeyutils $(LIBS) $(LIBSMBCLIENT_OBJ1) $(KRB5LIBS) \
>                $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(WINBIND_LIBS) \
> -               $(LIBTDB_LIBS)
> +               $(LIBTDB_LIBS) $(NSCD_LIBS)
>
> bin/testparm at EXEEXT@: $(BINARY_PREREQS) $(TESTPARM_OBJ) @BUILD_POPT@
> @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
>        @echo Linking $@
>
>
>



-- 
Thanks,

Steve


More information about the samba-technical mailing list