omegahat / RCurl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C Error thrown when RCurl is compiled on Docker

pgensler opened this issue · comments

It seems as though I get the following errors when installing RCurl from source:

base64.c: In function ‘R_base64_decode’:
base64.c:23:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     text = CHAR(STRING_ELT(r_text, 0));
          ^

and:

myUTF8.c: In function ‘StringValue’:
myUTF8.c:284:26: warning: passing argument 1 of ‘Rf_mkCharLenCE’ from incompatible pointer type [-Wincompatible-pointer-types]
     yylval = mkCharLenCE(wcs, wcnt, CE_UTF8); /* include terminator */
                          ^~~
In file included from /usr/local/lib/R/include/Rdefines.h:40:0,
                 from myUTF8.c:3:
/usr/local/lib/R/include/Rinternals.h:939:6: note: expected ‘const char *’ but argument is of type ‘ucs_t * {aka int *}’
 SEXP Rf_mkCharLenCE(const char *, int, cetype_t);
      ^~~~~~~~~~~~~~

Attached is my dockerfile as well for your reference below:
FROM rocker/tidyverse:latest

MAINTAINER Lucero del Alba

RUN apt-get update -qq
&& apt-get -y --no-install-recommends install
libcurl4-openssl-dev
libxml2-dev
default-jdk
default-jre
&& R CMD javareconf
&& install2.r --error
--repos 'http://cran.rstudio.com'
h2o
tidytext

Related: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16106

Thanks. These are not errors, but warnings. The first is fine. I'll look at the second.