This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trying to get gettext to work on cygwin


After adding:
    gttest_LDADD=-lintl
to Makefile.am

and installing the latest cygwin gettext and libintl packages:
   gettext-0.10.40-1
   libintl1-0.10.40-1
   libintl-0.10.38-3

All three "configurations" worked fine.
   sh auto.sh
   ./configure
   make
   make clean
   ./configure --with-included-gettext
   make
   make clean
   ./configure --disable-nls
   make

(However, I don't think that "gttest.c" is setup up for "--disable-nls" 
to have any effect.  gttest.o still has symbols "bindtextdomain", 
"textdomain", and "gettext".  However, since my change to the 
makefile.am adds -lintl regardless, this "configuration" still built 
successfully.)

So, some progress, anyway.

--Chuck


Linus Tolke wrote:

> Hi all!
> 
> I am using cygwin as a development environment and I don't get gettext to
> work correctly. This summer I first had a problem with this and with a
> little help from the list and especially Charles S. Wilson, and then a new
> version of gettext for cygwin was released that I installed. I also
> converted my project to new versions of autoconf and automake after they
> were included in cygwin.
> 
> The problem is that I still don't get it to work. Somewhere between
> autoconf, automake and gettext something gets totally mixed up and I suspect
> gettext for cygwin to be the problem.
> 
> I have now constructed a small demo (in the tar file) that fails in the
> exact same way that my own program. It is tested by doing:
> 
> 1$ tar xvf gettextdemo.tar
> 2$ sh auto.sh                 # you need automake, autoconf and gettext for
> this
> 3$ ./configure <with arguments>
> 4$ make
> 5$ make dist
> 6$
> 
> For me step 4 (make) fails all the time. It doesn't matter if I use no
> arguments, the argument --with-included-gettext or --disable-nls. It fails
> in different ways depending on the arguments though.
> 
> I have the details below.
> 
> What am I doing wrong? Am I the only one with this problem? It looks a
> little like Frank Meiers recode-problem with the difference that I am using
> cygwin as development environment and he is downloading the recode
> distribution and building from the distribution.
> 
> I suspect that the gettext package in cygwin is broken but it can also be
> that I have missed some requirements on a gettext installation. Please
> advice!
> 
> 	/Linus
> 
> Details:
> 
> When I do this without any arguments to configure or with the
> argument --with-included-gettext the make (4) results in the error:
> gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/lo
> cal/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DHAVE_CONFIG_H -I.. -I. -I..
> /intl  -g -O2  -DGETTEXT_STATIC -c localcharset.c -o localcharset.o
> rm -f cygintl.dll
> gcc -shared -Wl,--enable-auto-image-base -Wl,--out-implib=libintl.dll.a \
>   libintl.def intl-compat.pic.o bindtextdom.pic.o dcgettext.pic.o
> dgettext.pic.o
>  gettext.pic.o finddomain.pic.o loadmsgcat.pic.o localealias.pic.o
> textdomain.pi
> c.o l10nflist.pic.o explodename.pic.o dcigettext.pic.o dcngettext.pic.o
> dngettex
> t.pic.o ngettext.pic.o plural.pic.o localcharset.pic.o -o cygintl.dll
> gcc: libintl.def: No such file or directory
> make[2]: *** [cygintl.dll] Error 1
> make[2]: Leaving directory `/home/linus/gettextdemo/intl'
> in the intl directory.
> 
> 
> When I do this with the argument --disable-nls to configure the make (4)
> result in the error:
> make[2]: Entering directory `/home/linus/gettextdemo'
> source='gttest.c' object='gttest.o' libtool=no \
> depfile='.deps/gttest.Po' tmpdepfile='.deps/gttest.TPo' \
> depmode=gcc /bin/sh ./depcomp \
> gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c `test -f gttest.c || echo
> './'`gttest.c
> gcc  -g -O2   -o gttest.exe  gttest.o
> gttest.o: In function `main':
> /home/linus/gettextdemo/gttest.c:10: undefined reference to
> `_imp__bindtextdomain'
> /home/linus/gettextdemo/gttest.c:11: undefined reference to
> `_imp__textdomain'
> /home/linus/gettextdemo/gttest.c:13: undefined reference to `_imp__gettext'
> collect2: ld returned 1 exit status
> make[2]: *** [gttest.exe] Error 1
> make[2]: Leaving directory `/home/linus/gettextdemo'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/linus/gettextdemo'
> make: *** [all] Error 2
> 
> 
> 
> Here are the versions used:
> $ gettext --version
> gettext (GNU gettext) 0.10.38
> Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> Written by Ulrich Drepper.
> 
> linus@SPEEDO ~/gettextdemo
> $ automake --version
> automake (GNU automake) 1.5
> Written by Tom Tromey <tromey@cygnus.com>.
> 
> Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
> Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> linus@SPEEDO ~/gettextdemo
> $ autoconf --version
> autoconf (GNU Autoconf) 2.52
> Written by David J. MacKenzie.
> 
> Copyright 1992, 1993, 1994, 1996, 1999, 2000, 2001
> Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> linus@SPEEDO ~/gettextdemo
> $
> 
> Here is from the cygwin setup.ini file:
> [snipp]
> @ autoconf
> sdesc: "Automatic configure script builder"
> category: Devel
> requires: m4 perl
> version: 2.52-1
> install: latest/autoconf/autoconf-2.52-1.tar.bz2 309415
> source: latest/autoconf/autoconf-2.52-1-src.tar.bz2 646826
> [prev]
> version: 2.13-2
> install: latest/autoconf/autoconf-2.13-2.tar.gz 261675
> source: latest/autoconf/autoconf-2.13-2-src.tar.gz 443844
> 
> @ automake
> sdesc: "A tool for generating GNU Standards-compliant Makefiles"
> category: Devel
> requires: autoconf
> version: 1.5-1
> install: latest/automake/automake-1.5-1.tar.bz2 219871
> source: latest/automake/automake-1.5-1-src.tar.bz2 397236
> [prev]
> version: 1.4-4
> install: latest/automake/automake-1.4-4.tar.gz 205565
> source: latest/automake/automake-1.4-4-src.tar.gz 356534
> 
> [snipp]
> @ gettext
> sdesc: "GNU Internationalization utilities"
> ldesc: "The GNU gettext package provides a set of tools and
> documentation for producing
> multi-lingual messages in programs. Tools include a set of conventions about
> how programs should be written to support message catalogs, a directory and
> file naming organization for the message catalogs, a runtime library which
> supports the retrieval of translated messages, and stand-alone programs for
> handling the translatable and the already translated strings. Gettext
> provides
> an easy to use library and tools for creating, using, and modifying natural
> language catalogs and is a powerful and simple method for internationalizing
> programs."
> category: Devel
> requires: cygwin
> version: 0.10.38-2
> install: contrib/gettext/gettext-0.10.38-2.tar.bz2 445067
> source: contrib/gettext/gettext-0.10.38-2-src.tar.bz2 881950
> [prev]
> version: 0.10.35-2p1
> install: contrib/gettext/gettext-0.10.35-2p1.tar.gz 346343
> source: contrib/gettext/gettext-0.10.35-2p1-src.tar.gz 735878
> 
> [snipp]
> 
> I have also appended the cygcheck.out file.
> 
> 	/Linus
> 
> 
> ------------------------------------------------------------------------
> 
> --
> 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/
> 



--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]