Skip to content
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 instructions for R are outdated #11143

Closed
david-cortes opened this issue Jan 6, 2025 · 4 comments · Fixed by #11145
Closed

CMake instructions for R are outdated #11143

david-cortes opened this issue Jan 6, 2025 · 4 comments · Fixed by #11145

Comments

@david-cortes
Copy link
Contributor

The docs about building the R package from source with CMake here:
https://xgboost.readthedocs.io/en/latest/build.html#building-r-package-from-source

cmake -B build -S . -G"Visual Studio 16 2019" -A x64 -DUSE_CUDA=ON -DR_LIB=ON -DR_VERSION=4.0.0

.. still have instructions for MSVC, which is not supported anymore as we verified that it doesn't compile ALTREP classes correctly and leads to crashes .

It also has outdated instructions for what to add to path:

C:\rtools40\usr\bin

.. which uses a hard-coded rtools40, but that's not the latest version anymore (newer ones have default paths like rtools43, or perhaps higher for the latest version). Perhaps it could provide a command to obtain that path from R itself it that's possible, and an example for setting the $PATH variable through set for windows.

Further, the second path it suggests to add to $PATH:

C:\rtools40\mingw64\bin

.. is empty under the latest versions of RTools.

Note: I'm not very familiar with CMake or windows, so I'm leaving this issue for the maintainers here.

@trivialfis
Copy link
Member

Let's drop support for that combination on windows and focus on the r default. It's better to have one working method than few methods that may or may not work.

It's a bit sad that we dropped MSVC though, mingw's network module is quite broken the last time I tried. I will want distributed training on Windows.

@trivialfis
Copy link
Member

I will update the doc.

@david-cortes
Copy link
Contributor Author

Let's drop support for that combination on windows and focus on the r default. It's better to have one working method than few methods that may or may not work.

It's a bit sad that we dropped MSVC though, mingw's network module is quite broken the last time I tried. I will want distributed training on Windows.

What about clang? Also, if there's no CMake build for windows, what would be the way to build the GPU-enabled package?

@trivialfis
Copy link
Member

GPU build on Windows requires MSVC or clang (I haven't tested clang), googling shows some people try to use nvcc with mingw, but let's not take that too serious. Cmake build will continue to be supported on Linux.

Clang should work, at least apple clang and clang on Linux are good. I haven't tested it on Windows. I don't use Windows very often, even with Windows, I only use the WSL.

For now, the Windows version of the R package is limited to single node CPU implementation. It's not too bad, people can still use WSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants