Re: [Rd] problems with iconv

From: RogerP <>
Date: Wed, 14 Dec 2011 06:15:36 -0800 (PST)

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.

> 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-[24][BL]E" — this is true for glibc
> but
> 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
> linked
> 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
> iconv:
This seems to indicate GNU libiconv should be installed in /usr/local, which is the location specified in the libiconv installation instructions:

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 and 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"
> F77=f95
> CXX="CC -library=stlport4"
> FC=f95
> FCLIBS="-lfai -lfsu"
> R_LD_LIBRARY_PATH="/usr/local/lib:/opt/csw/gcc4/lib:/opt/csw/lib"
> 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
> 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
> missed
> 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.

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.


View this message in context:
Sent from the R devel mailing list archive at

______________________________________________ mailing list
Received on Wed 14 Dec 2011 - 14:21:43 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 14 Dec 2011 - 16:30:17 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive