[tlbuild] New xindy: Undefined symbol "locale_charset"

Nikola Lečić nikola.lecic at anthesphoria.net
Thu May 8 15:07:20 CEST 2014


On Thu, 8 May 2014 02:21:43 +0200
Joachim Schrod <jschrod at acm.org> wrote:

> Nikola Lečić writes:
> > xindy now works fine.
> 
> Hey, great to hear!!!
> 
> I think it would be good to add a recipe for that to README-clisp.
> 
> What did you change, at what step in configure / make / make install?

Actually, thanks to Karl's suggestion to try static libncurses, I built
even better xindy binary, one that needs only libc and libm. This
means, in FreeBSD world, xindy that works out of the box on everything
newer than 7.0 (released in 2008) -- i.e. absolutely portable, which is
our main aim.

My steps:

* I followed these steps to build clisp-2.49:
https://www.tug.org/svn/texlive/trunk/Build/source/utils/README?view=markup

Just for the case, I applied the official FreeBSD patches:
http://svnweb.freebsd.org/ports/head/lang/clisp/files/

configure run like this:

./configure --with-ffcall \
  --with-libffcall-prefix=/root/clisp/clisp-tools \
  --disable-mmap --with-libsigsegv-prefix=/root/clisp/clisp-tools \
  --without-readline --disable-nls \
  --without-libiconv-prefix /root/clisp/clisp-build

The result:

./boot/lisp.run:
        libncurses.so.7 => /lib/libncurses.so.7 (0x80081d000)
        libiconv.so.3 => not found (0x0)
        libc.so.7 => /lib/libc.so.7 (0x800969000)
./base/lisp.run:
        libm.so.5 => /lib/libm.so.5 (0x80083e000)
        libcrypt.so.4 => /lib/libcrypt.so.4 (0x800958000)
        libncurses.so.7 => /lib/libncurses.so.7 (0x800a71000)
        libiconv.so.3 => not found (0x0)
        libc.so.7 => /lib/libc.so.7 (0x800bbd000)
./gctrigger:
        libc.so.7 => /lib/libc.so.7 (0x800635000)
./varbrace:
        libc.so.7 => /lib/libc.so.7 (0x800636000)
./txt2c:
        libc.so.7 => /lib/libc.so.7 (0x800634000)
./ccmp2c:
        libc.so.7 => /lib/libc.so.7 (0x800637000)
./comment5:
        libc.so.7 => /lib/libc.so.7 (0x800634000)
./lisp.run:
        libncurses.so.7 => /lib/libncurses.so.7 (0x80081d000)
        libiconv.so.3 => not found (0x0)
        libc.so.7 => /lib/libc.so.7 (0x800969000)
./clisp:
        libncurses.so.7 => /lib/libncurses.so.7 (0x800634000)
        libiconv.so.3 => not found (0x0)
        libc.so.7 => /lib/libc.so.7 (0x800780000)

-----------------------------------------------------------------------

To get rid of libiconv, I applied the following patch:

--- ./src/unix.d~	2010-04-27 20:40:10.000000000 +0000
+++ ./src/unix.d	2014-05-07 18:42:14.000000000 +0000
@@ -706,12 +706,7 @@
 #endif
 
 /* Character set conversion: */
-#ifdef HAVE_ICONV
-  #include <iconv.h>
-  extern_C iconv_t iconv_open (const char * to_code, const char * from_code);
-  extern_C size_t iconv (iconv_t cd, ICONV_CONST char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t* outbytesleft);
-  extern_C int iconv_close (iconv_t cd);
-#endif
+#undef HAVE_ICONV
 
 /* Interpretation of FILETIME structure: */
 #ifdef UNIX_CYGWIN32

The result:

./base/lisp.run:
        libm.so.5 => /lib/libm.so.5 (0x28228000)
        libcrypt.so.4 => /lib/libcrypt.so.4 (0x2823d000)
        libncurses.so.7 => /lib/libncurses.so.7 (0x28256000)
        libc.so.7 => /lib/libc.so.7 (0x28295000)
./boot/lisp.run:
        libncurses.so.7 => /lib/libncurses.so.7 (0x2820a000)
        libc.so.7 => /lib/libc.so.7 (0x28249000)
./full/lisp.run:
        libm.so.5 => /lib/libm.so.5 (0x28228000)
        libcrypt.so.4 => /lib/libcrypt.so.4 (0x2823d000)
        libncurses.so.7 => /lib/libncurses.so.7 (0x28256000)
        libc.so.7 => /lib/libc.so.7 (0x28295000)
./ccmp2c:
        libc.so.7 => /lib/libc.so.7 (0x28080000)
./clisp:
        libncurses.so.7 => /lib/libncurses.so.7 (0x2807e000)
        libc.so.7 => /lib/libc.so.7 (0x280bd000)
./comment5:
        libc.so.7 => /lib/libc.so.7 (0x2807e000)
./gctrigger:
        libc.so.7 => /lib/libc.so.7 (0x2807e000)
./lisp.run:
        libncurses.so.7 => /lib/libncurses.so.7 (0x2820a000)
        libc.so.7 => /lib/libc.so.7 (0x28249000)
./txt2c:
        libc.so.7 => /lib/libc.so.7 (0x2807e000)
./varbrace:
        libc.so.7 => /lib/libc.so.7 (0x2807f000)

-----------------------------------------------------------------------

Now, to get rid of libncurses (which is, at least on FreeBSD, needed
for tgetent(), tgetnum(), tgetflag(), tputs() and tgoto()), after
running configure, I edited Makefile directly. In the line LIBS = ...,
instead of -lncurses, I put /usr/lib/libncurses.a.

Finally, to get rid of libcrypt, I simply physically removed libcrypt.so
from the system during the build. The compiler used libm instead of it,
which is very good.

The result looks nice:

./comment5:
        libc.so.7 => /lib/libc.so.7 (0x800634000)
./gctrigger:
        libc.so.7 => /lib/libc.so.7 (0x800635000)
./varbrace:
        libc.so.7 => /lib/libc.so.7 (0x800636000)
./txt2c:
        libc.so.7 => /lib/libc.so.7 (0x800634000)
./ccmp2c:
        libc.so.7 => /lib/libc.so.7 (0x800637000)
./lisp.run:
        libc.so.7 => /lib/libc.so.7 (0x800838000)
./boot/lisp.run:
        libc.so.7 => /lib/libc.so.7 (0x800838000)
./clisp:
        libc.so.7 => /lib/libc.so.7 (0x800634000)
./base/lisp.run:
        libm.so.5 => /lib/libm.so.5 (0x80085e000)
        libc.so.7 => /lib/libc.so.7 (0x800978000)
./full/lisp.run:
        libm.so.5 => /lib/libm.so.5 (0x80085e000)
        libc.so.7 => /lib/libc.so.7 (0x800978000)

-----------------------------------------------------------------------

Sorry, due to shortage of time and since our main goal is achieved, I
can't try to translate these steps into a proper patch against clisp
source right now. But if you find it useful to do so (since increased
portability is useful on every platform), I'll be glad to test.

Best,
-- 
Nikola Lečić = Никола Лечић
fingerprint : FEF3 66AF C90E EDC3 D878  7CDC 956D F4AB A377 1C9B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 314 bytes
Desc: not available
URL: <http://tug.org/pipermail/tlbuild/attachments/20140508/4d0f4d1c/attachment.bin>


More information about the tlbuild mailing list