-
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
CMake __BUILD_FOR_R
fails to find R source files
#6448
Comments
Thanks for reporting this.
If that ever worked before, it was by accident.
Use
Could you clarify what "using ... build_r.R under the VS developer console" means specifically? Does that just mean running
I wonder if this is a difference between the |
By "VS developer console", I mean the start menu entry named "Developer Command Prompt" which is added after installing some msvc tool such as "visual studio build tools", which consists of the regular windows command prompt with all msvc-related environment variables pre-loaded.
From what I can tell the |
I get the same error when using the |
Thanks for that explanation of Visual Studio and for checking the
This one is very subtle/complex, I can explain!
Lines 193 to 197 in f539536
That LightGBM/R-package/src/install.libs.R Line 177 in f539536
That |
The CMake build has an option to build for R which was working some versions ago, at least under windows:
LightGBM/CMakeLists.txt
Line 23 in 6e78e69
Building with this option by calling
cmake
directly with-D__BUILD_FOR_R=1 -DCMAKE_R_VERSION=<version>
without using thebuild_r.R
script is not working anymore, since it assumes that the R package files are under the same directory as the rest of the source files:Building with the latest MSVC using the CI script
build_r.R
under the VS developer console is not working either, since it doesn't recognize all the installed versions - for example, if I use vs2022 in windows 10, I get this error as it tries to look for a windows 8.1 version (note that this doesn't happen when callingcmake
directly):The text was updated successfully, but these errors were encountered: