Subject: Re: iconv problems after update?
To: Takehiko NOZAKI <th-nozaki@netwrk.co.jp>
From: Chavdar Ivanov <ci4ic4@gmail.com>
List: current-users
Date: 03/17/2007 15:02:45
On 16/03/07, Takehiko NOZAKI <th-nozaki@netwrk.co.jp> wrote:
> hi,
>
> > iconv: iconv_open(iso-8859-1, utf-16): Invalid argument
>
> it seems that libc can't dlopen(3) /usr/lib/i18n/libUTF1632.so,
> or /usr/share/i18n/esdb/UTF/UTF16.esdb is broken.
>
> could you send output of:
> $ ktruss /usr/bin/iconv -f utf-8 -t iso8859-1
> for me?
iconv: iconv_open(iso8859-1, utf-8): Invalid argument
6795 1 ktruss emul(netbsd)
6795 1 ktruss fcntl(0x4, 0x3, 0) = 1
6795 1 ktruss fcntl(0x4, 0x4, 0x1) = 0
6795 1 iconv emul(netbsd)
6795 1 iconv execve("/usr/bin/iconv", 0xbfbfe6e8,
0xbfbfe700) JUSTRETURN
6795 1 iconv mmap(0, 0x8000, 0x3, 0x1002, 0xffffffff, 0, 0,
0) = 0xbbbea000
6795 1 iconv open("/etc/ld.so.conf", 0, 0xffffffff) = 3
6795 1 iconv __fstat30(0x3, 0xbfbfe5f8) = 0
6795 1 iconv mmap(0, 0x57, 0x1, 0x1, 0x3, 0, 0, 0) = 0xbbbe9000
6795 1 iconv close(0x3) = 0
6795 1 iconv munmap(0xbbbe9000, 0x57) = 0
6795 1 iconv open("/usr/pkg/lib/libutil.so.7", 0, 0) Err#2 ENOENT
6795 1 iconv open("/usr/pkg/lib/samba/libutil.so.7", 0, 0)
Err#2 ENOENT
6795 1 iconv open("/usr/lib/libutil.so.7", 0, 0) = 3
6795 1 iconv __fstat30(0x3, 0xbfbfdf14) = 0
6795 1 iconv mmap(0, 0x1000, 0x1, 0x1, 0x3, 0, 0, 0) = 0xbbbe9000
6795 1 iconv munmap(0xbbbe9000, 0x1000) = 0
6795 1 iconv mmap(0, 0x12000, 0x5, 0x2, 0x3, 0, 0, 0) = 0xbbbd8000
6795 1 iconv mmap(0xbbbe7000, 0x2000, 0x3, 0x12, 0x3, 0,
0xe000, 0) = 0xbbbe7000
6795 1 iconv mmap(0xbbbe9000, 0x1000, 0x3, 0x1012,
0xffffffff, 0, 0, 0) = 0xbbbe9000
6795 1 iconv close(0x3) = 0
6795 1 iconv open("/usr/pkg/lib/libc.so.12", 0, 0xbfbfdf14)
Err#2 ENOENT
6795 1 iconv open("/usr/pkg/lib/samba/libc.so.12", 0,
0xbfbfdf14) Err#2 ENOENT
6795 1 iconv open("/usr/lib/libc.so.12", 0, 0xbfbfdf14) = 3
6795 1 iconv __fstat30(0x3, 0xbfbfdf14) = 0
6795 1 iconv mmap(0, 0x1000, 0x1, 0x1, 0x3, 0, 0, 0) = 0xbbbd7000
6795 1 iconv munmap(0xbbbd7000, 0x1000) = 0
6795 1 iconv mmap(0, 0xdf000, 0x5, 0x2, 0x3, 0, 0, 0) = 0xbbaf9000
6795 1 iconv mmap(0xbbbc1000, 0x8000, 0x3, 0x12, 0x3, 0,
0xc7000, 0) = 0xbbbc1000
6795 1 iconv mmap(0xbbbc9000, 0xf000, 0x3, 0x1012,
0xffffffff, 0, 0, 0) = 0xbbbc9000
6795 1 iconv close(0x3) = 0
6795 1 iconv __sysctl(0xbfbfe61c, 0x2, 0xbbbc80e0,
0xbfbfe624, 0, 0) = 0
6795 1 iconv __sysctl(0xbfbfe530, 0x2, 0xbfbfe53c,
0xbfbfe540, 0, 0) = 0
6795 1 iconv readlink("/etc/malloc.conf", 0xbfbfe570, 0x3f)
Err#2 ENOENT
6795 1 iconv mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0,
0) = 0xbbaf8000
6795 1 iconv break(0x804a554) = 0
6795 1 iconv break(0x804b554) = 0
6795 1 iconv break(0x804c000) = 0
6795 1 iconv break(0x804d000) = 0
6795 1 iconv issetugid() = 0
6795 1 iconv break(0x804e000) = 0
6795 1 iconv open("/usr/share/i18n/iconv/iconv.alias.db", 0,
0xbfbfb484) Err#2 ENOENT
6795 1 iconv open("/usr/share/i18n/iconv/iconv.alias", 0,
0xbfbfb4e8) Err#2 ENOENT
6795 1 iconv open("/usr/share/i18n/iconv/iconv.alias.db", 0,
0xbfbfb484) Err#2 ENOENT
6795 1 iconv open("/usr/share/i18n/iconv/iconv.alias", 0,
0xbfbfb4e8) Err#2 ENOENT
6795 1 iconv open("/usr/share/i18n/iconv/iconv.dir.db", 0,
0xbfbfb4e8) Err#2 ENOENT
6795 1 iconv open("/usr/share/i18n/iconv/iconv.dir", 0,
0xbfbfb4e8) = 3
6795 1 iconv fcntl(0x3, 0x2, 0x1) = 0
6795 1 iconv __fstat30(0x3, 0xbfbfb478) = 0
6795 1 iconv mmap(0, 0x4b, 0x1, 0x2, 0x3, 0, 0, 0) = 0xbbaf7000
6795 1 iconv close(0x3) = 0
6795 1 iconv munmap(0xbbaf7000, 0x4b) = 0
6795 1 iconv open("/usr/share/i18n/iconv/iconv.dir.db", 0,
0) Err#2 ENOENT
6795 1 iconv open("/usr/share/i18n/iconv/iconv.dir", 0,
0xbfbfb4e8) = 3
6795 1 iconv fcntl(0x3, 0x2, 0x1) = 0
6795 1 iconv __fstat30(0x3, 0xbfbfb478) = 0
6795 1 iconv mmap(0, 0x4b, 0x1, 0x2, 0x3, 0, 0, 0) = 0xbbaf7000
6795 1 iconv close(0x3) = 0
6795 1 iconv munmap(0xbbaf7000, 0x4b) = 0
6795 1 iconv write(0x2, 0xbfbfd1b8, 0x7) = 7
"iconv: "
6795 1 iconv write(0x2, 0xbfbfd1e8, 0x1c) = 28
"iconv_open(iso8859-1, utf-8)"
6795 1 iconv write(0x2, 0xbbbb7a01, 0x2) = 2
": "
6795 1 iconv issetugid() = 0
6795 1 iconv issetugid() = 0
6795 1 iconv open("/usr/share/nls/nls.alias.db", 0, 0) Err#2 ENOENT
6795 1 iconv open("/usr/share/nls/nls.alias", 0, 0xbfbfcc78) = 3
6795 1 iconv fcntl(0x3, 0x2, 0x1) = 0
6795 1 iconv __fstat30(0x3, 0xbfbfcc08) = 0
6795 1 iconv mmap(0, 0x5f0, 0x1, 0x2, 0x3, 0, 0, 0) = 0xbbaf7000
6795 1 iconv close(0x3) = 0
6795 1 iconv munmap(0xbbaf7000, 0x5f0) = 0
6795 1 iconv open("/usr/share/nls/C/libc.cat", 0, 0xbfbfd098) = 3
6795 1 iconv __fstat30(0x3, 0xbfbfd098) = 0
6795 1 iconv mmap(0, 0x10be, 0x1, 0x1, 0x3, 0, 0, 0) = 0xbbaf6000
6795 1 iconv close(0x3) = 0
6795 1 iconv munmap(0xbbaf6000, 0x10be) = 0
6795 1 iconv write(0x2, 0xbfbfd1b8, 0x11) = 17
"Invalid argument\n"
6795 1 iconv exit(0x1)
>
> > I am rebuilding after update, but libc/iconv and usr.sbin/iconv do not
> > appear to have changed in a long time.
>
> it seems that src/libc/Makefile has been changed few days ago.
> http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/Makefile.diff?r1=1.127&r2=1.128
> i suspect -D_I18N_DYNAMIC flag doesn't work(this flag affect iconv(3)).
>
> very truly yours.
> --
> Takehiko NOZAKI <tnozaki@NetBSD.org>
>
Chavdar Ivanov