Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: ngettext undefined during make (PR#1238)
Home

[Freeciv-Dev] Re: ngettext undefined during make (PR#1238)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: pstephenson@xxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: ngettext undefined during make (PR#1238)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 24 Jan 2002 08:46:17 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Jan 23, 2002 at 11:49:15AM -0800, pstephenson@xxxxxxxxxxxx wrote:
> Full_Name: Paul Stephenson
> Version: 1.12.1-devel (CVS)
> Distribution: Built from source
> Client: Gtk+
> OS: Debian GNU/Linux 2.2 (potato)
> Submission from: (NULL) (62.253.128.4)
> 
> 
> On my system with latest CVS, './configure && make' results in the (truncated)
> output:
> 
> gcc  -g -O2 -Wall  -o civserver  civserver.o ../common/libcivcommon.a
> ../ai/libcivai.a ./libcivserver.a  ../common/libcivcommon.a ../ai/libcivai.a
> ./libcivserver.a -lm -lz 
> ./libcivserver.a(unittools.o): In function `kill_unit':
> /home/paul/src/freeciv/freeciv-raw/server/unittools.c:1915: undefined 
> reference
> to `ngettext'
> collect2: ld returned 1 exit status
> 
> I discovered that ngettext is the real name of the PL_ plural macro, recently
> added.
> 
> I notice that my libintl.h does not declare ngettext.
> 
> I'm not sure how to determine the version number of my system's gettext,
> but the debian package version is 0.10.35-13.
> 
> When doing './configure --with-included-gettext && make' I get:
> 
> Making all in po
> make[2]: Entering directory `/home/paul/src/freeciv/freeciv-new/po'
> file=./`echo nl | sed 's,.*/,,'`.gmo \
>   && rm -f $file && /usr/bin/msgfmt --statistics -o $file nl.po
> nl.po:4971: keyword "msgid_plural" unknown
> nl.po:4970: missing `msgstr' section
> nl.po:4971: parse error
> nl.po:5521: keyword "msgid_plural" unknown
> nl.po:5520: missing `msgstr' section
> nl.po:5521: parse error
> nl.po:5528: keyword "msgid_plural" unknown
> nl.po:5527: missing `msgstr' section
> nl.po:5528: parse error
> nl.po:5535: keyword "msgid_plural" unknown
> nl.po:5534: missing `msgstr' section
> nl.po:5535: parse error
> nl.po:6399: keyword "msgid_plural" unknown
> nl.po:6398: missing `msgstr' section
> nl.po:6399: parse error
> nl.po:6408: keyword "msgid_plural" unknown
> nl.po:6407: missing `msgstr' section
> nl.po:6408: parse error
> nl.po:7555: keyword "msgid_plural" unknown
> nl.po:7554: missing `msgstr' section
> too many errors, aborting
> make[2]: *** [nl.gmo] Error 1
> 
> (is this a different bug?)
> 
> Doing './configure --disable-nls && make' compiles and runs fine.

Short answer: upgrade your gettext package to 0.10.38 or above.

Long answer: This is a bit more complicated. The whole gettext stuff
is divided into the two parts: functions(dcgettext and co) and
binaries(xgettext and co). Note that gettext and ngettext are both
functions and binaries.

The function part is included in the glibc. If you don't have glibc or
the glibc hasn't the correct version you can the use the functions
which came with freeciv (which are of version 0.10.38).

The binaries for gettext 0.10.38 aren't included in freeciv (which is
annoying but no other project ships them).

The recently introduced PL_ macro uses the plural format and this
format is only implemented in gettext 0.10.38 or above. So you can use
--with-included-gettext to get the functions but have to provide
0.10.38 binaries.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  reality.sys corrupt. Reboot Universe? (y,n,q)


[Prev in Thread] Current Thread [Next in Thread]