Skip to content

[R-Package] CRAN issues #629

@Laurae2

Description

@Laurae2

Environment info

Operating System: Windows 8.1 Pro
CPU: i7-4600U
R version: 3.4

To make a release on CRAN, we will need first to fix all the errors / warnings / notes. Currently testing on Windows, but we will also need to test on Linux. If some of them cannot be fixed, we will need to have an explanation for each of those which will not be fixed by us. @guolinke

Maybe time to add some vignettes @coforfe if you want to work on them.

  • Fix CRAN errors
  • Fix CRAN warnings
  • Fix CRAN notes
  • Add vignettes
  • Make examples runnable for tests
  • Switch to MinGW by default on Windows (it falls to MinGW if VS fails to be found)
  • Clean install everytime when not using precompiled dll/lib
  • Pass CRAN checks on Windows
  • Pass CRAN checks on Linux
  • Make CRAN-valid portable installation configuration ([R-package] Create portable configuration with 'configure' scripts #2960)
  • Submit to CRAN
  • Get accepted on CRAN

00install.out:

* installing *source* package 'lightgbm' ...
** libs
installing via 'install.libs.R' to C:/tmp/RtmpG2NQSv/lightgbm.Rcheck/lightgbm
Warning in file.copy("./../../include", "./", overwrite = TRUE, recursive = TRUE) :
  problem copying .\..\..\include to .\include: No such file or directory
Error in eval(ei, envir) : Cannot find folder LightGBM/include
* removing 'C:/tmp/RtmpG2NQSv/lightgbm.Rcheck/lightgbm'

Windows (fake) CRAN log:

R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

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

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

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

> library(devtools)
> library(roxygen2) # devtools::install_github("klutometis/roxygen")
> setwd("C:/LightGBM/R-package")
> devtools::check()
Updating lightgbm documentation
Loading lightgbm
Re-compiling lightgbm
"C:/PROGRA~1/R/R-34~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL "C:\LightGBM\R-package"  \
  --library="C:\tmp\RtmpG2NQSv\devtools_install_19fa019043416" --no-R --no-data --no-help --no-demo --no-inst --no-docs --no-exec --no-multiarch  \
  --no-test-load --preclean 

* installing *source* package 'lightgbm' ...
** libs
installing via 'install.libs.R' to C:/tmp/RtmpG2NQSv/devtools_install_19fa019043416/lightgbm
-- Building for: Visual Studio 15 2017
-- The C compiler identification is MSVC 19.11.25303.0
-- The CXX compiler identification is MSVC 19.11.25303.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/Preview/Community/VC/Tools/MSVC/14.11.25301/bin/HostX86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/Preview/Community/VC/Tools/MSVC/14.11.25301/bin/HostX86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/Preview/Community/VC/Tools/MSVC/14.11.25301/bin/HostX86/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/Preview/Community/VC/Tools/MSVC/14.11.25301/bin/HostX86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: /openmp  
-- Configuring done
-- Generating done
-- Build files have been written to: C:/LightGBM/R-package/src/build
Microsoft (R) Build Engine version 15.3.118.39484
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 16/06/2017 07:00:42 PM.
Project "C:\LightGBM\R-package\src\build\_lightgbm.vcxproj" on node 1 (default targets).
Project "C:\LightGBM\R-package\src\build\_lightgbm.vcxproj" (1) is building "C:\LightGBM\R-package\src\build\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
PrepareForBuild:
  Creating directory "x64\Release\ZERO_CHECK\".
  Creating directory "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\".
InitializeBuildStatus:
  Creating "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  Checking Build System
  CMake does not need to re-run because C:/LightGBM/R-package/src/build/CMakeFiles/generate.stamp is up-to-date.
FinalizeBuildStatus:
  Deleting file "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
  Touching "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
Done Building Project "C:\LightGBM\R-package\src\build\ZERO_CHECK.vcxproj" (default targets).
PrepareForBuild:
  Creating directory "_lightgbm.dir\Release\".
  Creating directory "C:\LightGBM\R-package\src\Release\".
  Creating directory "_lightgbm.dir\Release\_lightgbm.tlog\".
InitializeBuildStatus:
  Creating "_lightgbm.dir\Release\_lightgbm.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  Building Custom Rule C:/LightGBM/R-package/src/CMakeLists.txt
  CMake does not need to re-run because C:/LightGBM/R-package/src/build/CMakeFiles/generate.stamp is up-to-date.
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\VC\Tools\MSVC\14.11.25301\bin\HostX86\x64\CL.exe /c /I"C:\LightGBM\R-package\src\include" /nologo /W4 /WX- /diagnostics:classic /O2 /Ob2 /Oi /Ot /Oy /GL /D WIN32 /D _WINDOWS /D NDEBUG /D USE_SOCKET /D "CMAKE_INTDIR=\"Release\"" /D _lightgbm_EXPORTS /D _WINDLL /D _MBCS /UNDEBUG /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /openmp /Fo"_lightgbm.dir\Release\\" /Fd"_lightgbm.dir\Release\vc141.pdb" /Gd /TP /errorReport:queue   -pedantic -g -O0 "C:\LightGBM\R-package\src\src\c_api.cpp" "C:\LightGBM\R-package\src\src\lightgbm_R.cpp" "C:\LightGBM\R-package\src\src\application\application.cpp" "C:\LightGBM\R-package\src\src\boosting\boosting.cpp" "C:\LightGBM\R-package\src\src\boosting\gbdt.cpp" "C:\LightGBM\R-package\src\src\boosting\gbdt_prediction.cpp" "C:\LightGBM\R-package\src\src\boosting\prediction_early_stop.cpp" "C:\LightGBM\R-package\src\src\io\bin.cpp" "C:\LightGBM\R-package\src\src\io\config.cpp" "C:\LightGBM\R-package\src\src\io\dataset.cpp" "C:\LightGBM\R-package\src\src\io\dataset_loader.cpp" "C:\LightGBM\R-package\src\src\io\metadata.cpp" "C:\LightGBM\R-package\src\src\io\parser.cpp" "C:\LightGBM\R-package\src\src\io\tree.cpp" "C:\LightGBM\R-package\src\src\metric\dcg_calculator.cpp" "C:\LightGBM\R-package\src\src\metric\metric.cpp" "C:\LightGBM\R-package\src\src\objective\objective_function.cpp" "C:\LightGBM\R-package\src\src\network\linker_topo.cpp" "C:\LightGBM\R-package\src\src\network\linkers_mpi.cpp" "C:\LightGBM\R-package\src\src\network\linkers_socket.cpp" "C:\LightGBM\R-package\src\src\network\network.cpp" "C:\LightGBM\R-package\src\src\treelearner\data_parallel_tree_learner.cpp" "C:\LightGBM\R-package\src\src\treelearner\feature_parallel_tree_learner.cpp" "C:\LightGBM\R-package\src\src\treelearner\gpu_tree_learner.cpp" "C:\LightGBM\R-package\src\src\treelearner\serial_tree_learner.cpp" "C:\LightGBM\R-package\src\src\treelearner\tree_learner.cpp" "C:\LightGBM\R-package\src\src\treelearner\voting_parallel_tree_learner.cpp"
cl : Command line warning D9025: overriding '/DNDEBUG' with '/UNDEBUG' [C:\LightGBM\R-package\src\build\_lightgbm.vcxproj]
  c_api.cpp
cl : Command line warning D9002: ignoring unknown option '-pedantic' [C:\LightGBM\R-package\src\build\_lightgbm.vcxproj]
cl : Command line warning D9002: ignoring unknown option '-g' [C:\LightGBM\R-package\src\build\_lightgbm.vcxproj]
cl : Command line warning D9002: ignoring unknown option '-O0' [C:\LightGBM\R-package\src\build\_lightgbm.vcxproj]
  lightgbm_R.cpp
  application.cpp
  boosting.cpp
  gbdt.cpp
  gbdt_prediction.cpp
  prediction_early_stop.cpp
  bin.cpp
  config.cpp
  dataset.cpp
  dataset_loader.cpp
  metadata.cpp
  parser.cpp
  tree.cpp
  dcg_calculator.cpp
  metric.cpp
  objective_function.cpp
  linker_topo.cpp
  linkers_mpi.cpp
  linkers_socket.cpp
  Compiling...
  network.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
Link:
  C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\VC\Tools\MSVC\14.11.25301\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\LightGBM\R-package\src\Release\lib_lightgbm.dll" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:"C:/LightGBM/R-package/src/Release/lib_lightgbm.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/LightGBM/R-package/src/Release/lib_lightgbm.lib" /MACHINE:X64   /machine:x64 /DLL _lightgbm.dir\Release\c_api.obj
  _lightgbm.dir\Release\lightgbm_R.obj
  _lightgbm.dir\Release\application.obj
  _lightgbm.dir\Release\boosting.obj
  _lightgbm.dir\Release\gbdt.obj
  _lightgbm.dir\Release\gbdt_prediction.obj
  _lightgbm.dir\Release\prediction_early_stop.obj
  _lightgbm.dir\Release\bin.obj
  _lightgbm.dir\Release\config.obj
  _lightgbm.dir\Release\dataset.obj
  _lightgbm.dir\Release\dataset_loader.obj
  _lightgbm.dir\Release\metadata.obj
  _lightgbm.dir\Release\parser.obj
  _lightgbm.dir\Release\tree.obj
  _lightgbm.dir\Release\dcg_calculator.obj
  _lightgbm.dir\Release\metric.obj
  _lightgbm.dir\Release\objective_function.obj
  _lightgbm.dir\Release\linker_topo.obj
  _lightgbm.dir\Release\linkers_mpi.obj
  _lightgbm.dir\Release\linkers_socket.obj
  _lightgbm.dir\Release\network.obj
  _lightgbm.dir\Release\data_parallel_tree_learner.obj
  _lightgbm.dir\Release\feature_parallel_tree_learner.obj
  _lightgbm.dir\Release\gpu_tree_learner.obj
  _lightgbm.dir\Release\serial_tree_learner.obj
  _lightgbm.dir\Release\tree_learner.obj
  _lightgbm.dir\Release\voting_parallel_tree_learner.obj
  c_api.obj : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
     Creating library C:/LightGBM/R-package/src/Release/lib_lightgbm.lib and object C:/LightGBM/R-package/src/Release/lib_lightgbm.exp
  Generating code
  Finished generating code
  _lightgbm.vcxproj -> C:\LightGBM\R-package\src\Release\lib_lightgbm.dll
FinalizeBuildStatus:
  Deleting file "_lightgbm.dir\Release\_lightgbm.tlog\unsuccessfulbuild".
  Touching "_lightgbm.dir\Release\_lightgbm.tlog\_lightgbm.lastbuildstate".
Done Building Project "C:\LightGBM\R-package\src\build\_lightgbm.vcxproj" (default targets).

Build succeeded.

"C:\LightGBM\R-package\src\build\_lightgbm.vcxproj" (default target) (1) ->
(ClCompile target) -> 
  cl : Command line warning D9025: overriding '/DNDEBUG' with '/UNDEBUG' [C:\LightGBM\R-package\src\build\_lightgbm.vcxproj]
  cl : Command line warning D9002: ignoring unknown option '-pedantic' [C:\LightGBM\R-package\src\build\_lightgbm.vcxproj]
  cl : Command line warning D9002: ignoring unknown option '-g' [C:\LightGBM\R-package\src\build\_lightgbm.vcxproj]
  cl : Command line warning D9002: ignoring unknown option '-O0' [C:\LightGBM\R-package\src\build\_lightgbm.vcxproj]

    4 Warning(s)
    0 Error(s)

Time Elapsed 00:00:44.73
Found library file: C:/LightGBM/R-package/src/Release/lib_lightgbm.dll to move to C:/tmp/RtmpG2NQSv/devtools_install_19fa019043416/lightgbm/libs/x64* DONE (lightgbm)
Loading required package: R6
Writing NAMESPACE
Writing predict.lgb.Booster.Rd
Setting env vars -------------------------------------------------------------------------------------------------------------------------------------------
CFLAGS  : -Wall -pedantic
CXXFLAGS: -Wall -pedantic
Building lightgbm ------------------------------------------------------------------------------------------------------------------------------------------
"C:/PROGRA~1/R/R-34~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD build "C:\LightGBM\R-package" --no-resave-data  \
  --no-manual 

* checking for file 'C:\LightGBM\R-package/DESCRIPTION' ... OK
* preparing 'lightgbm':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
Removed empty directory 'lightgbm/src/build/CMakeFiles/3.8.0/CompilerIdC/tmp'
Removed empty directory 'lightgbm/src/build/CMakeFiles/3.8.0/CompilerIdCXX/tmp'
Removed empty directory 'lightgbm/src/build/CMakeFiles/CMakeTmp'
* looking to see if a 'data/datalist' file should be added
* building 'lightgbm_0.2.tar.gz'
Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
  storing paths of more than 100 bytes is not portable:
  'lightgbm/src/build/CMakeFiles/3.8.0/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CompilerIdCXX.lastbuildstate'

Setting env vars -------------------------------------------------------------------------------------------------------------------------------------------
_R_CHECK_CRAN_INCOMING_ : FALSE
_R_CHECK_FORCE_SUGGESTS_: FALSE
Checking lightgbm ------------------------------------------------------------------------------------------------------------------------------------------
"C:/PROGRA~1/R/R-34~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD check "C:\tmp\RtmpG2NQSv/lightgbm_0.2.tar.gz" --as-cran  \
  --timings --no-manual 

* using log directory 'C:/tmp/RtmpG2NQSv/lightgbm.Rcheck'
* using R version 3.4.0 (2017-04-21)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* using options '--no-manual --as-cran'
* checking for file 'lightgbm/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'lightgbm' version '0.2'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... WARNING
Subdirectory 'src' contains:
  CMakeLists.txt
These are unlikely file names for src files.

In addition to the above warning(s), found the following notes:

Found the following apparent object files/libraries:
  src/Release/lib_lightgbm.dll
  src/build/CMakeFiles/3.8.0/CompilerIdC/Debug/CMakeCCompilerId.obj
  src/build/CMakeFiles/3.8.0/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj
  src/build/_lightgbm.dir/Release/application.obj
  src/build/_lightgbm.dir/Release/bin.obj
  src/build/_lightgbm.dir/Release/boosting.obj
  src/build/_lightgbm.dir/Release/c_api.obj
  src/build/_lightgbm.dir/Release/config.obj
  src/build/_lightgbm.dir/Release/data_parallel_tree_learner.obj
  src/build/_lightgbm.dir/Release/dataset.obj
  src/build/_lightgbm.dir/Release/dataset_loader.obj
  src/build/_lightgbm.dir/Release/dcg_calculator.obj
  src/build/_lightgbm.dir/Release/feature_parallel_tree_learner.obj
  src/build/_lightgbm.dir/Release/gbdt.obj
  src/build/_lightgbm.dir/Release/gbdt_prediction.obj
  src/build/_lightgbm.dir/Release/gpu_tree_learner.obj
  src/build/_lightgbm.dir/Release/lightgbm_R.obj
  src/build/_lightgbm.dir/Release/linker_topo.obj
  src/build/_lightgbm.dir/Release/linkers_mpi.obj
  src/build/_lightgbm.dir/Release/linkers_socket.obj
  src/build/_lightgbm.dir/Release/metadata.obj
  src/build/_lightgbm.dir/Release/metric.obj
  src/build/_lightgbm.dir/Release/network.obj
  src/build/_lightgbm.dir/Release/objective_function.obj
  src/build/_lightgbm.dir/Release/parser.obj
  src/build/_lightgbm.dir/Release/prediction_early_stop.obj
  src/build/_lightgbm.dir/Release/serial_tree_learner.obj
  src/build/_lightgbm.dir/Release/tree.obj
  src/build/_lightgbm.dir/Release/tree_learner.obj
  src/build/_lightgbm.dir/Release/voting_parallel_tree_learner.obj
Object files/libraries should not be included in a source package.
* checking if there is a namespace ... OK
* checking for executable files ... WARNING
Found the following executable files:
  src/Release/lib_lightgbm.dll
  src/build/CMakeFiles/3.8.0/CMakeDetermineCompilerABI_C.bin
  src/build/CMakeFiles/3.8.0/CMakeDetermineCompilerABI_CXX.bin
  src/build/CMakeFiles/3.8.0/CompilerIdC/CompilerIdC.exe
  src/build/CMakeFiles/3.8.0/CompilerIdCXX/CompilerIdCXX.exe
  src/build/CMakeFiles/FindOpenMP/ompver_C.bin
  src/build/CMakeFiles/FindOpenMP/ompver_CXX.bin
  src/build/CMakeFiles/feature_tests.bin
Source packages should not contain undeclared executable files.
See section 'Package structure' in the 'Writing R Extensions' manual.
* checking for hidden files and directories ... OK
* checking for portable file names ... NOTE
Found the following non-portable file path:
  lightgbm/src/build/CMakeFiles/3.8.0/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CompilerIdCXX.lastbuildstate

Tarballs are only required to store paths of up to 100 bytes and cannot
store those of more than 256 bytes, with restrictions including to 100
bytes for the final component.
See section 'Package structure' in the 'Writing R Extensions' manual.
* checking whether package 'lightgbm' can be installed ...Warning: running command '"C:/PROGRA~1/R/R-34~1.0/bin/x64/Rcmd.exe" INSTALL -l "C:/tmp/RtmpG2NQSv/lightgbm.Rcheck" --no-html --no-multiarch "C:\tmp\RTMPG2~1\LIGHTG~1.RCH\00_PKG~1\lightgbm"' had status 1
 ERROR
Installation failed.
See 'C:/tmp/RtmpG2NQSv/lightgbm.Rcheck/00install.out' for details.
* DONE

Status: 1 ERROR, 2 WARNINGs, 1 NOTE
See
  'C:/tmp/RtmpG2NQSv/lightgbm.Rcheck/00check.log'
for details.

R CMD check results
1 error  | 2 warnings | 1 note 
checking whether package 'lightgbm' can be installed ... ERROR
Installation failed.
See 'C:/tmp/RtmpG2NQSv/lightgbm.Rcheck/00install.out' for details.

checking if this is a source package ... WARNING
Subdirectory 'src' contains:
  CMakeLists.txt
These are unlikely file names for src files.

In addition to the above warning(s), found the following notes:

Found the following apparent object files/libraries:
  src/Release/lib_lightgbm.dll
  src/build/CMakeFiles/3.8.0/CompilerIdC/Debug/CMakeCCompilerId.obj
... 19 lines ...
  src/build/_lightgbm.dir/Release/metadata.obj
  src/build/_lightgbm.dir/Release/metric.obj
  src/build/_lightgbm.dir/Release/network.obj
  src/build/_lightgbm.dir/Release/objective_function.obj
  src/build/_lightgbm.dir/Release/parser.obj
  src/build/_lightgbm.dir/Release/prediction_early_stop.obj
  src/build/_lightgbm.dir/Release/serial_tree_learner.obj
  src/build/_lightgbm.dir/Release/tree.obj
  src/build/_lightgbm.dir/Release/tree_learner.obj
  src/build/_lightgbm.dir/Release/voting_parallel_tree_learner.obj
Object files/libraries should not be included in a source package.

checking for executable files ... WARNING
Found the following executable files:
  src/Release/lib_lightgbm.dll
  src/build/CMakeFiles/3.8.0/CMakeDetermineCompilerABI_C.bin
  src/build/CMakeFiles/3.8.0/CMakeDetermineCompilerABI_CXX.bin
  src/build/CMakeFiles/3.8.0/CompilerIdC/CompilerIdC.exe
  src/build/CMakeFiles/3.8.0/CompilerIdCXX/CompilerIdCXX.exe
  src/build/CMakeFiles/FindOpenMP/ompver_C.bin
  src/build/CMakeFiles/FindOpenMP/ompver_CXX.bin
  src/build/CMakeFiles/feature_tests.bin
Source packages should not contain undeclared executable files.
See section 'Package structure' in the 'Writing R Extensions' manual.

checking for portable file names ... NOTE
Found the following non-portable file path:
  lightgbm/src/build/CMakeFiles/3.8.0/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CompilerIdCXX.lastbuildstate

Tarballs are only required to store paths of up to 100 bytes and cannot
store those of more than 256 bytes, with restrictions including to 100
bytes for the final component.
See section 'Package structure' in the 'Writing R Extensions' manual.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions