[tlbuild] missing libiconv when compiling xdvik on FreeBSD

Mojca Miklavec mojca.miklavec.lists at gmail.com
Thu Sep 21 13:41:41 CEST 2017


Hi,

I believe that the problem lies in texk/xdvik/m4/xdvi-check-iconv.m4.
The log from configuring xdvik says:

checking for iconv.h... yes
checking for library containing iconv... none required
checking for iconv input type... char **

There is this part of code that I don't entirely understand (or
rather: didn't yet take enough time to decrypt it):


AC_LANG_CONFTEST([AC_LANG_PROGRAM([[#include <stdlib.h>
#include <iconv.h>]],
                                  [[iconv_t cd = iconv_open("","");]])])
xdvi_cv_search_iconv=no
for xdvi_lib in "" -liconv -lrecode; do
  LIBS="$xdvi_lib $xdvi_iconv_save_LIBS"
  AC_LINK_IFELSE([],
                 [xdvi_cv_search_iconv=$xdvi_lib
                  break])
done
test "x$xdvi_cv_search_iconv" = x && xdvi_cv_search_iconv="none required"
LDFLAGS=$xdvi_iconv_save_LDFLAGS
LIBS=$xdvi_iconv_save_LIBS])
]) # _XDVI_ICONV_LIB


but I suspect that the code is trying to compile with "-liconv" which
succeeds and then somehow concludes
    xdvi_cv_search_iconv="none required"

and doesn't add any iconv flag like it should.

What's the current upstream tracker for xdvi?

Mojca


On 16 September 2017 at 12:40, Mojca Miklavec wrote:
> Hi,
>
> We just tried to compile TL on FreeBSD 11.1. It break when building
> xdvik even though libiconv is present on the machine (but there's no
> "-liconv" in the link command).
>
> Does anyone know the best way to proceed?
>
> libtool: link: cc -Wimplicit -Wreturn-type
> -Wdeclaration-after-statement -Wno-unknown-pragmas -g -O2 -o xdvi-bin
> main.o -Wl,--allow-multiple-definition  libxdvi.a
> /path/to/Work/texk/kpathsea/.libs/libkpathsea.a
> /path/to/Work/libs/freetype2/libfreetype.a -L/usr/local/lib -lXaw
> -lXmu -lXt -lSM -lICE -lXext -lXpm -lX11 -lm
> libxdvi.a(util.o): In function `iconv_convert_string':
> /path/to/Work/texk/xdvik/../../../texk/xdvik/util.c:1829: undefined
> reference to `libiconv_open'
> /path/to/Work/texk/xdvik/../../../texk/xdvik/util.c:1846: undefined
> reference to `libiconv'
> /path/to/Work/texk/xdvik/../../../texk/xdvik/util.c:1857: undefined
> reference to `libiconv_close'
> /path/to/Work/texk/xdvik/../../../texk/xdvik/util.c:1852: undefined
> reference to `libiconv_close'
> libxdvi.a(encodings.o): In function `cjk2unicode':
> /path/to/Work/texk/xdvik/../../../texk/xdvik/encodings.c:3059:
> undefined reference to `libiconv'
> /path/to/Work/texk/xdvik/../../../texk/xdvik/encodings.c:3044:
> undefined reference to `libiconv_open'
> libxdvi.a(encodings.o): In function `close_iconv':
> /path/to/Work/texk/xdvik/../../../texk/xdvik/encodings.c:3021:
> undefined reference to `libiconv_close'
> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> gmake[5]: *** [Makefile:763: xdvi-bin] Error 1
> gmake[5]: Leaving directory '/path/to/Work/texk/xdvik'
> gmake[4]: *** [Makefile:996: all-recursive] Error 1
> gmake[4]: Leaving directory '/path/to/Work/texk/xdvik'
> gmake[3]: *** [Makefile:585: all] Error 2
> gmake[3]: Leaving directory '/path/to/Work/texk/xdvik'
> gmake[2]: *** [Makefile:906: recurse] Error 1
> gmake[2]: Leaving directory '/path/to/Work/texk'
> gmake[1]: *** [Makefile:486: all-recursive] Error 1
> gmake[1]: Leaving directory '/path/to/Work/texk'
> gmake: *** [Makefile:575: all-recursive] Error 1
>
> Thank you,
>     Mojca


More information about the tlbuild mailing list