Skip to content

Problem installing RCurl

5 messages · Duncan Temple Lang, Brian Ripley, Zhang,Jun

#
Hi Jun
On 12/3/10 2:15 PM, Zhang,Jun wrote:
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?

  D.
#
On Fri, 3 Dec 2010, Duncan Temple Lang wrote:

            
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"
#else
#include "curlbuild-32.h"
#endif

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.

  
    
2 days later
#
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
  __curl_rule_01__
    [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.

Jun

-----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:

            
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"
#else
#include "curlbuild-32.h"
#endif

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.

  
    
#
I tried to give CPPFLAGS the value -D__sparcv9, the compiler complaint about "cross compiling".
And then I tried CPPFLAGS="-D__sparcv9 -U__sparcv8", export it, installation of curl-7.21.2 is fine, but give me just the 32-bit result.

Any hint will be appreciated to buil the 64-bit curl (only then I have hope to install RCurl). 

Jun

-----Original Message-----
From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-project.org] On Behalf Of Zhang,Jun
Sent: Monday, December 06, 2010 1:27 PM
To: 'Prof Brian Ripley'; 'Duncan Temple Lang'
Cc: 'r-devel at r-project.org'
Subject: Re: [Rd] Problem installing RCurl

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
  __curl_rule_01__
    [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.

Jun

-----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:

            
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"
#else
#include "curlbuild-32.h"
#endif

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.