-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Hello all,
I basically tried all available instructions on the lightgbm homepage. None seem to work for me. The furthest I get with this instruction here: https://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#build-gpu-version, but using mingw compilers. Trying with VS compilers ran into error, that it couldnt find VS (I have 2019 and 2022 community installed).
Operating system: Windows 10
Architecture: x64
CMake version: 3.23.0
Boost: 1.78.0
MinGW-w64 g++/gcc: (Rev9, Built by MSYS2 project) 11.2.0
To configure cmake i run
cmake -A x64 -DUSE_GPU=1 -DCMAKE_CXX_COMPILER=C:/msys64/mingw64/bin/g++.exe -DCMAKE_C_COMPILER=C:/msys64/mingw64/bin/gcc.exe -DBOOST_ROOT=C:/local/boost_1_78_0 -DBOOST_LIBRARYDIR=C:/local/boost_1_78_0/lib64-msvc-14.3 -DOpenCL_LIBRARY="C:/Program Files (x86)/IntelSWTools/system_studio_2020/OpenCL/sdk/lib/x64/OpenCL.lib" -DOpenCL_INCLUDE_DIR="C:/Program Files (x86)/IntelSWTools/system_studio_2020/OpenCL/sdk/include" ..
Then I execute the final command and get the following error log:
C:\LightGBM\build>cmake --build . --target ALL_BUILD --config Release
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Checking Build System
Building Custom Rule C:/LightGBM/CMakeLists.txt
c_api.cpp
lightgbm_capi_objs.vcxproj -> C:\LightGBM\build\lightgbm_capi_objs.dir\Release\lightgbm_capi_objs.lib
Building Custom Rule C:/LightGBM/CMakeLists.txt
boosting.cpp
gbdt.cpp
gbdt_model_text.cpp
gbdt_prediction.cpp
prediction_early_stop.cpp
bin.cpp
config.cpp
config_auto.cpp
dataset.cpp
dataset_loader.cpp
file_io.cpp
json11.cpp
metadata.cpp
parser.cpp
train_share_states.cpp
tree.cpp
dcg_calculator.cpp
metric.cpp
ifaddrs_patch.cpp
linker_topo.cpp
linkers_mpi.cpp
linkers_socket.cpp
network.cpp
objective_function.cpp
cuda_tree_learner.cpp
data_parallel_tree_learner.cpp
feature_parallel_tree_learner.cpp
gpu_tree_learner.cpp
cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
linear_tree_learner.cpp
serial_tree_learner.cpp
tree_learner.cpp
cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
voting_parallel_tree_learner.cpp
cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
lightgbm_objs.vcxproj -> C:\LightGBM\build\lightgbm_objs.dir\Release\lightgbm_objs.lib
Building Custom Rule C:/LightGBM/CMakeLists.txt
Creating library C:/LightGBM/Release/lib_lightgbm.lib and object C:/LightGBM/Release/lib_lightgbm.exp
gpu_tree_learner.obj : error LNK2019: unresolved external symbol "void __cdecl boost::filesystem::path_traits::convert(
char const *,char const *,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t
> > &,class std::codecvt<wchar_t,char,struct _Mbstatet> const &)" (?convert@path_traits@filesystem@boost@@YAXPEBD0AEAV?
$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEBV?$codecvt@_WDU_Mbstatet@@@5@@Z) referenced in functi
on "public: __cdecl boost::compute::detail::parameter_cache::parameter_cache(class boost::compute::device const &)" (??
0parameter_cache@detail@compute@boost@@QEAA@AEBVdevice@23@@Z) [C:\LightGBM\build\_lightgbm.vcxproj]
gpu_tree_learner.obj : error LNK2019: unresolved external symbol "void __cdecl boost::filesystem::path_traits::convert(
wchar_t const *,wchar_t const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >
&,class std::codecvt<wchar_t,char,struct _Mbstatet> const &)" (?convert@path_traits@filesystem@boost@@YAXPEB_W0AEAV?$b
asic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV?$codecvt@_WDU_Mbstatet@@@5@@Z) referenced in function "p
ublic: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl boost::filesyste
m::path::string(void)const " (?string@path@filesystem@boost@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@
D@2@@std@@XZ) [C:\LightGBM\build\_lightgbm.vcxproj]
gpu_tree_learner.obj : error LNK2019: unresolved external symbol "public: class boost::filesystem::path & __cdecl boost
::filesystem::path::make_preferred(void)" (?make_preferred@path@filesystem@boost@@QEAAAEAV123@XZ) referenced in functio
n "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __cdecl boost::compu
te::detail::path_delim(void)" (?path_delim@detail@compute@boost@@YAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocat
or@D@2@@std@@XZ) [C:\LightGBM\build\_lightgbm.vcxproj]
gpu_tree_learner.obj : error LNK2019: unresolved external symbol "public: static class std::codecvt<wchar_t,char,struct
_Mbstatet> const & __cdecl boost::filesystem::path::codecvt(void)" (?codecvt@path@filesystem@boost@@SAAEBV?$codecvt@_W
DU_Mbstatet@@@std@@XZ) referenced in function "public: __cdecl boost::compute::detail::parameter_cache::parameter_cache
(class boost::compute::device const &)" (??0parameter_cache@detail@compute@boost@@QEAA@AEBVdevice@23@@Z) [C:\LightGBM\b
uild\_lightgbm.vcxproj]
gpu_tree_learner.obj : error LNK2019: unresolved external symbol "class boost::filesystem::file_status __cdecl boost::f
ilesystem::detail::status(class boost::filesystem::path const &,class boost::system::error_code *)" (?status@detail@fil
esystem@boost@@YA?AVfile_status@23@AEBVpath@23@PEAVerror_code@system@3@@Z) referenced in function "public: __cdecl boos
t::compute::detail::parameter_cache::parameter_cache(class boost::compute::device const &)" (??0parameter_cache@detail@
compute@boost@@QEAA@AEBVdevice@23@@Z) [C:\LightGBM\build\_lightgbm.vcxproj]
gpu_tree_learner.obj : error LNK2019: unresolved external symbol "bool __cdecl boost::filesystem::detail::create_direct
ories(class boost::filesystem::path const &,class boost::system::error_code *)" (?create_directories@detail@filesystem@
boost@@YA_NAEBVpath@23@PEAVerror_code@system@3@@Z) referenced in function "class std::basic_string<char,struct std::cha
r_traits<char>,class std::allocator<char> > __cdecl boost::compute::detail::parameter_cache_path(bool)" (?parameter_cac
he_path@detail@compute@boost@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) [C:\LightGBM\buil
d\_lightgbm.vcxproj]
C:\LightGBM\Release\lib_lightgbm.dll : fatal error LNK1120: 6 unresolved externals [C:\LightGBM\build\_lightgbm.vcxproj
]
Building Custom Rule C:/LightGBM/CMakeLists.txt
main.cpp
application.cpp
Creating library C:/LightGBM/Release/lightgbm.lib and object C:/LightGBM/Release/lightgbm.exp
gpu_tree_learner.obj : error LNK2019: unresolved external symbol "void __cdecl boost::filesystem::path_traits::convert(
char const *,char const *,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t
> > &,class std::codecvt<wchar_t,char,struct _Mbstatet> const &)" (?convert@path_traits@filesystem@boost@@YAXPEBD0AEAV?
$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEBV?$codecvt@_WDU_Mbstatet@@@5@@Z) referenced in functi
on "public: __cdecl boost::compute::detail::parameter_cache::parameter_cache(class boost::compute::device const &)" (??
0parameter_cache@detail@compute@boost@@QEAA@AEBVdevice@23@@Z) [C:\LightGBM\build\lightgbm.vcxproj]
gpu_tree_learner.obj : error LNK2019: unresolved external symbol "void __cdecl boost::filesystem::path_traits::convert(
wchar_t const *,wchar_t const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >
&,class std::codecvt<wchar_t,char,struct _Mbstatet> const &)" (?convert@path_traits@filesystem@boost@@YAXPEB_W0AEAV?$b
asic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV?$codecvt@_WDU_Mbstatet@@@5@@Z) referenced in function "p
ublic: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl boost::filesyste
m::path::string(void)const " (?string@path@filesystem@boost@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@
D@2@@std@@XZ) [C:\LightGBM\build\lightgbm.vcxproj]
gpu_tree_learner.obj : error LNK2019: unresolved external symbol "public: class boost::filesystem::path & __cdecl boost
::filesystem::path::make_preferred(void)" (?make_preferred@path@filesystem@boost@@QEAAAEAV123@XZ) referenced in functio
n "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __cdecl boost::compu
te::detail::path_delim(void)" (?path_delim@detail@compute@boost@@YAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocat
or@D@2@@std@@XZ) [C:\LightGBM\build\lightgbm.vcxproj]
gpu_tree_learner.obj : error LNK2019: unresolved external symbol "public: static class std::codecvt<wchar_t,char,struct
_Mbstatet> const & __cdecl boost::filesystem::path::codecvt(void)" (?codecvt@path@filesystem@boost@@SAAEBV?$codecvt@_W
DU_Mbstatet@@@std@@XZ) referenced in function "public: __cdecl boost::compute::detail::parameter_cache::parameter_cache
(class boost::compute::device const &)" (??0parameter_cache@detail@compute@boost@@QEAA@AEBVdevice@23@@Z) [C:\LightGBM\b
uild\lightgbm.vcxproj]
gpu_tree_learner.obj : error LNK2019: unresolved external symbol "class boost::filesystem::file_status __cdecl boost::f
ilesystem::detail::status(class boost::filesystem::path const &,class boost::system::error_code *)" (?status@detail@fil
esystem@boost@@YA?AVfile_status@23@AEBVpath@23@PEAVerror_code@system@3@@Z) referenced in function "public: __cdecl boos
t::compute::detail::parameter_cache::parameter_cache(class boost::compute::device const &)" (??0parameter_cache@detail@
compute@boost@@QEAA@AEBVdevice@23@@Z) [C:\LightGBM\build\lightgbm.vcxproj]
gpu_tree_learner.obj : error LNK2019: unresolved external symbol "bool __cdecl boost::filesystem::detail::create_direct
ories(class boost::filesystem::path const &,class boost::system::error_code *)" (?create_directories@detail@filesystem@
boost@@YA_NAEBVpath@23@PEAVerror_code@system@3@@Z) referenced in function "class std::basic_string<char,struct std::cha
r_traits<char>,class std::allocator<char> > __cdecl boost::compute::detail::parameter_cache_path(bool)" (?parameter_cac
he_path@detail@compute@boost@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) [C:\LightGBM\buil
d\lightgbm.vcxproj]
C:\LightGBM\Release\lightgbm.exe : fatal error LNK1120: 6 unresolved externals [C:\LightGBM\build\lightgbm.vcxproj]
When I follow these instructions https://lightgbm.readthedocs.io/en/latest/GPU-Windows.html, I get in last step:
User@DESKTOP-UT5GOQP MINGW64 /c/github_repos/LightGBM/build (master)
$ alias make="mingw32-make"
User@DESKTOP-UT5GOQP MINGW64 /c/github_repos/LightGBM/build (master)
$ make
[ 2%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/boosting.cpp.obj
[ 5%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/gbdt.cpp.obj
[ 8%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/gbdt_model_text.cpp.obj
[ 10%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/gbdt_prediction.cpp.obj
[ 13%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/prediction_early_stop.cpp.obj
[ 16%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/bin.cpp.obj
[ 18%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/config.cpp.obj
[ 21%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/config_auto.cpp.obj
[ 24%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/dataset.cpp.obj
[ 27%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/dataset_loader.cpp.obj
[ 29%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/file_io.cpp.obj
[ 32%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/json11.cpp.obj
[ 35%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/metadata.cpp.obj
[ 37%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/parser.cpp.obj
[ 40%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/train_share_states.cpp.obj
[ 43%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/io/tree.cpp.obj
[ 45%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/metric/dcg_calculator.cpp.obj
[ 48%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/metric/metric.cpp.obj
[ 51%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/network/ifaddrs_patch.cpp.obj
[ 54%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/network/linker_topo.cpp.obj
[ 56%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/network/linkers_mpi.cpp.obj
[ 59%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/network/linkers_socket.cpp.obj
In file included from C:\github_repos\LightGBM\src\network\linkers.h:22,
from C:\github_repos\LightGBM\src\network\linkers_socket.cpp:20:
C:\github_repos\LightGBM\src\network\socket_wrapper.hpp: In static member function 'static sockaddr_in LightGBM::TcpSocket::GetAddress(const char*, int)':
C:\github_repos\LightGBM\src\network\socket_wrapper.hpp:245:14: error: call of overloaded 'inet_pton(int, const char*&, in_addr*)' is ambiguous
245 | inet_pton(AF_INET, url, &addr.sin_addr);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\github_repos\LightGBM\src\network\linkers.h:22,
from C:\github_repos\LightGBM\src\network\linkers_socket.cpp:20:
C:\github_repos\LightGBM\src\network\socket_wrapper.hpp:68:12: note: candidate: 'int LightGBM::inet_pton(int, const char*, void*)'
68 | inline int inet_pton(int af, const char *src, void *dst) {
| ^~~~~~~~~
In file included from C:\github_repos\LightGBM\src\network\socket_wrapper.hpp:23,
from C:\github_repos\LightGBM\src\network\linkers.h:22,
from C:\github_repos\LightGBM\src\network\linkers_socket.cpp:20:
C:/msys64/mingw64/include/ws2tcpip.h:408:32: note: candidate: 'INT inet_pton(INT, LPCSTR, PVOID)'
408 | WINSOCK_API_LINKAGE INT WSAAPI InetPtonA(INT Family, LPCSTR pStringBuf, PVOID pAddr);
| ^~~~~~~~~
mingw32-make[2]: *** [CMakeFiles\lightgbm_objs.dir\build.make:391: CMakeFiles/lightgbm_objs.dir/src/network/linkers_socket.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:88: CMakeFiles/lightgbm_objs.dir/all] Error 2
mingw32-make: *** [Makefile:135: all] Error 2
Can anybody assist here?
Cheers