Laurae2 / Laurae

Advanced High Performance Data Science Toolbox for R by Laurae
204 stars 50 forks source link

lightgbm installation problems #8

Closed feng-1985 closed 7 years ago

feng-1985 commented 7 years ago

I have follow you instructions to install the lightgbm, and generate the exe and DLL success. What's next? I refer to the instructions "

If you are using a precompiled dll/lib locally, you can move the dll/lib into LightGBM root folder, modify LightGBM/R-package/src/install.libs.R's 2nd line (change use_precompile <- FALSE to use_precompile <- TRUE), and install R-package as usual ."

But, it failed.

install("C:\Users\szkxpc056\LightGBM\R-package") Installing lightgbm "D:/software/R-33~1.1/bin/x64/R" --no-site-file --no-environ \ --no-save --no-restore --quiet CMD INSTALL \ "C:/Users/szkxpc056/LightGBM/R-package" \ --library="D:/software/R-3.3.1/library" --install-tests installing source package 'lightgbm' ... ** libs *** arch - i386 D:/software/Rtools/mingw_32/bin/g++ -std=c++0x -I"D:/software/R-33~1.1/include" -DNDEBUG -I../..//include -I -I -I../compute/include -DUSE_SOCKET -DUSE_GPU=1 -I"d:/Compiler/gcc-4.9.3/local330/include" -fopenmp -pthread -std=c++11 -O2 -Wall -mtune=core2 -c lightgbm-all.cpp -o lightgbm-all.o In file included from ../../src/treelearner/parallel_tree_learner.h:7:0, from ../../src/treelearner/data_parallel_tree_learner.cpp:1, from lightgbm-all.cpp:30: ../../src/treelearner/serial_tree_learner.h:24:45: fatal error: boost/align/aligned_allocator.hpp: No such file or directory

include <boost/align/aligned_allocator.hpp>

compilation terminated. make: *** [lightgbm-all.o] Error 1 Warning: 运行命令'make -f "Makevars.win" -f "D:/software/R-33~1.1/etc/i386/Makeconf" -f "D:/software/R-33~1.1/share/make/winshlib.mk" CXX='$(CXX1X) $(CXX1XSTD)' CXXFLAGS='$(CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)' SHLIB="lightgbm.dll" '的状态是2 ERROR: compilation failed for package 'lightgbm' removing 'D:/software/R-3.3.1/library/lightgbm' Error: Command failed (1)

sessionInfo() R version 3.3.1 (2016-06-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 locale: [1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936 [2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936
[3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936 [4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_People's Republic of China.936
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] devtools_1.13.2 loaded via a namespace (and not attached): [1] httr_1.2.1 R6_2.2.1 tools_3.3.1 withr_1.0.2 curl_2.6 memoise_1.1.0 [7] git2r_0.18.0 digest_0.6.12

Laurae2 commented 7 years ago

To use LightGBM on my package, you will need to compile LightGBM for CLI from pull request 33. It is not recommended since my wrapper is deprecated and not guaranteed working for more recent CLI LightGBM.

feng-1985 commented 7 years ago

Is there any suggestion to install lightgbm for R?

Laurae2 commented 7 years ago

@bifeng Refer to https://github.com/Microsoft/LightGBM/tree/master/R-package