[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patches] NSSWITCH build failure.
- To: Steve Papacharalambous <stevep@xxxxxxxxxxxxx>
- Subject: Re: [patches] NSSWITCH build failure.
- From: Jim Blandy <jimb@xxxxxxxxxxxxxxxx>
- Date: Fri, 19 Oct 2007 16:59:28 -0700
Steve Papacharalambous <stevep at freescale.com> writes:
> When the NSSWITCH option group is disabled eglibc fails to build. I am
> using eglibc svn version r3767, and the contents of the
> option-groups.config file is:
>
> [snip]
> OPTION_EGLIBC_NSSWITCH = n
> OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG =
> ${RPM_BUILD_DIR}/csl-tc-%{csl_version}/eglibc-%{eglibc_ver}/libc/nss/fixed-nsswitch.conf OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${RPM_BUILD_DIR}/csl-tc-%{csl_version}/eglibc-%{eglibc_ver}/libc/nss/fixed-nsswitch.functions
> [/snip]
>
> I've attached the build log showing the errors,
Hi, Steve. internal_function is usually given a non-trivial
#definition by config.h, generated by the configure script, and then
given a default #definition by include/libc-symbols.h. I assume
you're doing a Power build, which may have caused the config.h
#definition not to appear. Since gen-fixed-nsswitch is meant to run
on the build machine, not the target machine, it doesn't #include
libc-symbols.h. There's already a dummy definition of
libc_hidden_proto in gen-fixed-nsswitch.c, so something like the patch
below would work.
But I wonder whether gen-fixed-nsswitch.c should #include "nsswitch.h"
at all; that's really a header for target code, not build code, and we
only need it for structures that we're going to print out as C
variable definitions anyway; gen-fixed-nsswitch.c doesn't link against
anything else from that directory. We could simply give
gen-fixed-nsswitch.c its own copy of the data structure definitions;
that would make the 'union' added to the 'service_user' type
unnecessary again.
I'll give the latter a try and post again later.
ChangeLog.eglibc:
2007-10-19 Jim Blandy <jimb@xxxxxxxxxxxxxxxx>
* nss/gen-fixed-nsswitch.c (internal_function): Provide a default
definition for this as well.
Index: nss/gen-fixed-nsswitch.c
===================================================================
--- nss/gen-fixed-nsswitch.c (revision 3866)
+++ nss/gen-fixed-nsswitch.c (working copy)
@@ -27,7 +27,12 @@
#include <assert.h>
#include <ctype.h>
+/* These are used in nsswitch.h, but aren't #defined by any headers
+ included in compilations for the build machine. */
#define libc_hidden_proto(func)
+#ifndef internal_function
+# define internal_function
+#endif
#include "nsswitch.h"
#include "gnu/lib-names.h"