[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: texinfo-6.0.90 pretest

From: Gavin Smith
Subject: Re: texinfo-6.0.90 pretest
Date: Wed, 23 Dec 2015 23:25:16 +0000

On 23 December 2015 at 12:40, Norbert Preining <address@hidden> wrote:
> I agree with Patrice that it would be a *bad* idea to have
> tests, or for that matter any level of operation, depending on the
> available locales. This should all be completely independent of
> the locales.

I had thought that the available locales on the system might affect
whether gettext worked, but I was wrong. I confirmed this by copying
fr.po to xx.po (no locale is installed with xx as a language code),
running some updates, and then running the failing command with

strace -- /usr/bin/perl -w ./..//texi2any.pl
--set-customization-variable=TEXI2HTML --force --conf-dir ./../t/init/
--conf-dir ./../init -I formatting// -I ./
--set-customization-variable L2H_FILE=./../t/init/l2h.init
--error-limit=1000 --set-customization-variable TEST=1
--set-customization-variable L2H_CLEAN=0 --output
--document-language xx ./formatting//documentlanguage_set.texi 2>&1 |
less -ifa

It found the file with the messages in it. Excerpt from strace output:

{st_mode=S_IFREG|0644, st_size=14994, ...}) = 0
{st_mode=S_IFREG|0644, st_size=14994, ...}) = 0
geteuid32()                             = 1000
geteuid32()                             = 1000

If you have strace installed, I suggest using it and looking to see
where the texinfo_document.mo was opened for the "fr" language.

It looks like the search path for the message files is set in
texi2any.pl in the folllowing place (line 210 at the moment):

if (($command_suffix eq '.pl' and !(defined($ENV{'TEXINFO_DEV_SOURCE'})
  # in case of build from the source directory, out of source build,
  # this helps to locate the locales.
  my $locales_dir_found = 0;
  @search_locale_dirs = (
    File::Spec->catdir($libsrcdir, $updir, 'LocaleData'),
    File::Spec->catdir($curdir, 'LocaleData'),
    File::Spec->catdir($updir, $updir, $updir, 'tp', 'LocaleData'),
    File::Spec->catdir($updir, $updir, 'tp', 'LocaleData'));
  foreach my $locales_dir (@search_locale_dirs) {
    if (-d $locales_dir) {
      Locale::Messages::bindtextdomain ($strings_textdomain, $locales_dir);
      # the messages in this domain are not regenerated automatically,
      # only when calling ./maintain/regenerate_perl_module_files.sh
      Locale::Messages::bindtextdomain ($messages_textdomain, $locales_dir);
      $locales_dir_found = 1;
  if (!$locales_dir_found) {
    warn "Locales dir for document strings not found (@search_locale_dirs)\n";
} else {
  Locale::Messages::bindtextdomain ($strings_textdomain,
                                    File::Spec->catdir($datadir, 'locale'));
  Locale::Messages::bindtextdomain ($messages_textdomain,
                                    File::Spec->catdir($datadir, 'locale'));

Maybe that code isn't being executed properly.

> Just for completeness, here is the ./configure invocation that is
> generated by the debian packaging:
> AWK=awk ./configure CFLAGS="-g -O2 -fstack-protector-strong -Wformat 
> -Werror=format-security" CPPFLAGS="-D_FORTIFY_SOURCE=2" CXXFLAGS="-g -O2 
> -fstack-protector-strong -Wformat -Werror=format-security" FCFLAGS="-g -O2 
> -fstack-protector-strong" FFLAGS="-g -O2 -fstack-protector-strong" 
> GCJFLAGS="-g -O2 -fstack-protector-strong" LDFLAGS="-Wl,-z,relro" 
> OBJCFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" 
> OBJCXXFLAGS="-g -O2 -fstack-protector-strong -Wformat 
> -Werror=format-security"    --with-external-Text-Unidecode=yes   
> --with-external-libintl-perl=yes   --prefix=/usr   
> --libexecdir='${prefix}/lib'   --infodir='${prefix}/share/info' 
> --mandir='${prefix}/share/man'   --build=x86_64-linux-gnu 
> --host=x86_64-linux-gnu

The --with-external-libintl-perl=yes may be relevant, it would be
informative if the same error occurred with

reply via email to

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