[Rd] problems with iconv

RogerP rpickeri at mail.nih.gov
Wed Dec 14 15:15:36 CET 2011


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 
> http://www.gnu.org/software/libiconv/). 
> 
> 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 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" 
>     F77=f95 
>     FFLAGS=-O4 
>     CXX="CC -library=stlport4" 
>     CXXFLAGS=-O 
>     FC=f95 
>     FCFLAGS=$FFLAGS 
>     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 config.site: 
> 
<snip> 
> 
> 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.

Roger




--
View this message in context: http://r.789695.n4.nabble.com/problems-with-iconv-tp4191177p4195139.html
Sent from the R devel mailing list archive at Nabble.com.



More information about the R-devel mailing list