jeroen / jsonlite

A Robust, High Performance JSON Parser and Generator for R
http://arxiv.org/abs/1403.2805
Other
377 stars 40 forks source link

Installation issue #355

Open furqan915 opened 3 years ago

furqan915 commented 3 years ago

Hello,

I am installing jsonlite in my rstudio. I have already installed rtools40 and set the path using the following commands

rt_path = "C:/rtools40/"
rt_bin = "C:/rtools40/mingw32/bin/"
writeLines(paste0('PATH="',rt_path,';${PATH}"'), con = "~/.Renviron")
writeLines(paste0('Sys.setenv(BINPREF = "',rt_bin,'")'), con = "~/.Rprofile")

But I'm unable to install jsonlite. It does download and runs the installation but in the end it gives an error and aborts.

> install.packages("jsonlite", type = "source")
Installing package into ‘C:/Users/Furqan/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/jsonlite_1.7.2.tar.gz'
Content type 'application/x-gzip' length 421716 bytes (411 KB)
downloaded 411 KB

* installing *source* package 'jsonlite' ...
** package 'jsonlite' successfully unpacked and MD5 sums checked
** using staged installation
** libs

*** arch - i386
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c base64.c -o base64.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c collapse_array.c -o collapse_array.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c collapse_object.c -o collapse_object.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c collapse_pretty.c -o collapse_pretty.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c escape_chars.c -o escape_chars.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c integer64_to_na.c -o integer64_to_na.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c is_datelist.c -o is_datelist.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c is_recordlist.c -o is_recordlist.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c is_scalarlist.c -o is_scalarlist.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c modp_numtoa.c -o modp_numtoa.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c null_to_na.c -o null_to_na.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c num_to_char.c -o num_to_char.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c parse.c -o parse.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c prettify.c -o prettify.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c push_parser.c -o push_parser.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c r-base64.c -o r-base64.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c register.c -o register.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c row_collapse.c -o row_collapse.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c transpose_list.c -o transpose_list.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c validate.c -o validate.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl.c -o yajl/yajl.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_alloc.c -o yajl/yajl_alloc.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_buf.c -o yajl/yajl_buf.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_encode.c -o yajl/yajl_encode.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_gen.c -o yajl/yajl_gen.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_lex.c -o yajl/yajl_lex.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_parser.c -o yajl/yajl_parser.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_tree.c -o yajl/yajl_tree.o
C:/rtools40/mingw32/bin/ar rcs yajl/libstatyajl.a yajl/yajl.o yajl/yajl_alloc.o yajl/yajl_buf.o yajl/yajl_encode.o yajl/yajl_gen.o yajl/yajl_lex.o yajl/yajl_parser.o yajl/yajl_tree.o
C:/rtools40/mingw32/bin/gcc -shared -s -static-libgcc -o jsonlite.dll tmp.def base64.o collapse_array.o collapse_object.o collapse_pretty.o escape_chars.o integer64_to_na.o is_datelist.o is_recordlist.o is_scalarlist.o modp_numtoa.o null_to_na.o num_to_char.o parse.o prettify.o push_parser.o r-base64.o register.o row_collapse.o transpose_list.o validate.o -Lyajl -lstatyajl -LC:/PROGRA~1/R/R-40~1.5/bin/i386 -lR
installing to C:/Users/Furqan/Documents/R/win-library/4.0/00LOCK-jsonlite/00new/jsonlite/libs/i386

*** arch - x64
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c base64.c -o base64.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c collapse_array.c -o collapse_array.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c collapse_object.c -o collapse_object.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c collapse_pretty.c -o collapse_pretty.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c escape_chars.c -o escape_chars.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c integer64_to_na.c -o integer64_to_na.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c is_datelist.c -o is_datelist.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c is_recordlist.c -o is_recordlist.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c is_scalarlist.c -o is_scalarlist.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c modp_numtoa.c -o modp_numtoa.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c null_to_na.c -o null_to_na.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c num_to_char.c -o num_to_char.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c parse.c -o parse.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c prettify.c -o prettify.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c push_parser.c -o push_parser.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c r-base64.c -o r-base64.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c register.c -o register.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c row_collapse.c -o row_collapse.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c transpose_list.c -o transpose_list.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c validate.c -o validate.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl.c -o yajl/yajl.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_alloc.c -o yajl/yajl_alloc.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_buf.c -o yajl/yajl_buf.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_encode.c -o yajl/yajl_encode.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_gen.c -o yajl/yajl_gen.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_lex.c -o yajl/yajl_lex.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_parser.c -o yajl/yajl_parser.o
C:/rtools40/mingw32/bin/gcc  -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c yajl/yajl_tree.c -o yajl/yajl_tree.o
C:/rtools40/mingw32/bin/ar rcs yajl/libstatyajl.a yajl/yajl.o yajl/yajl_alloc.o yajl/yajl_buf.o yajl/yajl_encode.o yajl/yajl_gen.o yajl/yajl_lex.o yajl/yajl_parser.o yajl/yajl_tree.o
C:/rtools40/mingw32/bin/gcc -shared -s -static-libgcc -o jsonlite.dll tmp.def base64.o collapse_array.o collapse_object.o collapse_pretty.o escape_chars.o integer64_to_na.o is_datelist.o is_recordlist.o is_scalarlist.o modp_numtoa.o null_to_na.o num_to_char.o parse.o prettify.o push_parser.o r-base64.o register.o row_collapse.o transpose_list.o validate.o -Lyajl -lstatyajl -LC:/PROGRA~1/R/R-40~1.5/bin/x64 -lR
C:/PROGRA~1/R/R-40~1.5/bin/x64/R.dll: file not recognized: file format not recognized
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'jsonlite'
* removing 'C:/Users/Furqan/Documents/R/win-library/4.0/jsonlite'
* restoring previous 'C:/Users/Furqan/Documents/R/win-library/4.0/jsonlite'
Warning in install.packages :
  installation of package ‘jsonlite’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\Furqan\AppData\Local\Temp\RtmpQrzqU3\downloaded_packages’

I cannot understand the error which file is missing and how to resolve this issue? Regards Awan

jeroen commented 3 years ago

You shouldn't need to set the PATH like that and certainly not BINPREF. I don't know where you got this, but that is no longer needed.

Try these instructions: https://cran.r-project.org/bin/windows/Rtools/

furqan915 commented 3 years ago

Hello, Thanks for your quick response. I have followed the instructions mentioned on this page. But I am still getting this error and compilation stops.

C:/PROGRA~1/R/R-40~1.5/bin/x64/R.dll: file not recognized: file format not recognized
collect2.exe: error: ld returned 1 exit status
no DLL was created

Kindly guide me how to resolve this issue?