[tlbuild] Cannot compile xdvik

luigi scarso luigi.scarso at gmail.com
Tue Feb 25 16:25:33 CET 2025


On Mon, 24 Feb 2025 at 20:28, Apostolos Syropoulos <asyropoulos at gmail.com>
wrote:

> Hello,
>
> I have tried to build TeXLive on OpenIndiana but I failed with the
> following error:
>
>
> gcc -DHAVE_CONFIG_H -I. -I../../../texk/xdvik  -I../../../texk/xdvik/gui
> -DPS_GS -I/container/texlive/source/Work/texk
> -I/container/texlive/source/texk
> -I/container/texlive/source/Work/libs/freetype2/freetype2    -Wimplicit
> -Wreturn-type -g -O2 -MT encodings.o -MD -MP -MF $depbase.Tpo -c -o
> encodings.o ../../../texk/xdvik/encodings.c &&\
> mv -f $depbase.Tpo $depbase.Po
> ../../../texk/xdvik/encodings.c: In function 'cjk2unicode':
> ../../../texk/xdvik/encodings.c:3059:32: error: passing argument 2 of
> 'iconv' from incompatible pointer type [-Wincompatible-pointer-types]
>  3059 |     if (iconv(m_iconv_gb_ucs4, (iconv_char_pptrT)&from_ptr, &from,
> &to_ptr, &to) == (size_t)(-1)) {
>       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                                |
>       |                                char **
> In file included from ../../../texk/xdvik/encodings.c:70:
> /usr/include/iconv.h:47:32: note: expected 'const char ** restrict' but
> argument is of type 'char **'
>    47 | extern size_t   iconv(iconv_t, const char **_RESTRICT_KYWD,
>       |                                ^
>
> I would appreciate it if someone could help me to resolve this problem.
> A.S.
>
>
Similar to this
https://redmine.audacious-media-player.org/boards/1/topics/2048

Indeed, my /usr/include/iconv.h (Linux glibc) says
extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
                     size_t *__restrict __inbytesleft,
                     char **__restrict __outbuf,
                     size_t *__restrict __outbytesleft);

But it should be  already solved, because
in source/texk/xdvik/m4/xdvi-check-iconv.m4 (from 2013) at the end:
#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

so I guess that at some point there is  a misconfiguration .

In source/Work/build.log, in
=== configuring in xdvik
do you see something like this
checking for iconv.h... yes
checking for library containing iconv... none required
checking for iconv input type... char **
?

--
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tlbuild/attachments/20250225/d02a314a/attachment.htm>


More information about the tlbuild mailing list.