Localisation can't find translations

Bug #918926 reported by Michael Hope
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Toolchain Binaries
Fix Released
High
Zhenqiang Chen

Bug Description

Running the tools in a different language works in a local build tree:

$ LANGUAGE=fr ./arm-linux-gnueabi-ld
./arm-linux-gnueabi-ld: aucun fichier d'entrée

but doesn't when using a remote built build:

$ LANGUAGE=fr arm-linux-gnueabi-ld
arm-linux-gnueabi-ld: no input files

gettext is probably looking in a fixed directory but needs to look under the executable directory.

Michael Hope (michaelh1)
Changed in linaro-toolchain-binaries:
status: New → Triaged
Michael Hope (michaelh1)
Changed in linaro-toolchain-binaries:
importance: Medium → High
Revision history for this message
Zhenqiang Chen (zhenqiang-chen) wrote :

gcc-4.7.0 had fixed the issue. But binutils has not.

$ LANGUAGE=fr ./bin/arm-linux-gnueabi-gcc error.c
error.c:1:1: attention : la définition de données n'a pas de type ni de classe de stockage [enabled by default]
...
collect2: erreur: ld a retourné 1 code d'état d'exécution

$ LANGUAGE=zh_CN ./bin/arm-linux-gnueabi-gcc error.c
error.c:1:1: 警告:数据定义时没有类型或存储类 [默认启用]
...
collect2: 错误:ld 返回 1

Revision history for this message
Michael Hope (michaelh1) wrote :

Could you do a strace on the binary to make sure it's opening the right files and not the host files? And check the version of libintl used between gcc and binutils?

Revision history for this message
Zhenqiang Chen (zhenqiang-chen) wrote :

gcc only works in my build system. Logs show gcc uses a fixed LOCALEDIR (which is the $prefix/share/locale) to call bindtextdomain.

The libintl version is the same for gcc and binutils. Both are not relocatable.

I will try to use a relative dir to call bindtextdomain.

Michael Hope (michaelh1)
Changed in linaro-toolchain-binaries:
status: Triaged → In Progress
Revision history for this message
Michael Hope (michaelh1) wrote :

Trying LANGUAGE=fr on everything in bin/ gives the following failures:

arm-linux-gnueabi-gcc-ar
arm-linux-gnueabi-ar: no operation specified

arm-linux-gnueabi-gcc-nm
BFD: /home/michaelh/opt/gcc-linaro-arm-linux-gnueabi-2012.04-20120404+bzr2390_linux/bin/../libexec/gcc//arm-linux-gnueabi/4.7.1/liblto_plugin.so: wrong ELF class: ELFCLASS32

arm-linux-gnueabi-gcov
Usage: gcov [OPTION]... SOURCE|OBJ...

arm-linux-gnueabi-gdb
GNU gdb (crosstool-NG linaro-1.13.1+bzr2390 - Linaro GCC 2012.04) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.

arm-linux-gnueabi-ld.gold
./arm-linux-gnueabi-ld.gold: fatal error: no input files

arm-linux-gnueabi-pkg-config
Must specify package names on the command line

Revision history for this message
Zhenqiang Chen (zhenqiang-chen) wrote :

(1) For gdb, there is no gdb.mo. So only English is supported.
(2) For progname, only support LANGUAGE=if, fi, vi, es.

(3) For arm-linux-gnueabi-gcc-ar, arm-linux-gnueabi-gcc-nm, arm-linux-gnueabi-gcov and arm-linux-gnueabi-pkg-config, I have not patch for them. But I prefer not patch them for this release. Reasons are:
  * There is no .mo file for the programs. So they only support English even if we patch them.
  * To support i18n, we need libintl for the programs, which need more changes than setting the relative dir.

Michael Hope (michaelh1)
Changed in linaro-toolchain-binaries:
milestone: none → 2012.04
assignee: nobody → Zhenqiang Chen (zhenqiang-chen)
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.