[Rd] problems with iconv
josh.m.ulrich at gmail.com
Wed Dec 14 16:57:06 CET 2011
On Wed, Dec 14, 2011 at 8:15 AM, RogerP <rpickeri at mail.nih.gov> wrote:
> For some reason when I click on reply and sign-in - the message I'm replying
> to is not carried forward. As you requested that include your message I
> copied and pasted it from my email.
I guess it's some Nabble nonsense then...
>> A suitably comprehensive iconv function is essential. The R usage requires
>> iconv to be able to translate between "latin1" and "UTF-8", to recognize
>> (as the current encoding) and "ASCII", and to translate to and from the
>> Unicode wide-character formats "UCS-[BL]E" — this is true for glibc
>> not of most commercial Unixes. However, you can make use of GNU libiconv
>> (possibly as a plug-in replacement: see
>> Well, that's just what I did. I downloaded libiconv and compiled and
>> it. Oh, so where to put it. Hmmmm, don't see it anywhere here. Do you?
> The location isn't mentioned in Appendix A, which you cite a portion
> of above, but it is mentioned in Solaris section of Appendix C, which
> you cite below.
>> Also from the manual:
>> /You will need GNU libiconv and readline: the Solaris version of iconv is
>> not sufficiently powerful.
>> For the Solaris Studio compilers a little juggling of paths was needed to
>> ensure GNU libiconv (in /usr/local) was used rather than the Solaris
> This seems to indicate GNU libiconv should be installed in /usr/local,
> which is the location specified in the libiconv installation
> As usual for GNU packages:
> $ ./configure --prefix=/usr/local
> $ make
> $ make install
> Did you try the suggestion two paragraphs above this in Appendix C?
> "Some people have reported that the Solaris libintl needs to be
> avoided, for example by using --disable-nls or --with-included-gettext
> or using libintl from OpenCSW."
> As it turns out I put iconv and libiconv.so and libiconv.so.2.5.1 in
> /usr/local/bin and /usr/local/lib. Just for grins I copied these files to
> /usr/local and tried again with the same results.
> This is my configure statement:
> ./configure --with-blas=-library=sunperf --with-lapack --with-readline=no
> --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib --prefix=/usr/local
> --disable-nls --with-included-gettext
> So, yes, I did try the suggestions mentioned in Appendix C.
>> CC="cc -xc99"
>> CFLAGS="-O -xlibmieee"
>> CXX="CC -library=stlport4"
>> FCLIBS="-lfai -lfsu"
>> For a 64-bit target add -m64 to the compiler macros and use something like
>> LDFLAGS=-L/usr/local/lib/sparcv9 or LDFLAGS=-L/usr/local/lib/amd64 as
>> appropriate. /
>> Well, I did that. Here are some of my options from the config.site:
>> So, here it is - all the revelent documentation on iconv. If I've missed
>> anything please let me know. If you see where in the documentation I
>> some cryptic clue on how to get iconv to work or where to put it or it's
>> headers, also please let me know.
> Did you take the steps required to resolve the circular dependency
> between libiconv and gettext?
> I used the --disable-nls and --with-included-gettext options. I also
> downloaded the more up-to-date cairo package.
I was referring to the instructions on the libiconv page:
"On systems other than GNU/Linux, the iconv program will be
internationalized only if GNU gettext has been built and installed
before GNU libiconv."
That seems to suggest that libiconv *may* require you to install GNU
gettext before installing GNU libiconv. Have you done that?
> BTW, is there a program I can run to test my iconv binary? I think that
> would rule out any problem with the compilation.
> Thanks for you suggestions and for any future help. This is frustrating
> because I have compiled R, just not with a workable iconv, which prevents me
> from updating and adding packages.
Joshua Ulrich | FOSS Trading: www.fosstrading.com
More information about the R-devel