Re: [CFT] BSDL iconv in base system

From: Anonymous <swell.k_at_gmail.com>
Date: Tue, 03 Aug 2010 15:15:58 +0400
Gabor Kovesdan <gabor_at_FreeBSD.org> writes:

>> It works if I specify both `-t' and `-f'. And crashes when none
>> specified or only one of them.
>>
> Thanks, I've fixed this and the mtree problem, as well. I hope this
> one now works properly on amd64:
> http://kovesdan.org/patches/iconv-20100708.diff

  $ bsd-iconv -l
  iconv: -l is not allowed with other flags.
  Usage:  iconv [-cs] -f <from_code> -t <to_code> [file ...]
          iconv -f <from_code> [-cs] [-t <to_code>] [file ...]
          iconv -t <to_code> [-cs] [-f <from_code>] [file ...]
          iconv -l
  $ gnu-iconv -l
  ANSI_X3.4-1968 ANSI_X3.4-1986 ASCII CP367 IBM367 ISO-IR-6 ISO646-US ISO_646.IRV:1991 US US-ASCII CSASCII
  UTF-8
  ...

  $ echo blah | bsd-iconv
  Usage:  iconv [-cs] -f <from_code> -t <to_code> [file ...]
          iconv -f <from_code> [-cs] [-t <to_code>] [file ...]
          iconv -t <to_code> [-cs] [-f <from_code>] [file ...]
          iconv -l
  $ echo blah | gnu-iconv
  blah

BTW, running GNU iconv(1) with following in libmap.conf

  libiconv.so.3 libc.so.7

produces

  $ gnu-iconv
  /libexec/ld-elf.so.1: Undefined symbol "_libiconv_version" referenced from COPY relocation in LOCALBASE/bin/iconv

And the case can be reduced to

  $ cc a.c
  /usr/bin/ld: /var/tmp//ccJOE7kn.o: in function main:a.c(.text+0x6): error: undefined reference to '_libiconv_version'
  collect2: ld returned 1 exit status

  $ cat a.c
  #include <stdio.h>
  #include <iconv.h>

  int main(void) {
          printf("iconv version = %d\n", _libiconv_version);
          return(0);
  }
Received on Tue Aug 03 2010 - 09:20:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:05 UTC