-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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], [GPU], Windows10, install error #6537
Labels
Comments
Thanks for using LightGBM. I'm not sure why a mix of Rtools and MSVC headers are being used. You may be able to get around this by forcing the use of the MSYS2 toolchain bundled with Rtools. Rscript build_r.R --gpu --use-msys2 It seems that #6599 describes the same issue. There's already significant discussion over there, so I'm going to close this. Let's keep the conversation over there. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I followed the "Windows Preparation" instructions. However, I got lots of errors like:
Rscript build_r.R --use-gpu
.......
D:\rtools44\x86_64-w64-mingw32.static.posix\include\math.h(209,13): error C2146: syntax error: missing ';' before identifier 'volatile' [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/metric/dcg_calculator.cpp')
D:\Visual Studio\VC\Tools\MSVC\14.38.33128\include\cstdlib(59,13): error C2873: 'strtod': symbol cannot be used in a using-declaration [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/dataset_loader.cpp')
D:\rtools44\x86_64-w64-mingw32.static.posix\include\math.h(220,35): error C2143: syntax error: missing ')' before ':' [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/json11.cpp')
D:\Visual Studio\VC\Tools\MSVC\14.38.33128\include\cstdlib(38,25): error C2039: 'abort': is not a member of '`global namespace'' [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/metadata.cpp')
D:\rtools44\x86_64-w64-mingw32.static.posix\include\stdio.h(538,37): error C1003: error count exceeds 100; stopping compilation [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/bin.cpp')
D:\rtools44\x86_64-w64-mingw32.static.posix\include\float.h(290,14): error C2059: syntax error: '__declspec(nothrow)' [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/config_auto.cpp')
D:\rtools44\x86_64-w64-mingw32.static.posix\include\stdio.h(205,88): error C2144: syntax error: 'int' should be preceded by ';' [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/config.cpp')
D:\rtools44\x86_64-w64-mingw32.static.posix\include\math.h(718,22): error C2169: 'expf': intrinsic function, cannot be defined [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/parser.cpp')
D:\rtools44\x86_64-w64-mingw32.static.posix\include\stdio.h(536,88): error C2061: syntax error: identifier '__builtin_va_list' [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/dataset.cpp')
D:\rtools44\x86_64-w64-mingw32.static.posix\include\math.h(688,22): error C2169: 'coshf': intrinsic function, cannot be defined [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/tree.cpp')
D:\rtools44\x86_64-w64-mingw32.static.posix\include\math.h(209,35): error C2143: syntax error: missing ')' before ':' [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/metric/dcg_calculator.cpp')
D:\Visual Studio\VC\Tools\MSVC\14.38.33128\include\cstdlib(38,13): error C2873: 'abort': symbol cannot be used in a using-declaration [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/metadata.cpp')
D:\Visual Studio\VC\Tools\MSVC\14.38.33128\include\cstdlib(73,25): error C2039: 'strtof': is not a member of '`global namespace'' [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/dataset_loader.cpp')
D:\rtools44\x86_64-w64-mingw32.static.posix\include\math.h(220,13): error C3861: 'volatile': identifier not found [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/json11.cpp')
D:\rtools44\x86_64-w64-mingw32.static.posix\include\math.h(1157,7): error C2065: 'asm': undeclared identifier [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/train_share_states.cpp')
D:\Visual Studio\VC\Tools\MSVC\14.38.33128\include\cstdint(85,17): error C2874: using-declaration causes a multiple declaration of 'uintptr_t' [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/file_io.cpp')
D:\rtools44\x86_64-w64-mingw32.static.posix\include\corecrt.h(75,44):
see declaration of 'uintptr_t'
D:\rtools44\x86_64-w64-mingw32.static.posix\include\float.h(292,14): error C2059: syntax error: '__declspec(nothrow)' [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/config_auto.cpp')
D:\Visual Studio\VC\Tools\MSVC\14.38.33128\include\cstdlib(73,13): error C2873: 'strtof': symbol cannot be used in a using-declaration [C:\Users\dirac\AppData\Local\Temp\RtmpA5dk02\Rbuildd5247652687\lightgbm\src\build\lightgbm_objs.vcxproj]
(compiling source file '../src/io/dataset_loader.cpp')
.......
Error in .run_shell_command(build_cmd, build_args) :
Command failed with exit code: 1
-----------------------------------
ERROR: package installation failed
Error in .run_shell_command("R", r_build_args) :
Command failed with exit code: 1
Execution halted
Environment info
win10
Visual Studio 2022
NVIDIA 3090, cuda_12.5.1_555.85_windows
boost_1_85_0\lib64-msvc-14.3
rtools44
R4.4.1
LightGBM version or commit hash:
4.4.0.99
Command(s) you used to install LightGBM
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
Rscript build_r.R --use-gpu
The text was updated successfully, but these errors were encountered: