duncantl / RJSONIO

Serialize to and from R and JSON, JavaScript Object Notation
http://www.omegahat.org/RJSONIO
Other
25 stars 65 forks source link

INSTALL failed (1.3.0) #23

Open proebuck opened 8 years ago

proebuck commented 8 years ago

Problem installing local libjson using gcc-5.4.0.3 with Docker. The library source file JSONWorker.cpp is using intptr_t without #includeing its typedef first; I applied the patch below which allows it to install (ignoring namespace std and patching global namespace).

ARG RJSONIO_TGZ=RJSONIO_1.3-0.tar.gz
ARG RJSONIO_TGZ_URL=https://cran.r-project.org/src/contrib/${RJSONIO_TGZ}
RUN (curl -sS --fail -L ${RJSONIO_TGZ_URL} | bsdtar xf - )
RUN (cd RJSONIO/src/libjson/Source; \
     sed -i'.orig' -e '1 i\#include <stdint.h>' JSONWorker.cpp)
RUN (R_VERSION_MAJMIN=$(echo $R_BASE_VERSION | cut -f2 -d':' | cut -f1,2 -d'.'); \
     RSITELIB=${PROJ_BUILD_DIR}/dvapp/R/site-library/${R_VERSION_MAJMIN}; \
     CONFIGUREARGS="--configure-args='--with-local-libjson'"; \
     R CMD INSTALL ${CONFIGUREARGS} -l ${RSITELIB} RJSONIO)
proebuck commented 8 years ago

Just noticed this is partial repeat of #17 (@slackline), but with a patch... Sorry...