Mail Archives: cygwin/2002/09/18/15:18:15
I'm attempting to build fetchmail 6.0.0 so I can update the Cygwin
distribution to the latest version. Unfortunately, configure does not
determine that gettext is in libintl as it should. Note that
fetchmail's aclocal.m4 was changed between 5.9.13 (i.e., the last
version that I released) and 5.9.14 (i.e., the last version before
6.0.0).
The old (working) "GNU gettext in libintl" check used the following test
program:
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
int
main()
{
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr;
return 0;
}
while the new one uses the following:
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
extern int *_nl_domain_bindings;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias ();
int
main()
{
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings +
*_nl_expand_alias (0);
return 0;
}
The crux of the problem is the use of the _nl_domain_bindings symbol.
This is because libintl.dll.a exposes __imp___nl_domain_bindings__ (note
the trailing "__") and not __imp___nl_domain_bindings (note no trailing
"__"). Where as fetchmail's aclocal.m4 (and gettext's gettext.m4) use
_nl_domain_bindings instead of _nl_domain_bindings__. Hence, an
undefined reference error occurs during the configure test as indicated
in config.log:
configure:4124: checking for GNU gettext in libintl
configure:4176: gcc -o conftest -O conftest.c -lintl -liconv 1>&5
Warning: resolving __nl_msg_cat_cntr by linking to __imp___nl_msg_cat_cntr (auto-import)
/mnt/c/DOCUME~1/jatis/LOCALS~1/Temp/ccnoSBi9.o(.text+0x49):conftest.c: undefined reference to `_nl_domain_bindings'
collect2: ld returned 1 exit status
Perusing the gettext source, I found the following:
/* The internal variables in the standalone libintl.a must have different
names than the internal variables in GNU libc, otherwise programs
using libintl.a cannot be linked statically. */
#if !defined _LIBC
# define _nl_default_dirname _nl_default_dirname__
# define _nl_domain_bindings _nl_domain_bindings__
#endif
The above explains why Cygwin's libintl is exposing symbols with
trailing "__" characters.
Any suggestions on how to best fix this build problem will be greatly
appreciated?
Thanks,
Jason
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -