[tlbuild] missing libiconv when compiling xdvik on FreeBSD
Bruno Haible
bruno at clisp.org
Mon Apr 2 19:42:54 CEST 2018
Hi Mojca,
> This is because libiconv's iconv.h does:
>
> #define iconv_open libiconv_open
> ...
> #define iconv_close libiconv_close
Yes, these definitions are there to signal a mismatch between libiconv and
the system's iconv early, namely to provoke a link error rather than a crash
at run time.
> Now, xdvi on checks the first one, realizes that one doesn't need to
> add -liconv, but then another dependency needs -I/usr/local/include
> and that breaks the build.
The fix should be to reorder the configure.ac file, so that macros that
augment $CPPFLAGS come early.
> I was pointed to
> https://www.gnu.org/software/gettext/manual/html_node/AM_005fICONV.html
> which is considered an "upstream" version that is supposed to take
> care of all these strange iconv anomalies.
>
> So I took an upstream copy of iconv.m4, put it to
> texk/xdvik/m4/iconv.m4 and made the following change:
>
> --- texk/xdvik/configure.ac (revision 47244)
> +++ texk/xdvik/configure.ac (working copy)
> @@ -114,7 +114,7 @@
> AC_CHECK_HEADERS([netdb.h sys/bsdtypes.h sys/param.h unistd.h
> sys/fcntl.h regex.h])
>
> # Checks for iconv
> -XDVI_CHECK_ICONV
> +AM_ICONV
>
> # Checks for langinfo
> XDVI_CHECK_LANGINFO
>
> I was then stuck because apparently I didn't run all the autofoo magic
> correctly.
>
> automake
> configure.ac:117: error: required file '../../build-aux/config.rpath' not found
iconv.m4 is nowadays better packaged in gnulib.
To import it, either use gnulib-tool (probably overkill in this case) or copy
the following files from gnulib:
m4/iconv.m4
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
m4/host-cpu-c-abi.m4
m4/asm-underscore.m4
build-aux/config.rpath
Bruno
More information about the tlbuild
mailing list