[CFT] BSDL iconv in base system

Anonymous swell.k at gmail.com
Tue Aug 3 11:20:27 UTC 2010


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);
  }


More information about the freebsd-current mailing list