Re: [Rd] problems with iconv

From: Joshua Ulrich <josh.m.ulrich_at_gmail.com>
Date: Wed, 14 Dec 2011 09:57:06 -0600

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-[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.
>
I was referring to the instructions on the libiconv page: http://www.gnu.org/software/libiconv/

"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.
>
> Roger
>

Best,

--
Joshua Ulrich  |  FOSS Trading: www.fosstrading.com

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed 14 Dec 2011 - 15:59:31 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 - 21:10:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive