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

[R-package] 32-bit library support #3187

Closed
jameslamb opened this issue Jun 26, 2020 · 35 comments · Fixed by #3285 or #3307
Closed

[R-package] 32-bit library support #3187

jameslamb opened this issue Jun 26, 2020 · 35 comments · Fixed by #3285 or #3307

Comments

@jameslamb
Copy link
Collaborator

jameslamb commented Jun 26, 2020

Summary

As I've investigated #2960 as part of #629 , I've learned that packages on CRAN have to be able to build on 32-bit Windows.

I believe that we need to add support for a 32-bit build LightGBM to get the R package to CRAN.

Evidence that this is required

I have not yet found any official statement that says "all R packages have to build on 32-bit Windows", but I see strong evidence that that is true.

You can find the current list of check environments at https://cran.r-project.org/web/checks/check_flavors.html. None of those seem to be 32-bit

image

but in "Writing R Extensions" I see the following:

On systems which support multiple sub-architectures (principally Windows), R CMD check will install and check a package which contains compiled code under all available sub-architectures.

And in the "R for Windows FAQs":

Packages without compiled code nor a configure.win script will run on both 32- and 64-bit R.

Packages with compiled code but no configure.win nor src/Makefile.win file will be built for both when running on a 64-bit version of Windows if both versions of R are installed.

An empty configure.win is treated in the same way as if none existed. Also, there is a list of packages known to have an architecture-independent configure.win hardcoded into R CMD INSTALL, and for these packages, both architectures will be built under the above conditions. Other packages can be installed with configure.win run for just the first architecture by using option --force-biarch.

Any package can be installed for first one architecture and then the other with option --merge-multiarch, but the package source must be a tarball (and as before, running on a 64-bit version of Windows with both versions of R installed).

Finally, a package without a src/Makefile.win file and no or empty or architecture-independent configure.win file can be installed for both architectures from 32-bit Windows if the 64-bit components were selected when R was installed and option --compile-both is given. Obviously, only the 32-bit installation can be tested.

This is why you see pull requests this in other projects: dmlc/xgboost#5777

I've tried looking in the source for R CMD check but it is very difficult to follow.

Motivation

I believe that we need to add support for a 32-bit build LightGBM to get the R package to CRAN.

Description

To check if the R package works with 32-bit R, try the following:

sh build-cran-package.sh
"C:\Program Files\R\R-4.0.2\bin\i386\R.exe" CMD check lightgbm_3.0.0-1.tar.gz --as-cran

References

There was some discussion about this in #1129 , where it was decided that supporting a 32-bit is possible but that the maintenance burden would be too much. Given that it is needed to get LightGBM to CRAN, I think it should be reconsidered.

@jameslamb
Copy link
Collaborator Author

I've updated #2302 , but I'd like to leave this open for a bit to discuss.

I believe it is worth calling this issue [R-package] because this feature specifically serves the interests of the R package (getting onto CRAN) and R-specific solutions (for example gross hacks with #ifdef LGB_R_BUILD) could be options for addressing this.

@StrikerRUS
Copy link
Collaborator

I remember we enabled optional building for 32bit in Python-package some time ago. The only change that was needed cmake ... -A Win32.
https://github.com/microsoft/LightGBM/pull/2188/files
BTW, I'm not sure that it is still working as we have no CI for that type of build.

@jameslamb
Copy link
Collaborator Author

oh cool! Hey that's at least something simple I can try, thank you!

@jameslamb
Copy link
Collaborator Author

jameslamb commented Aug 8, 2020

It was kind of hard to figure out how to replicate the 32-bit R builds. The R CMD check flags like --extra-arch, --multiarch, and --force-multiarch have slightly confusing effects.

Just noting for myself here that this is the command to use to test if the package works on 32-bit Windows:

sh build-cran-package.sh
"C:\Program Files\R\R-4.0.2\bin\i386\R.exe" CMD check lightgbm_3.0.0-1.tar.gz --as-cran

You'll know this works if you see a message in the logs saying the library is being built on a 32-bit platform, like this

* using log directory 'C:/Users/James/repos/LightGBM/lightgbm.Rcheck'                                                                                        
* using R version 4.0.2 (2020-06-22)                                                                                                                                
* using platform: i386-w64-mingw32 (32-bit)                                                                                                                         
* using session charset: ISO8859-1                                                                                                                                  
* using option '--as-cran'    

@jameslamb
Copy link
Collaborator Author

I can confirm that the package is installable with 32-bit R on Windows

* checking for portable file names ... OK
* checking whether package 'lightgbm' can be installed ... OK
* checking installed package size ... OK
NB: this package is only installed for sub-architecture 'i386'
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK

However, the tests are failing

image

@jameslamb
Copy link
Collaborator Author

here are the full logs from the tests. All failed with this cannot create Dataset handle

error log

R version 4.0.2 (2020-06-22) -- "Taking Off Again"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-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.

> library(testthat)
> library(lightgbm)
Loading required package: R6
> 
> test_check(
+     package = "lightgbm"
+     , stop_on_failure = TRUE
+     , stop_on_warning = FALSE
+ )
-- 1. Error: predictions do not fail for integer input (@test_Predictor.R#7)  --
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 2. Error: start_iteration works correctly (@test_Predictor.R#36)  -----------
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(...)
 4. data$construct()

-- 3. Error: train and predict binary classification (@test_basic.R#12)  -------
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(...)
 4. data$construct()

-- 4. Error: train and predict softmax (@test_basic.R#40)  ---------------------
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(...)
 4. data$construct()

-- 5. Error: use of multiple eval metrics works (@test_basic.R#65)  ------------
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(...)
 4. data$construct()

-- 6. Error: lgb.Booster.upper_bound() and lgb.Booster.lower_bound() work as exp
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(...)
 4. data$construct()

-- 7. Error: lgb.Booster.upper_bound() and lgb.Booster.lower_bound() work as exp
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(...)
 4. data$construct()

-- 8. Error: lightgbm() performs evaluation on validation sets if they are provi
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(...)
 4. data$construct()

-- 9. Error: cv works (@test_basic.R#215)  -------------------------------------
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.cv(...)
 2. data$construct()

-- 10. Error: lightgbm.cv() gives the correct best_score and best_iter for a met
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.cv(...)
 2. data$construct()

-- 11. Error: lgb.train() works as expected with multiple eval metrics (@test_ba
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 12. Error: lgb.train() works with force_col_wise and force_row_wise (@test_ba
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(params = params, data = dtrain, nrounds = nrounds)
 2. data$construct()

-- 13. Error: lgb.train() works as expected with sparse features (@test_basic.R#
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 14. Error: lgb.train() works with early stopping for classification (@test_ba
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 15. Error: lgb.train() treats early_stopping_rounds<=0 as disabling early sto
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 16. Error: lgb.train() works with early stopping for classification with a me
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 17. Error: lgb.train() works with early stopping for regression (@test_basic.
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 18. Error: lgb.train() works with early stopping for regression with a metric
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 19. Error: when early stopping is not activated, best_iter and best_score com
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 20. Error: lightgbm.train() gives the correct best_score and best_iter for a 
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 21. Error: using lightgbm() without early stopping, best_iter and best_score 
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(...)
 4. data$construct()

-- 22. Error: lgb.train() gives same result when interaction_constraints is spec
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(data = dtrain, params = params, nrounds = 2L)
 4. data$construct()

-- 23. Error: lgb.train() gives same results when using interaction_constraints 
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(data = dtrain, params = params, nrounds = 2L)
 4. data$construct()

-- 24. Error: custom objective works (@test_custom_objective.R#43)  ------------
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(param, dtrain, num_round, watchlist, eval = evalerror)
 2. data$construct()

-- 25. Error: using a custom objective, custom eval, and no other metrics works 
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 26. Error: lgb.Dataset: basic construction, saving, loading (@test_dataset.R#
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.Dataset.save(dtest1, tmp_file)
 2. dataset$save_binary(fname)
 3. self$construct()

-- 27. Error: lgb.Dataset: getinfo & setinfo (@test_dataset.R#29)  -------------
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. dtest$construct()

-- 28. Error: lgb.Dataset: slice, dim (@test_dataset.R#44)  --------------------
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.Dataset.construct(dtest)
 2. dataset$construct()

-- 29. Error: lgb.Dataset: colnames (@test_dataset.R#55)  ----------------------
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.Dataset.construct(dtest)
 2. dataset$construct()

-- 30. Failure: lgb.Dataset: Dataset should be able to construct from matrix and
is.na(handle) isn't false.

-- 31. Error: lgb.Dataset$setinfo() should convert 'group' to integer (@test_dat
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. ds$construct()

-- 32. Error: learning-to-rank with lgb.train() works as expected (@test_learnin
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(params = params, data = dtrain, nrounds = 10L)
 2. data$construct()

-- 33. Error: learning-to-rank with lgb.cv() works as expected (@test_learning_t
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.cv(...)
 2. data$construct()

-- 34. Error: lgb.get.eval.result() should throw an informative error for incorr
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 35. Error: lgb.get.eval.result() should throw an informative error for incorr
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lgb.train(...)
 2. data$construct()

-- 36. Error: lgb.load() gives the expected error messages given different incor
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(...)
 4. data$construct()

-- 37. Error: Loading a Booster from a file works (@test_lgb.Booster.R#144)  ---
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(...)
 4. data$construct()

-- 38. Error: Loading a Booster from a string works (@test_lgb.Booster.R#177)  -
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(...)
 4. data$construct()

-- 39. Error: If a string and a file are both passed to lgb.load() the file is u
lgb.Dataset.construct: cannot create Dataset handle
Backtrace:
 1. lightgbm::lightgbm(...)
 4. data$construct()

Error in self$construct() : 
  lgb.Dataset.construct: cannot create Dataset handle

@StrikerRUS
Copy link
Collaborator

Hmmm, how is it possible that according to the R Hub we get only one NOTE for 32 bit Windows?

Windows Server 2008 R2 SP1, R-oldrel, 32/64 bit
1 NOTE, 0 WARNINGS, 0 ERRORs

@jameslamb
Copy link
Collaborator Author

Unfortunately the logs link from that R Hub build are no longer available, but if they were you'd see a line like this:

NB: Only installing package for architecture x86_64

It's a frustrating part of using R Hub, it doesn't exactly replicate CRAN as far as I can tell, even when you pass --as-cran. When I have tried with win-builder (https://win-builder.r-project.org/) before, it tried to build with both 32-bit R and 64-bit R and failed for the 32-bit checks.

Honestly, maybe at this point it makes sense to just try submitting to CRAN and see what they say? I think we are close enough that it's worth a first attempt. Then we'll know for sure what needs to be done.

@guolinke since you are the maintainer in R-package/DESCRIPTION, you would have to do the submission to CRAN. Could you try it?

You just have to upload the package here (https://cran.r-project.org/submit.html), and then they'll send you an email (usually within 48 hours), with some description of issues and links to logs from builds.

You can use this source distribution of the package that I just created from master:

lightgbm_3.0.0-1.tar.gz

@jameslamb
Copy link
Collaborator Author

jameslamb commented Aug 8, 2020

in the meantime I'll submit to win-builder and share the full logs here once they're done, so we can see where we stand with that service.

sh build-cran-package.sh
devtools::check_win_release(
    pkg = "lightgbm_r/",
    args = NULL,
    manual = TRUE,
    email = "jaylamb20@gmail.com",
    quiet = FALSE,
)

@jameslamb
Copy link
Collaborator Author

here is the log from win-build. It shows the error I was mentioning.

00check.log

* using log directory 'd:/RCompile/CRANguest/R-release/lightgbm.Rcheck'
* using R version 4.0.2 (2020-06-22)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* checking for file 'lightgbm/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'lightgbm' version '3.0.0-1'
* package encoding: UTF-8
* checking CRAN incoming feasibility ... NOTE
Maintainer: 'Guolin Ke <jaylamb20@gmail.com>'

License components with restrictions and base license permitting such:
  MIT + file LICENSE
File 'LICENSE':
  The MIT License (MIT)
  
  Copyright (c) Microsoft Corporation
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:
  
  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.

Possibly mis-spelled words in DESCRIPTION:
  LightGBM (22:88, 29:41, 30:60, 30:264)
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'lightgbm' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... ERROR
Loading this package had a fatal error status code 1
Loading log:
Error: package 'lightgbm' is not installed for 'arch = i386'
Execution halted
** DONE
Status: 1 ERROR, 1 NOTE

00install.out

* installing *source* package 'lightgbm' ...
** using staged installation
checking whether MM_PREFETCH works...yes
checking whether MM_MALLOC works...yes
** libs
Warning: this package has a non-empty 'configure.win' file,
so building only the main architecture

d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c application/application.cpp -o application/application.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/boosting.cpp -o boosting/boosting.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/gbdt.cpp -o boosting/gbdt.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/gbdt_model_text.cpp -o boosting/gbdt_model_text.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/gbdt_prediction.cpp -o boosting/gbdt_prediction.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/prediction_early_stop.cpp -o boosting/prediction_early_stop.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/bin.cpp -o io/bin.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/config.cpp -o io/config.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/config_auto.cpp -o io/config_auto.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/dataset.cpp -o io/dataset.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/dataset_loader.cpp -o io/dataset_loader.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/file_io.cpp -o io/file_io.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/json11.cpp -o io/json11.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/metadata.cpp -o io/metadata.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/parser.cpp -o io/parser.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/tree.cpp -o io/tree.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c metric/dcg_calculator.cpp -o metric/dcg_calculator.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c metric/metric.cpp -o metric/metric.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c objective/objective_function.cpp -o objective/objective_function.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c network/linker_topo.cpp -o network/linker_topo.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c network/linkers_mpi.cpp -o network/linkers_mpi.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c network/linkers_socket.cpp -o network/linkers_socket.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c network/network.cpp -o network/network.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/data_parallel_tree_learner.cpp -o treelearner/data_parallel_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/feature_parallel_tree_learner.cpp -o treelearner/feature_parallel_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/gpu_tree_learner.cpp -o treelearner/gpu_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/serial_tree_learner.cpp -o treelearner/serial_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/tree_learner.cpp -o treelearner/tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/voting_parallel_tree_learner.cpp -o treelearner/voting_parallel_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c c_api.cpp -o c_api.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c lightgbm_R.cpp -o lightgbm_R.o
d:/Compiler/rtools40/mingw64/bin/g++ -shared -s -static-libgcc -o lightgbm.dll tmp.def application/application.o boosting/boosting.o boosting/gbdt.o boosting/gbdt_model_text.o boosting/gbdt_prediction.o boosting/prediction_early_stop.o io/bin.o io/config.o io/config_auto.o io/dataset.o io/dataset_loader.o io/file_io.o io/json11.o io/metadata.o io/parser.o io/tree.o metric/dcg_calculator.o metric/metric.o objective/objective_function.o network/linker_topo.o network/linkers_mpi.o network/linkers_socket.o network/network.o treelearner/data_parallel_tree_learner.o treelearner/feature_parallel_tree_learner.o treelearner/gpu_tree_learner.o treelearner/serial_tree_learner.o treelearner/tree_learner.o treelearner/voting_parallel_tree_learner.o c_api.o lightgbm_R.o -fopenmp -pthread -lws2_32 -lIphlpapi -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LD:/RCompile/recent/R-4.0.2/bin/x64 -lR
installing to d:/RCompile/CRANguest/R-release/lib/00LOCK-lightgbm/00new/lightgbm/libs/x64
** R
** data
** demo
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* MD5 sums
packaged installation of 'lightgbm' as lightgbm_3.0.0-1.zip
* DONE (lightgbm)

I still think it is a good idea to try submitting to CRAN and see what happens.

@jameslamb
Copy link
Collaborator Author

ooooooo this discussion looks promising! https://community.rstudio.com/t/configure-win-and-cran-submission/24684

that you actually need to specify Biarch: true in your DESCRIPTION file to have it build on i386 when a configure.win file is present. Adding that fixed the real issue.

I think I misunderstood the "Biarch" field. Let me try re-submitting with Biarch: true.

@jameslamb
Copy link
Collaborator Author

here are the full results, by the way. This link will work for 72 hours https://win-builder.r-project.org/oUfPEaiEOrWF/

@jameslamb
Copy link
Collaborator Author

ok new logs after updating to Biarch: true in DESCRIPTION! Now I see the same results on win-builder as #3187 (comment)

00check.log

* using log directory 'd:/RCompile/CRANguest/R-release/lightgbm.Rcheck'
* using R version 4.0.2 (2020-06-22)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* checking for file 'lightgbm/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'lightgbm' version '3.0.0-1'
* package encoding: UTF-8
* checking CRAN incoming feasibility ... NOTE
Maintainer: 'Guolin Ke <jaylamb20@gmail.com>'

License components with restrictions and base license permitting such:
  MIT + file LICENSE
File 'LICENSE':
  The MIT License (MIT)
  
  Copyright (c) Microsoft Corporation
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:
  
  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.

Possibly mis-spelled words in DESCRIPTION:
  LightGBM (22:88, 29:41, 30:60, 30:264)
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'lightgbm' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* loading checks for arch 'x64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... [9s] OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of 'data' directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in shell scripts ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK
* checking pragmas in C/C++ headers and code ... OK
* checking compiled code ... OK
* checking examples ...
** running examples for arch 'i386' ... [4s] OK
** running examples for arch 'x64' ... [13s] OK
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ... [7s] ERROR
  Running 'testthat.R' [6s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(lightgbm)
  Loading required package: R6
  > 
  > test_check(
  +     package = "lightgbm"
  +     , stop_on_failure = TRUE
  +     , stop_on_warning = FALSE
  + )
  -- 1. Error: predictions do not fail for integer input (@test_Predictor.R#7)  --
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 2. Error: start_iteration works correctly (@test_Predictor.R#36)  -----------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 3. Error: train and predict binary classification (@test_basic.R#12)  -------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 4. Error: train and predict softmax (@test_basic.R#40)  ---------------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 5. Error: use of multiple eval metrics works (@test_basic.R#65)  ------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 6. Error: lgb.Booster.upper_bound() and lgb.Booster.lower_bound() work as exp
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 7. Error: lgb.Booster.upper_bound() and lgb.Booster.lower_bound() work as exp
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 8. Error: lightgbm() performs evaluation on validation sets if they are provi
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 9. Error: cv works (@test_basic.R#215)  -------------------------------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.cv(...)
   2. data$construct()
  
  -- 10. Error: lightgbm.cv() gives the correct best_score and best_iter for a met
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.cv(...)
   2. data$construct()
  
  -- 11. Error: lgb.train() works as expected with multiple eval metrics (@test_ba
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 12. Error: lgb.train() works with force_col_wise and force_row_wise (@test_ba
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(params = params, data = dtrain, nrounds = nrounds)
   2. data$construct()
  
  -- 13. Error: lgb.train() works as expected with sparse features (@test_basic.R#
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 14. Error: lgb.train() works with early stopping for classification (@test_ba
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 15. Error: lgb.train() treats early_stopping_rounds<=0 as disabling early sto
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 16. Error: lgb.train() works with early stopping for classification with a me
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 17. Error: lgb.train() works with early stopping for regression (@test_basic.
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 18. Error: lgb.train() works with early stopping for regression with a metric
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 19. Error: when early stopping is not activated, best_iter and best_score com
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 20. Error: lightgbm.train() gives the correct best_score and best_iter for a 
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 21. Error: using lightgbm() without early stopping, best_iter and best_score 
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 22. Error: lgb.train() gives same result when interaction_constraints is spec
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(data = dtrain, params = params, nrounds = 2L)
   4. data$construct()
  
  -- 23. Error: lgb.train() gives same results when using interaction_constraints 
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(data = dtrain, params = params, nrounds = 2L)
   4. data$construct()
  
  -- 24. Error: custom objective works (@test_custom_objective.R#43)  ------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(param, dtrain, num_round, watchlist, eval = evalerror)
   2. data$construct()
  
  -- 25. Error: using a custom objective, custom eval, and no other metrics works 
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 26. Error: lgb.Dataset: basic construction, saving, loading (@test_dataset.R#
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.Dataset.save(dtest1, tmp_file)
   2. dataset$save_binary(fname)
   3. self$construct()
  
  -- 27. Error: lgb.Dataset: getinfo & setinfo (@test_dataset.R#29)  -------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. dtest$construct()
  
  -- 28. Error: lgb.Dataset: slice, dim (@test_dataset.R#44)  --------------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.Dataset.construct(dtest)
   2. dataset$construct()
  
  -- 29. Error: lgb.Dataset: colnames (@test_dataset.R#55)  ----------------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.Dataset.construct(dtest)
   2. dataset$construct()
  
  -- 30. Failure: lgb.Dataset: Dataset should be able to construct from matrix and
  is.na(handle) isn't false.
  
  -- 31. Error: lgb.Dataset$setinfo() should convert 'group' to integer (@test_dat
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. ds$construct()
  
  -- 32. Error: learning-to-rank with lgb.train() works as expected (@test_learnin
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(params = params, data = dtrain, nrounds = 10L)
   2. data$construct()
  
  -- 33. Error: learning-to-rank with lgb.cv() works as expected (@test_learning_t
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.cv(...)
   2. data$construct()
  
  -- 34. Error: lgb.get.eval.result() should throw an informative error for incorr
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 35. Error: lgb.get.eval.result() should throw an informative error for incorr
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 36. Error: lgb.load() gives the expected error messages given different incor
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 37. Error: Loading a Booster from a file works (@test_lgb.Booster.R#144)  ---
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 38. Error: Loading a Booster from a string works (@test_lgb.Booster.R#177)  -
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 39. Error: If a string and a file are both passed to lgb.load() the file is u
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  Error in self$construct() : 
    lgb.Dataset.construct: cannot create Dataset handle
** running tests for arch 'x64' ... [18s] OK
  Running 'testthat.R' [17s]
* checking PDF version of manual ... OK
* checking for detritus in the temp directory ... OK
* DONE
Status: 1 ERROR, 1 NOTE

00install.out

* installing *source* package 'lightgbm' ...
** using staged installation
checking whether MM_PREFETCH works...yes
checking whether MM_MALLOC works...yes
** libs

*** arch - i386
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c application/application.cpp -o application/application.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/boosting.cpp -o boosting/boosting.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/gbdt.cpp -o boosting/gbdt.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/gbdt_model_text.cpp -o boosting/gbdt_model_text.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/gbdt_prediction.cpp -o boosting/gbdt_prediction.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/prediction_early_stop.cpp -o boosting/prediction_early_stop.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/bin.cpp -o io/bin.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/config.cpp -o io/config.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/config_auto.cpp -o io/config_auto.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/dataset.cpp -o io/dataset.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/dataset_loader.cpp -o io/dataset_loader.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/file_io.cpp -o io/file_io.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/json11.cpp -o io/json11.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/metadata.cpp -o io/metadata.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/parser.cpp -o io/parser.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/tree.cpp -o io/tree.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c metric/dcg_calculator.cpp -o metric/dcg_calculator.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c metric/metric.cpp -o metric/metric.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c objective/objective_function.cpp -o objective/objective_function.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c network/linker_topo.cpp -o network/linker_topo.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c network/linkers_mpi.cpp -o network/linkers_mpi.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c network/linkers_socket.cpp -o network/linkers_socket.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c network/network.cpp -o network/network.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/data_parallel_tree_learner.cpp -o treelearner/data_parallel_tree_learner.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/feature_parallel_tree_learner.cpp -o treelearner/feature_parallel_tree_learner.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/gpu_tree_learner.cpp -o treelearner/gpu_tree_learner.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/serial_tree_learner.cpp -o treelearner/serial_tree_learner.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/tree_learner.cpp -o treelearner/tree_learner.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/voting_parallel_tree_learner.cpp -o treelearner/voting_parallel_tree_learner.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c c_api.cpp -o c_api.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c lightgbm_R.cpp -o lightgbm_R.o
d:/Compiler/rtools40/mingw32/bin/g++ -shared -s -static-libgcc -o lightgbm.dll tmp.def application/application.o boosting/boosting.o boosting/gbdt.o boosting/gbdt_model_text.o boosting/gbdt_prediction.o boosting/prediction_early_stop.o io/bin.o io/config.o io/config_auto.o io/dataset.o io/dataset_loader.o io/file_io.o io/json11.o io/metadata.o io/parser.o io/tree.o metric/dcg_calculator.o metric/metric.o objective/objective_function.o network/linker_topo.o network/linkers_mpi.o network/linkers_socket.o network/network.o treelearner/data_parallel_tree_learner.o treelearner/feature_parallel_tree_learner.o treelearner/gpu_tree_learner.o treelearner/serial_tree_learner.o treelearner/tree_learner.o treelearner/voting_parallel_tree_learner.o c_api.o lightgbm_R.o -fopenmp -pthread -lws2_32 -lIphlpapi -Ld:/Compiler/gcc-4.9.3/local330/lib/i386 -Ld:/Compiler/gcc-4.9.3/local330/lib -LD:/RCompile/recent/R-4.0.2/bin/i386 -lR
installing to d:/RCompile/CRANguest/R-release/lib/00LOCK-lightgbm/00new/lightgbm/libs/i386

*** arch - x64
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c application/application.cpp -o application/application.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/boosting.cpp -o boosting/boosting.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/gbdt.cpp -o boosting/gbdt.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/gbdt_model_text.cpp -o boosting/gbdt_model_text.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/gbdt_prediction.cpp -o boosting/gbdt_prediction.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c boosting/prediction_early_stop.cpp -o boosting/prediction_early_stop.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/bin.cpp -o io/bin.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/config.cpp -o io/config.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/config_auto.cpp -o io/config_auto.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/dataset.cpp -o io/dataset.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/dataset_loader.cpp -o io/dataset_loader.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/file_io.cpp -o io/file_io.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/json11.cpp -o io/json11.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/metadata.cpp -o io/metadata.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/parser.cpp -o io/parser.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c io/tree.cpp -o io/tree.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c metric/dcg_calculator.cpp -o metric/dcg_calculator.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c metric/metric.cpp -o metric/metric.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c objective/objective_function.cpp -o objective/objective_function.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c network/linker_topo.cpp -o network/linker_topo.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c network/linkers_mpi.cpp -o network/linkers_mpi.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c network/linkers_socket.cpp -o network/linkers_socket.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c network/network.cpp -o network/network.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/data_parallel_tree_learner.cpp -o treelearner/data_parallel_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/feature_parallel_tree_learner.cpp -o treelearner/feature_parallel_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/gpu_tree_learner.cpp -o treelearner/gpu_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/serial_tree_learner.cpp -o treelearner/serial_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/tree_learner.cpp -o treelearner/tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c treelearner/voting_parallel_tree_learner.cpp -o treelearner/voting_parallel_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c c_api.cpp -o c_api.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-4.0.2/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c lightgbm_R.cpp -o lightgbm_R.o
d:/Compiler/rtools40/mingw64/bin/g++ -shared -s -static-libgcc -o lightgbm.dll tmp.def application/application.o boosting/boosting.o boosting/gbdt.o boosting/gbdt_model_text.o boosting/gbdt_prediction.o boosting/prediction_early_stop.o io/bin.o io/config.o io/config_auto.o io/dataset.o io/dataset_loader.o io/file_io.o io/json11.o io/metadata.o io/parser.o io/tree.o metric/dcg_calculator.o metric/metric.o objective/objective_function.o network/linker_topo.o network/linkers_mpi.o network/linkers_socket.o network/network.o treelearner/data_parallel_tree_learner.o treelearner/feature_parallel_tree_learner.o treelearner/gpu_tree_learner.o treelearner/serial_tree_learner.o treelearner/tree_learner.o treelearner/voting_parallel_tree_learner.o c_api.o lightgbm_R.o -fopenmp -pthread -lws2_32 -lIphlpapi -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LD:/RCompile/recent/R-4.0.2/bin/x64 -lR
installing to d:/RCompile/CRANguest/R-release/lib/00LOCK-lightgbm/00new/lightgbm/libs/x64
** R
** data
** demo
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* MD5 sums
packaged installation of 'lightgbm' as lightgbm_3.0.0-1.zip
* DONE (lightgbm)

Full record is here: https://win-builder.r-project.org/g37i74xkiEnW/

This is encouraging because it means:

  1. At least the package is installable
  2. The approach I mentioned in [R-package] 32-bit library support #3187 (comment) might be a way to reproduce the error locally, which will be faster to work on than waiting for R Hub or win-builder

@jameslamb
Copy link
Collaborator Author

I did not intend to close this in #3285

@jameslamb jameslamb reopened this Aug 12, 2020
@jameslamb
Copy link
Collaborator Author

The issues I was seeing on win-builder and locally (#3187 (comment)), also showed up in our submission to CRAN (#3298 (comment))

CRAN logs

00check.log

* using log directory 'd:/RCompile/CRANincoming/R-devel/lightgbm.Rcheck'
* using R Under development (unstable) (2020-08-10 r79000)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* checking for file 'lightgbm/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'lightgbm' version '3.0.0-1'
* package encoding: UTF-8
* checking CRAN incoming feasibility ... NOTE
Maintainer: 'Guolin Ke <guolin.ke@microsoft.com>'

New submission

License components with restrictions and base license permitting such:
  MIT + file LICENSE
File 'LICENSE':
  The MIT License (MIT)
  
  Copyright (c) Microsoft Corporation
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:
  
  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'lightgbm' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* loading checks for arch 'x64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... [12s] OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of 'data' directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in shell scripts ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK
* checking pragmas in C/C++ headers and code ... OK
* checking compiled code ... OK
* checking examples ...
** running examples for arch 'i386' ... [6s] OK
** running examples for arch 'x64' ... [7s] OK
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ... [9s] ERROR
  Running 'testthat.R' [8s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(lightgbm)
  Loading required package: R6
  > 
  > test_check(
  +     package = "lightgbm"
  +     , stop_on_failure = TRUE
  +     , stop_on_warning = FALSE
  + )
  -- 1. Error: predictions do not fail for integer input (@test_Predictor.R#7)  --
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 2. Error: start_iteration works correctly (@test_Predictor.R#36)  -----------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 3. Error: train and predict binary classification (@test_basic.R#12)  -------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 4. Error: train and predict softmax (@test_basic.R#40)  ---------------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 5. Error: use of multiple eval metrics works (@test_basic.R#65)  ------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 6. Error: lgb.Booster.upper_bound() and lgb.Booster.lower_bound() work as exp
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 7. Error: lgb.Booster.upper_bound() and lgb.Booster.lower_bound() work as exp
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 8. Error: lightgbm() performs evaluation on validation sets if they are provi
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 9. Error: cv works (@test_basic.R#215)  -------------------------------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.cv(...)
   2. data$construct()
  
  -- 10. Error: lightgbm.cv() gives the correct best_score and best_iter for a met
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.cv(...)
   2. data$construct()
  
  -- 11. Error: lgb.train() works as expected with multiple eval metrics (@test_ba
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 12. Error: lgb.train() works with force_col_wise and force_row_wise (@test_ba
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(params = params, data = dtrain, nrounds = nrounds)
   2. data$construct()
  
  -- 13. Error: lgb.train() works as expected with sparse features (@test_basic.R#
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 14. Error: lgb.train() works with early stopping for classification (@test_ba
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 15. Error: lgb.train() treats early_stopping_rounds<=0 as disabling early sto
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 16. Error: lgb.train() works with early stopping for classification with a me
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 17. Error: lgb.train() works with early stopping for regression (@test_basic.
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 18. Error: lgb.train() works with early stopping for regression with a metric
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 19. Error: when early stopping is not activated, best_iter and best_score com
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 20. Error: lightgbm.train() gives the correct best_score and best_iter for a 
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 21. Error: using lightgbm() without early stopping, best_iter and best_score 
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 22. Error: lgb.train() gives same result when interaction_constraints is spec
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(data = dtrain, params = params, nrounds = 2L)
   4. data$construct()
  
  -- 23. Error: lgb.train() gives same results when using interaction_constraints 
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(data = dtrain, params = params, nrounds = 2L)
   4. data$construct()
  
  -- 24. Error: custom objective works (@test_custom_objective.R#43)  ------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(param, dtrain, num_round, watchlist, eval = evalerror)
   2. data$construct()
  
  -- 25. Error: using a custom objective, custom eval, and no other metrics works 
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 26. Error: lgb.Dataset: basic construction, saving, loading (@test_dataset.R#
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.Dataset.save(dtest1, tmp_file)
   2. dataset$save_binary(fname)
   3. self$construct()
  
  -- 27. Error: lgb.Dataset: getinfo & setinfo (@test_dataset.R#29)  -------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. dtest$construct()
  
  -- 28. Error: lgb.Dataset: slice, dim (@test_dataset.R#44)  --------------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.Dataset.construct(dtest)
   2. dataset$construct()
  
  -- 29. Error: lgb.Dataset: colnames (@test_dataset.R#55)  ----------------------
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.Dataset.construct(dtest)
   2. dataset$construct()
  
  -- 30. Failure: lgb.Dataset: Dataset should be able to construct from matrix and
  is.na(handle) isn't false.
  
  -- 31. Error: lgb.Dataset$setinfo() should convert 'group' to integer (@test_dat
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. ds$construct()
  
  -- 32. Error: learning-to-rank with lgb.train() works as expected (@test_learnin
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(params = params, data = dtrain, nrounds = 10L)
   2. data$construct()
  
  -- 33. Error: learning-to-rank with lgb.cv() works as expected (@test_learning_t
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.cv(...)
   2. data$construct()
  
  -- 34. Error: lgb.get.eval.result() should throw an informative error for incorr
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 35. Error: lgb.get.eval.result() should throw an informative error for incorr
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lgb.train(...)
   2. data$construct()
  
  -- 36. Error: lgb.load() gives the expected error messages given different incor
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 37. Error: Loading a Booster from a file works (@test_lgb.Booster.R#144)  ---
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 38. Error: Loading a Booster from a string works (@test_lgb.Booster.R#177)  -
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  -- 39. Error: If a string and a file are both passed to lgb.load() the file is u
  lgb.Dataset.construct: cannot create Dataset handle
  Backtrace:
   1. lightgbm::lightgbm(...)
   4. data$construct()
  
  Error in self$construct() : 
    lgb.Dataset.construct: cannot create Dataset handle
** running tests for arch 'x64' ... [19s] OK
  Running 'testthat.R' [19s]
* checking PDF version of manual ... OK
* checking for detritus in the temp directory ... OK
* DONE
Status: 1 ERROR, 1 NOTE

00install.out

* installing *source* package 'lightgbm' ...
** using staged installation
checking whether MM_PREFETCH works...yes
checking whether MM_MALLOC works...yes
** libs

*** arch - i386
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c application/application.cpp -o application/application.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c boosting/boosting.cpp -o boosting/boosting.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c boosting/gbdt.cpp -o boosting/gbdt.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c boosting/gbdt_model_text.cpp -o boosting/gbdt_model_text.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c boosting/gbdt_prediction.cpp -o boosting/gbdt_prediction.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c boosting/prediction_early_stop.cpp -o boosting/prediction_early_stop.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/bin.cpp -o io/bin.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/config.cpp -o io/config.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/config_auto.cpp -o io/config_auto.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/dataset.cpp -o io/dataset.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/dataset_loader.cpp -o io/dataset_loader.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/file_io.cpp -o io/file_io.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/json11.cpp -o io/json11.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/metadata.cpp -o io/metadata.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/parser.cpp -o io/parser.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/tree.cpp -o io/tree.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c metric/dcg_calculator.cpp -o metric/dcg_calculator.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c metric/metric.cpp -o metric/metric.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c objective/objective_function.cpp -o objective/objective_function.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c network/linker_topo.cpp -o network/linker_topo.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c network/linkers_mpi.cpp -o network/linkers_mpi.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c network/linkers_socket.cpp -o network/linkers_socket.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c network/network.cpp -o network/network.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c treelearner/data_parallel_tree_learner.cpp -o treelearner/data_parallel_tree_learner.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c treelearner/feature_parallel_tree_learner.cpp -o treelearner/feature_parallel_tree_learner.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c treelearner/gpu_tree_learner.cpp -o treelearner/gpu_tree_learner.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c treelearner/serial_tree_learner.cpp -o treelearner/serial_tree_learner.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c treelearner/tree_learner.cpp -o treelearner/tree_learner.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c treelearner/voting_parallel_tree_learner.cpp -o treelearner/voting_parallel_tree_learner.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c c_api.cpp -o c_api.o
d:/Compiler/rtools40/mingw32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c lightgbm_R.cpp -o lightgbm_R.o
d:/Compiler/rtools40/mingw32/bin/g++ -shared -s -static-libgcc -o lightgbm.dll tmp.def application/application.o boosting/boosting.o boosting/gbdt.o boosting/gbdt_model_text.o boosting/gbdt_prediction.o boosting/prediction_early_stop.o io/bin.o io/config.o io/config_auto.o io/dataset.o io/dataset_loader.o io/file_io.o io/json11.o io/metadata.o io/parser.o io/tree.o metric/dcg_calculator.o metric/metric.o objective/objective_function.o network/linker_topo.o network/linkers_mpi.o network/linkers_socket.o network/network.o treelearner/data_parallel_tree_learner.o treelearner/feature_parallel_tree_learner.o treelearner/gpu_tree_learner.o treelearner/serial_tree_learner.o treelearner/tree_learner.o treelearner/voting_parallel_tree_learner.o c_api.o lightgbm_R.o -fopenmp -pthread -lws2_32 -lIphlpapi -Ld:/Compiler/gcc-4.9.3/local330/lib/i386 -Ld:/Compiler/gcc-4.9.3/local330/lib -LD:/RCompile/recent/R/bin/i386 -lR
installing to d:/RCompile/CRANincoming/R-devel/lib/00LOCK-lightgbm/00new/lightgbm/libs/i386

*** arch - x64
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c application/application.cpp -o application/application.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c boosting/boosting.cpp -o boosting/boosting.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c boosting/gbdt.cpp -o boosting/gbdt.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c boosting/gbdt_model_text.cpp -o boosting/gbdt_model_text.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c boosting/gbdt_prediction.cpp -o boosting/gbdt_prediction.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c boosting/prediction_early_stop.cpp -o boosting/prediction_early_stop.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/bin.cpp -o io/bin.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/config.cpp -o io/config.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/config_auto.cpp -o io/config_auto.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/dataset.cpp -o io/dataset.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/dataset_loader.cpp -o io/dataset_loader.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/file_io.cpp -o io/file_io.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/json11.cpp -o io/json11.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/metadata.cpp -o io/metadata.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/parser.cpp -o io/parser.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c io/tree.cpp -o io/tree.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c metric/dcg_calculator.cpp -o metric/dcg_calculator.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c metric/metric.cpp -o metric/metric.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c objective/objective_function.cpp -o objective/objective_function.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c network/linker_topo.cpp -o network/linker_topo.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c network/linkers_mpi.cpp -o network/linkers_mpi.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c network/linkers_socket.cpp -o network/linkers_socket.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c network/network.cpp -o network/network.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c treelearner/data_parallel_tree_learner.cpp -o treelearner/data_parallel_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c treelearner/feature_parallel_tree_learner.cpp -o treelearner/feature_parallel_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c treelearner/gpu_tree_learner.cpp -o treelearner/gpu_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c treelearner/serial_tree_learner.cpp -o treelearner/serial_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c treelearner/tree_learner.cpp -o treelearner/tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c treelearner/voting_parallel_tree_learner.cpp -o treelearner/voting_parallel_tree_learner.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c c_api.cpp -o c_api.o
d:/Compiler/rtools40/mingw64/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I./include -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD    -I"d:/Compiler/gcc-4.9.3/local330/include"  -fopenmp -pthread   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c lightgbm_R.cpp -o lightgbm_R.o
d:/Compiler/rtools40/mingw64/bin/g++ -shared -s -static-libgcc -o lightgbm.dll tmp.def application/application.o boosting/boosting.o boosting/gbdt.o boosting/gbdt_model_text.o boosting/gbdt_prediction.o boosting/prediction_early_stop.o io/bin.o io/config.o io/config_auto.o io/dataset.o io/dataset_loader.o io/file_io.o io/json11.o io/metadata.o io/parser.o io/tree.o metric/dcg_calculator.o metric/metric.o objective/objective_function.o network/linker_topo.o network/linkers_mpi.o network/linkers_socket.o network/network.o treelearner/data_parallel_tree_learner.o treelearner/feature_parallel_tree_learner.o treelearner/gpu_tree_learner.o treelearner/serial_tree_learner.o treelearner/tree_learner.o treelearner/voting_parallel_tree_learner.o c_api.o lightgbm_R.o -fopenmp -pthread -lws2_32 -lIphlpapi -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LD:/RCompile/recent/R/bin/x64 -lR
installing to d:/RCompile/CRANincoming/R-devel/lib/00LOCK-lightgbm/00new/lightgbm/libs/x64
** R
** data
** demo
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (lightgbm)

@guolinke
Copy link
Collaborator

@jameslamb
Actually, I think 32-bit version is very slow. Should we really need to support it?
Is there any solution that we can somehow "hack" the cran checks for 32-bit? like skip the tests?

@jameslamb
Copy link
Collaborator Author

I'm really not sure how strongly CRAN feels about 32-bit. So here's my proposal.

  1. I just built a version of the package with "skip on 32-bit" logic added to all the tests and submitted it to win-builder. Let's see what the results are.
  2. If it passes, let's submit that to CRAN. HOWEVER, I don't want to try to sneak it in. Let's use the optional comment field at https://cran.r-project.org/submit.html with something like the following text:

On previous submissions, this package was rejected because the tests fail on architecture "i386". In this submission, we have added code to skip all tests on that architecture. This library is maintained by a small team of volunteers and adding 32-bit support will take a large commitment of that team's time and effort. We hope you will consider this compromise acceptable. Thank you for your time and consideration.

image

@guolinke
Copy link
Collaborator

@jameslamb
The "slow" is for LightGBM itself. we have many internal data structures are based on 64-bit objects. Using 32-bit to simulate it will be much slower.

BTW, it seems the 32-bit Linux build can pass?

@guolinke
Copy link
Collaborator

BTW, it seems the Windows version is built by MinGW? I remember @Laurae2 benchmarked that MinGW is much slower than vc++ in windows.
Is that possible to have vc++ build in cran?

And 32-bit version should work by vc++ build.

@jameslamb
Copy link
Collaborator Author

Oh sure, I understand that we would not advise anyone to use 32-bit and would tell them they'll get better performance on 64-bit. I haven't tried 32-bit with MSVC yet (like #3187 (comment)), just because you have to use MINGW on CRAN.

I will try it tonight, based on #3187 (comment).

In my opinion, the value of this issue isn't that any of our users would ever actually use the 32-bit version, but just that it's an obstacle we have to get past to be on CRAN.

A lot of R users will not be comfortable enough with git or CMake to build the package from source, and other packages in the R ecosystem like {parsnip} won't integrate with LightGBM if we aren't on CRAN (tidymodels/parsnip#117 (comment)).

If we follow my proposal in #3187 (comment), I think it could satisfy CRAN to say that that 32-bit package is much more limited. Like maybe we can limit it to only training on dense matrices, no distributed training, etc. Maybe that would cut down on the maintenance burden at least?

@jameslamb
Copy link
Collaborator Author

BTW, it seems the 32-bit Linux build can pass?

I don't think so. I think the only two R Hub 32-bit Linux builds were on Solaris and those both failed (#629 (comment))

@guolinke
Copy link
Collaborator

@jameslamb
yeah, sure, we can have a quick workaround now.
BTW, maybe it is better to have a warning in the current workaround if the user tries to use 32-bit build?

@jameslamb
Copy link
Collaborator Author

yep I agree! I just think that having a not-that-great 32-bit build is worth it if it gets the R package onto CRAN.

I'll report the results from building a 32-bit version with MSVC here shortly, let's see how it goes.

@guolinke
Copy link
Collaborator

I don't think so. I think the only two R Hub 32-bit Linux builds were on Solaris and those both failed (#629 (comment))

I saw the errors in 32-bit version are caused by network/socket_wrapper.hpp:30:21: fatal error: ifaddrs.h: No such file or directory . And the windows bulid for both 32-bit and 64-bit seems all pass.

@jameslamb
Copy link
Collaborator Author

And the windows build for both 32-bit and 64-bit seems all pass.

Ah yes, this is very confusing. See this explanation when @StrikerRUS asked me the same question 😬 (#3187 (comment)). Those Windows jobs have names like 32-bit / 64-bit but they skipped the 32-bit parts.

@guolinke
Copy link
Collaborator

A quick summary:

  • disable 32-bit tests, for now, to have usable cran version (in 64-bit). Also, add some warnings to the 32-bit version.
  • after that, we can take some time to fix the 32-bit build problems, also cc @shiyu1994
  • I prefer to use MSCV in windows build. If this is not possible in CRAN. Maybe we can have a doc, to let users aware of the performance drop in MinGW.

@jameslamb
Copy link
Collaborator Author

thank you, yes I agree with that! With the one condition CRAN might reject our submission with the skipped tests. But we'll just have to see. I'll open a PR with the skipping once I get working results from win-builder.

@jameslamb
Copy link
Collaborator Author

Ok I just tried with MSVC. You can see the changes I had to make here: https://github.com/microsoft/LightGBM/compare/master...jameslamb:r/try-32bit-msvc?expand=1.

I ran this

"C:\Program Files\R\R-4.0.2\bin\i386\Rscript.exe" build_r.R

Here's as much log as I was able to copy:

build_r.R logs
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\score_updater.hpp(32,46): warning C4244: 'argument': conversion from 'int64_t' to 'size_t', possible loss of data (compiling source file C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\gbdt_model_text.cpp) [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\score_updater.hpp(44,16): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data (compiling source file C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\gbdt_model_text.cpp) [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\goss.hpp(66,20): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data (compiling source file C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\boosting.cpp) [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\goss.hpp(67,19): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data (compiling source file C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\boosting.cpp) [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
  gbdt_prediction.cpp
  prediction_early_stop.cpp
  bin.cpp
  config.cpp
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\score_updater.hpp(30,19): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data (compiling source file C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\gbdt_prediction.cpp) [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\score_updater.hpp(32,46): warning C4244: 'argument': conversion from 'int64_t' to 'size_t', possible loss of data (compiling source file C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\gbdt_prediction.cpp) [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\score_updater.hpp(44,16): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data (compiling source file C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\boosting\gbdt_prediction.cpp) [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
  config_auto.cpp
  dataset.cpp
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\io\dataset.cpp(635,33): warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
  dataset_loader.cpp
  file_io.cpp
  json11.cpp
  metadata.cpp
  parser.cpp
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\io\metadata.cpp(265,43): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\io\metadata.cpp(298,17): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\io\metadata.cpp(407,37): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
  tree.cpp
  dcg_calculator.cpp
  metric.cpp
  linker_topo.cpp
  linkers_mpi.cpp
  linkers_socket.cpp
  network.cpp
  objective_function.cpp
  data_parallel_tree_learner.cpp
  feature_parallel_tree_learner.cpp
  gpu_tree_learner.cpp
  serial_tree_learner.cpp
  tree_learner.cpp
  voting_parallel_tree_learner.cpp
  c_api.cpp
  lightgbm_R.cpp
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(463,11): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(464,37): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(471,29): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(480,29): warning C4244: 'initializing': conversion from 'int64_t' to 'unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(483,30): warning C4244: 'initializing': conversion from 'int64_t' to 'unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(488,32): warning C4244: 'initializing': conversion from 'int64_t' to 'unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(503,33): warning C4244: 'initializing': conversion from 'int64_t' to 'unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(506,33): warning C4244: 'initializing': conversion from 'int64_t' to 'unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(512,67): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(516,45): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(517,58): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(521,31): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(524,19): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(526,30): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(528,30): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(528,94): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(528,135): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(547,31): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(549,52): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(560,51): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(560,80): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(599,67): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(609,31): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(633,33): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(633,56): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(633,89): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(635,116): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(637,95): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(642,65): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(643,50): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(657,31): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(660,59): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(662,30): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(666,28): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(1134,52): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(1135,46): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(1200,52): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(1201,46): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(1271,61): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(1272,55): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(2188,41): warning C4244: 'argument': conversion from 'int64_t' to 'size_t', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(2206,41): warning C4244: 'argument': conversion from 'int64_t' to 'size_t', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(2391,27): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(979): message : see reference to function template instantiation 'std::function<std::vector<std::pair<int,double>,std::allocator<std::pair<int,double>>> (int)> RowFunctionFromCSR<int>(const void *,int,const int32_t *,const void *,int,int64_t,int64_t)' being compiled [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(2405,27): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(2422,27): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\src\c_api.cpp(2436,27): warning C4244: 'argument': conversion from 'int64_t' to 'const unsigned int', possible loss of data [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
     Creating library C:/Users/James/AppData/Local/Temp/RtmpikVs2F/R.INSTALL3ba03d177120/lightgbm/src/Release/lib_lightgbm.lib and object C:/Users/James/AppData/Local/Temp/RtmpikVs2F/R.INSTALL3ba03d177120/lightgbm/src/Release/lib_lightgbm.exp
c_api.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
lightgbm_R.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
feature_parallel_tree_learner.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
serial_tree_learner.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
tree_learner.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
voting_parallel_tree_learner.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
linkers_socket.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
network.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
objective_function.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
data_parallel_tree_learner.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
parser.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
tree.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
dcg_calculator.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
metric.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
dataset.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
dataset_loader.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
json11.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
metadata.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
prediction_early_stop.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
bin.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
config.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
config_auto.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
application.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
boosting.obj : error LNK2001: unresolved exterError in .run_shell_command(build_cmd, build_args) :
  Command failed with exit code: 1
nal symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
gbdt.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
gbdt_model_text.obj : error LNK2001: unresolved external symbol _Rf_error [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
serial_tree_learner.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
voting_parallel_tree_learner.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
c_api.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
linkers_socket.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
network.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
objective_function.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
data_parallel_tree_learner.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
metadata.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
parser.obj : error LNK2001: unresolved external symbol _Rprintf [* removing 'C:/Users/James/Documents/R/win-library/4.0/lightgbm'
* restoring previous 'C:/Users/James/Documents/R/win-library/4.0/lightgbm'
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
tree.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
metric.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
bin.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
config.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
dataset.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
dataset_loader.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
application.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
boosting.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
gbdt.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
gbdt_model_text.obj : error LNK2001: unresolved external symbol _Rprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
serial_tree_learner.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
voting_parallel_tree_learner.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
c_api.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
linkers_socket.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
network.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
objective_function.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
data_parallel_tree_learner.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
metadata.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
parser.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
tree.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
metric.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
bin.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
config.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
dataset.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
dataset_loader.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
application.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
boosting.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
gbdt.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
gbdt_model_text.obj : error LNK2001: unresolved external symbol _Rvprintf [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
lightgbm_R.obj : error LNK2019: unresolved external symbol _R_registerRoutines referenced in function "void __cdecl R_init_lightgbm(struct _DllInfo *)" (?R_init_lightgbm@@YAXPAU_DllInfo@@@Z) [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
lightgbm_R.obj : error LNK2019: unresolved external symbol _R_useDynamicSymbols referenced in function "void __cdecl R_init_lightgbm(struct _DllInfo *)" (?R_init_lightgbm@@YAXPAU_DllInfo@@@Z) [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
R.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86' [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\Release\lib_lightgbm.dll : fatal error LNK1120: 5 unresolved externals [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build\_lightgbm.vcxproj]
Error in .run_shell_command(install_cmd, install_args) :
  Command failed with exit code: 1
Execution halted

There were a lot of warnings and linker errors. here's a small sample

[C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build_lightgbm.vcxproj]
lightgbm_R.obj : error LNK2019: unresolved external symbol _R_useDynamicSymbols referenced in function "void __cdecl R_init_lightgbm(struct _DllInfo *)" (?R_init_lightgbm@@YAXPAU_DllInfo@@@z) [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build_lightgbm.vcxproj]
R.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86' [C:\Users\James\AppData\Local\Temp\RtmpikVs2F\R.INSTALL3ba03d177120\lightgbm\src\build_lightgbm.vcxproj]
C:\Users\James\AppData\Local\Temp\Rtm

@jameslamb
Copy link
Collaborator Author

I might be able to fix that, though. I'm experimenting with some things.

@jameslamb
Copy link
Collaborator Author

Happy to report that skipping the tests does allow us to pass checks on 32-bit Windows! I've opened #3302 with those changes.

@StrikerRUS
Copy link
Collaborator

@guolinke

I saw the errors in 32-bit version are caused by network/socket_wrapper.hpp:30:21: fatal error: ifaddrs.h: No such file or directory .

What do you think about the possible solution I proposed with borrowing ifaddrs.h for Solaris?
#629 (comment)

@jameslamb
Copy link
Collaborator Author

Coming from #3302 (comment), @guolinke and @shiyu1994 here is how to develop on this. These steps assume you are on a 64-bit Windows system (but will use the 32-bit version of R).

Set up R for Windows

  1. Go here and click "Download R-4.0.2 for Windows" (https://cran.r-project.org/bin/windows/base/).
  2. Double-click the installer that is downloaded and click through the screens. Just accept all the defaults.
  3. Download rtools40 from here: https://cran.r-project.org/bin/windows/Rtools/. Choose rtools40-x86_64.exe
  4. Double-click that installer that is downloaded and click through the screens. Make sure it is installed at C:/rtools40 (should be the default)
  5. Add R and Rtools to the PATH environment variable. They'll probably be paths like this:
    • C:\Program Files\R\R-4.0.2\bin
    • C:\rtools40\mingw64\bin
    • C:\rtools40\usr\bin

Build the CRAN package

  1. From the root of the LightGBM repo, run sh build-cran-package.sh

Try installing and building with 64-bit R

  1. Just to confirm that your R setup is working
R CMD check --as-cran --no-multiarch lightgbm_3.0.0-1.tar.gz

Try with 32-bit R

  1. Test the package with 32-bit R "C:\Program Files\R\R-4.0.2\bin\R.exe" CMD check --as-cran lightgbm_3.0.0-1.tar.gz

Some Notes

Let me know if you have any questions, and thank you so much for your efforts!

@guolinke
Copy link
Collaborator

I first build the 32-bit cli/python versions, both of them can work.
This proves that the c++ code is ready for 32-bit.

@jameslamb
Copy link
Collaborator Author

ooooo that is really encouraging! That might mean there is just something we need to change in the R-specific files in R-package/src

Can you share the command(s) for how you built the python package with 32 bit?

@guolinke
Copy link
Collaborator

@jameslamb it is quite simple.

  1. install 32-bit python/anaconda
  2. cd to LightGBM/python-package
  3. run python setup.py install --bit32
  4. run tests or examples in examples/python-guide.

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