[tlbuild] Cannot compile xdvik
luigi scarso
luigi.scarso at gmail.com
Tue Feb 25 21:55:41 CET 2025
On Tue, 25 Feb 2025 at 19:17, Apostolos Syropoulos <asyropoulos at gmail.com>
wrote:
> Hi Luigi,
>
> First of all thank you for having a look at this problem. The following
> patch "solves: the problem:
>
> --- encodings.c.orig 2025-02-25 20:05:04.352882281 +0200
> +++ encodings.c.new 2025-02-25 20:04:47.314022182 +0200
> @@ -67,6 +67,9 @@
> #include "xdvi.h"
>
> #if HAVE_ICONV_H
> +#ifdef __sun
> +#define _XPG6
> +#endif
> # include <iconv.h>
> static iconv_t m_iconv_gb_ucs4 = (iconv_t)(-1);
> #endif /* HAVE_ICONV_H */
>
>
>
Assuming the standard Work directory that host the compiled files,
what does
grep -3 ICONV_CHAR_PPTR_TYPE source/Work/texk/xdvik/c-auto.h
say ?
ICONV_CHAR_PPTR_TYPE should be
const char **
but I think it's char **
and this case we have to patch here
source/texk/xdvik/m4/xdvi-check-iconv.m4
# _XDVI_ICONV_CHAR_PPTR_TYPE
# --------------------------
# Check whether iconv takes a 'const char **' or a 'char **' input argument.
# According to IEEE 1003.1, `char **' is correct, but e.g. librecode
# uses `const char **'.
# Inspired by Autoconf's AC_FUNC_SELECT_ARGTYPES we do this without the need
# to run a test program or to use C++.
m4_define([_XDVI_ICONV_CHAR_PPTR_TYPE], [dnl
AC_CACHE_CHECK([for iconv input type],
[xdvi_cv_iconv_char_pptr_type],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
/* iconv() definitions may differ depending on following macros ... */
#ifdef __hpux
/* On HP-UX 10.10 B and 20.10, compiling with _XOPEN_SOURCE + ..._EXTENDED
* leads to poll() not realizing that a file descriptor is writable in
psgs.c.
*/
# define _HPUX_SOURCE 1
#else
# ifndef _XOPEN_SOURCE
# define _XOPEN_SOURCE 600
# endif
# define _XOPEN_SOURCE_EXTENDED 1
# define __EXTENSIONS__ 1 /* needed to get struct timeval on SunOS
5.5 */
# define _SVID_SOURCE 1 /* needed to get S_IFLNK in glibc */
# define _BSD_SOURCE 1 /* needed to get F_SETOWN in glibc-2.1.3 */
#endif
#include <iconv.h>
]],
[[extern size_t iconv(iconv_t, char **, size_t *, char**,
size_t*);]])],
[xdvi_cv_iconv_char_pptr_type='char **'],
[xdvi_cv_iconv_char_pptr_type='const char **'])])
AC_DEFINE_UNQUOTED([ICONV_CHAR_PPTR_TYPE], [$xdvi_cv_iconv_char_pptr_type],
[Define the type of the iconv input string (char ** or
const char **)])
]) # _XDVI_ICONV_CHAR_PPTR_TYPE
But the question is: why are you having this problem now?
Iirc, on Sat 8 Feb your compilation was ok.
--
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tlbuild/attachments/20250225/5805a5f4/attachment-0001.htm>
More information about the tlbuild
mailing list.