[Dev-luatex] Luatex beta 0.31.0

Vladimir Volovich vvv at vsu.ru
Tue Dec 9 05:58:00 CET 2008


"TH" == Taco Hoekwater writes:

 >> /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined
 >> symbols: _libintl_gettext

 TH> This one is simple to fix, I forgot to suppress libintl (gettext)
 TH> in fontforge's configuration. There are two lines containing

 TH>     #undef HAVE_LIBINTL_H

 TH> inside src/libs/luafontforge/fontforge/inc/config.h.in (one is
 TH> enough really, the other one is a fluke)

 TH> If you put those in C comment tags (like the _HAS_LONGLONG is
 TH> already) then this error will go away, I am sure.

maybe it fixed apple-darwin, but it broke sparc-solaris. :(

here is why:

* on solaris, there IS /usr/include/libintl.h, so HAVE_LIBINTL_H
  would've been normally defined. but hardwiring "#undef HAVE_LIBINTL_H"
  fools the libs/luafontforge/fontforge/inc/intl.h to believe that there
  is no libintl.h in the system, and it executes the branch
  "#if !defined( HAVE_LIBINTL_H )" which has:

# define bindtextdomain(domain,dir)
# define bind_textdomain_codeset(domain,enc)
# define textdomain(domain)
# define dgettext(domain,str)	(str)

* then, many fontforge headers have #include <locale.h> which is fine,
  but on solaris, /usr/include/locale.h contains #include <libintl.h>
  and so /usr/include/libintl.h gets included, but, because of the
  above #define's made in libs/luafontforge/fontforge/inc/intl.h, it
  causes havoc, because /usr/include/libintl.h has

extern char *dgettext(const char *, const char *);
extern char *textdomain(const char *);
extern char *bindtextdomain(const char *, const char *);

which, because of those #define's, get pre-processed to

extern char * ( const char * );
extern char *;
extern char *;

* comparing libs/luafontforge/fontforge/inc/intl.h in texlive
  repository and in the "math" branch of luatex, i see that texlive
  has "#if ! defined(__sun__) && ! defined(__sun)" ... "#endif"
  around the above #define's (see the attached patch)

  while this does not look like a right fix (the problem seems to be
  caused by fooling intl.h by "#undef HAVE_LIBINTL_H" above), it seems
  to fix the build process.

  this was somehow lost during recent upgrade of fontforge in luatex.

  is it possible to fix the problem upstream (in fontforge) so it
  won't re-appear again after another update of fontforge in luatex?

Best,
v.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: luatex-intl.diff
Type: text/x-diff
Size: 504 bytes
Desc: not available
URL: <http://www.ntg.nl/mailman/private/dev-luatex/attachments/20081208/489a29af/attachment.bin>


More information about the dev-luatex mailing list