Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load data.table 1.12.9 dev on Windows using R 3.5.3 #4528

Closed
vinhdizzo opened this issue Jun 5, 2020 · 9 comments
Closed

Can't load data.table 1.12.9 dev on Windows using R 3.5.3 #4528

vinhdizzo opened this issue Jun 5, 2020 · 9 comments

Comments

@vinhdizzo
Copy link

@vinhdizzo vinhdizzo commented Jun 5, 2020

Hi,

I'm trying to use the dev version of data.table in order to leverage the new fcase function. I downloaded the windows binary file here on this page. I can confirm that I've restarted the computer and am doing this on a brand new R session.

Here is the log of my session:


R version 3.5.3 (2019-03-11) -- "Great Truth"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Microsoft R Open 3.5.3
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2019 Microsoft Corporation

Using the Intel MKL for parallel mathematical computing (using 4 cores).

Default CRAN mirror snapshot taken on 2019-04-15.
See: https://mran.microsoft.com/.

> remove.packages('data.table')
Removing package from ‘C:/Program_Files/Microsoft/R Open/R-3.5.3/library’
(as ‘lib’ is unspecified)
> install.packages("~/Downloads/data.table_1.12.9.zip", repos = NULL, type = "win.binary")
package ‘data.table’ successfully unpacked and MD5 sums checked
> library(data.table)
Error: package or namespace load failed for ‘data.table’:
 object 'as.xts' not found whilst loading namespace 'data.table'
In addition: Warning message:
package ‘data.table’ was built under R version 4.0.0 
> library(xts)
Loading required package: zoo

Attaching package: ‘zoo’

The following objects are masked from ‘package:base’:

    as.Date, as.Date.numeric

> library(data.table)
Error: package or namespace load failed for ‘data.table’ in rbind(info, getNamespaceInfo(env, "S3methods")):
 number of columns of matrices must match (see arg 2)
In addition: Warning message:
package ‘data.table’ was built under R version 4.0.0 
> sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] xts_0.12-0           zoo_1.8-7            RevoUtils_11.0.3     RevoUtilsMath_11.0.0

loaded via a namespace (and not attached):
[1] compiler_3.5.3  tools_3.5.3     grid_3.5.3      lattice_0.20-38
@jangorecki
Copy link
Member

@jangorecki jangorecki commented Jun 5, 2020

Thank you for reporting. Does it work if you build from sources on this R version?
Just to check if warning is relevant.

In addition: Warning message:
package ‘data.table’ was built under R version 4.0.0 

@vinhdizzo
Copy link
Author

@vinhdizzo vinhdizzo commented Jun 5, 2020

Ahh, seems to load fine if I compile from source. I guess the binary package being built under R 4.0 does not work for prior versions.

Microsoft R Open 3.5.3
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2019 Microsoft Corporation

Using the Intel MKL for parallel mathematical computing (using 4 cores).

Default CRAN mirror snapshot taken on 2019-04-15.
See: https://mran.microsoft.com/.

> install.packages("data.table", type = "source",
+                  repos = "https://Rdatatable.gitlab.io/data.table")
trying URL 'https://Rdatatable.gitlab.io/data.table/src/contrib/data.table_1.12.9.tar.gz'
Content type 'application/gzip' length 5202963 bytes (5.0 MB)
downloaded 5.0 MB

* installing *source* package 'data.table' ...

   **********************************************
   WARNING: this package has a configure script
         It probably needs manual configuration
   **********************************************


** libs
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c assign.c -o assign.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c between.c -o between.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c bmerge.c -o bmerge.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c chmatch.c -o chmatch.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c cj.c -o cj.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c coalesce.c -o coalesce.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c dogroups.c -o dogroups.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c fastmean.c -o fastmean.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c fcast.c -o fcast.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c fifelse.c -o fifelse.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c fmelt.c -o fmelt.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c forder.c -o forder.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c frank.c -o frank.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c fread.c -o fread.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c freadR.c -o freadR.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c froll.c -o froll.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c frollR.c -o frollR.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c frolladaptive.c -o frolladaptive.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c fsort.c -o fsort.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c fwrite.c -o fwrite.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c fwriteR.c -o fwriteR.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c gsumm.c -o gsumm.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c ijoin.c -o ijoin.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c init.c -o init.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c inrange.c -o inrange.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c nafill.c -o nafill.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c nqrecreateindices.c -o nqrecreateindices.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c openmp-utils.c -o openmp-utils.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c quickselect.c -o quickselect.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c rbindlist.c -o rbindlist.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c reorder.c -o reorder.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c shift.c -o shift.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c snprintf.c -o snprintf.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c subset.c -o subset.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c transpose.c -o transpose.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c types.c -o types.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c uniqlist.c -o uniqlist.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c utils.c -o utils.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c vecseq.c -o vecseq.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/include" -DNDEBUG     -I"C:/a/w/1/s/vendor/extsoft/include"  -fopenmp   -O2 -Wall  -std=gnu99 -mtune=core2 -c wrappers.c -o wrappers.o
C:/Program_Files/Rtools/mingw_64/bin/gcc -m64 -shared -s -static-libgcc -o data.table.dll tmp.def assign.o between.o bmerge.o chmatch.o cj.o coalesce.o dogroups.o fastmean.o fcast.o fifelse.o fmelt.o forder.o frank.o fread.o freadR.o froll.o frollR.o frolladaptive.o fsort.o fwrite.o fwriteR.o gsumm.o ijoin.o init.o inrange.o nafill.o nqrecreateindices.o openmp-utils.o quickselect.o rbindlist.o reorder.o shift.o snprintf.o subset.o transpose.o types.o uniqlist.o utils.o vecseq.o wrappers.o -fopenmp -lz -LC:/a/w/1/s/vendor/extsoft/lib/x64 -LC:/a/w/1/s/vendor/extsoft/lib -LC:/PROGRA~4/MICROS~1/ROPEN~1/R-35~1.3/bin/x64 -lR
mv data.table.dll datatable.dll
installing to C:/Program_Files/Microsoft/R Open/R-3.5.3/library/data.table/libs/x64
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (data.table)
In R CMD INSTALL

The downloaded source packages are inC:\Users\vnguyen216\AppData\Local\Temp\RtmpSue1DS\downloaded_packages> 
> library(data.table)
data.table 1.12.9 IN DEVELOPMENT built 2020-06-05 07:47:47 UTC; root using 4 threads (see ?getDTthreads).  Latest news: r-datatable.com

@jangorecki
Copy link
Member

@jangorecki jangorecki commented Jun 5, 2020

AFAIU you can still use external windows binaries of data.table, but it needs to be built with R 3.5.

@jangorecki
Copy link
Member

@jangorecki jangorecki commented Jun 5, 2020

If you want to have best performance I advice to always install from source.
Then you can also tweak your makevars to use -O3 -mtune=native. I see that you are now using -O2 -mtune=core2. This will help to use the most of the current machine on which you have build the package.

@jangorecki
Copy link
Member

@jangorecki jangorecki commented Jun 5, 2020

I think it make sense to mention that, during installation R version needs to match, in NEWS file as it may be a common issue.

@jangorecki jangorecki added this to the 1.12.9 milestone Jun 5, 2020
@vinhdizzo
Copy link
Author

@vinhdizzo vinhdizzo commented Jun 5, 2020

Also, might I suggest adding the following under the Windows section for on this wiki page? I didn't try to install from source on Windows because the section didn't suggest to. Of course, this depends on the user having Rtools installed.

install.packages("data.table", type = "source", repos = "https://Rdatatable.gitlab.io/data.table")

@jangorecki
Copy link
Member

@jangorecki jangorecki commented Jun 5, 2020

Rtools is required for R < 4.0.0 only, because we publish windows binaries for R 4.0.0 and R 4.1.0.

@mattdowle
Copy link
Member

@mattdowle mattdowle commented Jun 7, 2020

@vinhdizzo Sorry to see you had trouble here. If the namespace error hadn't happened first, then you would have received the following nicer error from our .onLoad:

    if (!identical(base::getRversion()>="4.0.0", builtUsing>="4.0.0")) {
      stop("This is R ", base::getRversion(), " but data.table has been installed using R ",builtUsing,". The major version must match. Please reinstall data.table.")
      # the if(R>=4.0.0) in NAMESPACE when registering S3 methods rbind.data.table and cbind.data.table happens on install; #3968
    }

I'm not sure how to provide a better message in this case where another error happens first. At least the warning package ‘data.table’ was built under R version 4.0.0 occurred. It could be better (e.g. that warning could be an error but that's R's warning not ours) and more helpful but in this case I don't think it's possible.

Also, might I suggest adding the following under the Windows section for on this wiki page? I didn't try to install from source on Windows because the section didn't suggest to. Of course, this depends on the user having Rtools installed.

Good idea. It's a wiki for the very reason you can edit yourself as you see fit. There are no access restrictions on the wiki. I could have a go myself, but since you faced the issue, you're in the best place to edit it best as you see fit please.

jangorecki added a commit that referenced this issue Jun 7, 2020
@vinhdizzo
Copy link
Author

@vinhdizzo vinhdizzo commented Jun 8, 2020

Thanks @mattdowle. Just edited the wiki with this info. Thanks for data.table!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants