[Rd] Problem installing RCurl

Zhang,Jun JHZhang at mdanderson.org
Mon Dec 6 20:26:45 CET 2010

Thank you both for your reply.
After reading your responses, I removed the existing CSWcurl, and compiled curl-7.21.2 from source using solstudio (the same compiler I got R-2.12.0 in place) to /opt/csw. Tried to install RCurl, I got the same error, the only difference is the include file's line number,

"/opt/csw/include/curl/curlrules.h", line 143: zero or negative subscript

The line 143 is the third line of the following, the variable must have been defined outside the file.
typedef char
    [CurlchkszEQ(long, CURL_SIZEOF_LONG)];

I don't know what value the compiler expect, but can I define it here if I know?

As to the bit, this machine's got 64G memory, I simply has no choice but to compile 64-bit R.


-----Original Message-----
From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-project.org] On Behalf Of Prof Brian Ripley
Sent: Saturday, December 04, 2010 1:03 AM
To: Duncan Temple Lang
Cc: r-devel at r-project.org
Subject: Re: [Rd] Problem installing RCurl

On Fri, 3 Dec 2010, Duncan Temple Lang wrote:

> Hi Jun
> On 12/3/10 2:15 PM, Zhang,Jun wrote:
>> I have 64-bit R 2 12 0 installed on Solaris 10 of Sun Sparc. When I tried to install RCurl, it failed with the following lines,
>> ...............
>> libcurl version: libcurl 7.19.6
>> configure: creating ./config.status
>> config.status: creating src/Makevars
>> ** libs
>> cc -xc99 -m64 -xarch=sparcvis2 -I/apps/sparcv9/R-2.12.0/lib/R/include -I/opt/csw/include -DHAVE_LIBIDN_FIELD=1 -DHAVE_CURLOPT_URL=1 -DHAVE_CURLINFO_EFFECTIVE_URL=1 .........(omitted here is very long, all upper case) -DHAVE_CURLOPT_SSL_SESSIONID_CACHE=1 -I/opt/csw/include    -KPIC  -xcode=abs64 -xlibmieee -xtarget=ultra3 -xarch=sparcvis2 -c base64.c -o base64.o
>> "/opt/csw/include/curl/curlrules.h", line 144: zero or negative subscript
> This error indicates that the compiler (cc with flags -xc99 -m64, 
> etc.) sees the size of the 'long' data type in C is different from 
> what was seen when libcurl was configured, built and installed.
> So basically the compiler and/or the compiler flags were different.
> How was libcurl installed - from source or from a pre-built binary ?
> What compiler and flags were used?

The header is from a prebuilt binary (from OpenCSW).  That is built 
with gcc and not the Sun compiler.  And curlbuild.h says

/* Allow 32 and 64 bit headers to coexist */
#if defined __amd64 || defined __x86_64 || defined __sparcv9
#include "curlbuild-64.h"
#include "curlbuild-32.h"

which AFAIK are gcc and not Sun defines.  You could try adding 
-D__sparcv9 to the CPPFLAGS, or compile RCurl with OpenCSW's gcc 
build (but 64-bit gcc is another can of worms).

I've pointed out to Jun Zhang several times that 64-bit Sparc Solaris 
is really pushing it, and 32-bit R on Sparc Solaris has been much more 
successful.  Given that x86_64 boxes (Solaris or Linux) are so much 
faster at computation than Sparc ones, I don't see the point of 
building 64-bit Sparc Solaris R -- if 32-bit R is not enough you need 
a faster machine.

>  D.
>> "base64.c", line 25: warning: assignment type mismatch:
>>         pointer to const char "=" pointer to unsigned char
>> "base64.c", line 39: warning: argument #1 is incompatible with prototype:
>>         prototype: pointer to const char : "/apps/sparcv9/R-2.12.0/lib/R/include/Rinternals.h", line 1042
>>         argument : pointer to unsigned char
>> "base64.c", line 60: warning: assignment type mismatch:
>>         pointer to const char "=" pointer to unsigned char
>> cc: acomp failed for base64.c
>> make: *** [base64.o] Error 2
>> ERROR: compilation failed for package 'RCurl'
>> * removing '/apps/sparcv9/R-2.12.0/lib/R/library/RCurl'
>> The downloaded packages are in
>>         '/tmp/Rtmpo67mNX/downloaded_packages'
>> Updating HTML index of packages in '.Library'
>> Warning message:
>> In install.packages("RCurl") :
>>   installation of package 'RCurl' had non-zero exit status
>> What is the problem?
>> Jun
>> 	[[alternative HTML version deleted]]
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

R-devel at r-project.org mailing list

More information about the R-devel mailing list