[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Build error due to missing locale_t on IBM z/OS
From: |
Daniel Richard G. |
Subject: |
Re: Build error due to missing locale_t on IBM z/OS |
Date: |
Sun, 08 Oct 2017 18:17:49 -0400 |
Hi Bruno,
On Sun, 2017 Oct 8 10:53+0200, Bruno Haible wrote:
> Hi Daniel,
>
> > I tested the latest tree on z/OS, and encountered this compile
> > error:
>
> Since you are the only one here on this list who has access to z/OS,
> we need more details in order to perform the analysis:
>
> 1) What is 'xlc-wrap', compared to 'xlc'? (I'd like to know if
> something is missing in Autoconf or gnulib-common.m4.)
xlc-wrap is my own script. It is quite simple:
#!/bin/sh
exec xlc -qnosearch "$@" -qsearch=/usr/include
It is used to work around a non-standard behavior of the compiler, where
/usr/include/ is effectively first in the header search path (before any
-I directories). Obviously an issue for Gnulib's replacement headers.
I haven't gotten around yet to submitting this issue formally to Gnulib.
For an example of how such a workaround can be integrated, look at
AC_ZOS_USS in m4/arch.m4 in the GNU Gawk source. It's fairly
comprehensive in addressing the toolchain weirdness of z/OS.
> 2)
> > ERROR CCN3166 ./locale.h:648 Definition of function locale_t requires
> > parentheses.
> > ERROR CCN3276 ./locale.h:648 Syntax error: possible missing '{'?
>
> Can you show the lines around 648 in the generated locale.h?
> Unfortunately the line numbers in locale.h and locale.in.h are not
> the same.
Line 648 is marked below:
-----begin locale.h excerpt-----
#if 1
# if 1
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef duplocale
# define duplocale rpl_duplocale
# endif
_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL
((1))); <---HERE
_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
# else
# if 1
_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
# endif
# endif
# if 1
_GL_CXXALIASWARN (duplocale);
-----end locale.h excerpt-----
When I looked at the preprocessed source, the first mention of locale_t
came from that line. So it seems that while all other systems provide
locale_t, z/OS is an exception.
> 3)
> > ERROR CCN3273 /usr/include/stdlib.h:64 Missing type in declaration of
> > div_t.
> > ERROR CCN3166 /usr/include/stdlib.h:544 Definition of function div_t
> > requires parentheses.
>
> Can you show the lines around 64 and 544 in /usr/include/stdlib.h?
Sure...
-----begin stdlib.h excerpt-----
#if __TARGET_LIB__ >= __EDC_LE
typedef struct __div_t
#else
typedef struct div_t
#endif
{
int quot; /* quotient of integer division */
int rem; /* remainder of integer division */
} div_t; <---HERE
[...]
int wctomb ();
size_t mbstowcs ();
size_t wcstombs ();
#else
div_t div (int, int); <---HERE
long int labs (long int);
ldiv_t ldiv (long int, long int);
-----end stdlib.h excerpt-----
These errors are probably cascaded from the earlier syntax error, so I
wouldn't worry about them for now.
--Daniel
--
Daniel Richard G. || address@hidden
My ASCII-art .sig got a bad case of Times New Roman.