Skip to content

Conversation

@rcurtin
Copy link
Member

@rcurtin rcurtin commented Feb 22, 2024

CC: @coatless @eddelbuettel @kalibera

This is an experimental PR to try and remove the GCC-specific options from Makevars.win. @kalibera pointed out via email that the R package build fails on Windows when using LLVM, because the track-macro-expansion=0 compiler option isn't available in LLVM. If we wanted, we could make the option conditional, but @kalibera noted that the build was actually faster under gcc without those options. So, let's see what happens here.

Those options were originally added to decrease RAM usage so that the CRAN Windows workers would build successfully (if I remember right), but perhaps they aren't needed anymore.

First we can try this PR here, and if this succeeds, I can port these tiny changes to the existing mlpack CRAN package and see if CRAN still builds them successfully.

The usual disclaimer is that I am not an R expert and will defer to others' input and advice here! 😄

@eddelbuettel
Copy link
Contributor

@kalibera is the man for all things Windows toolchain for R. I usually just nod politely, try to thank sincerely and adopt.

In the past there was exactly and only one build system for R on Windows. gcc. In one version. Possibly for 32 and 64 bit. That changed but it remained one (fixed) gcc. This is now changing as we get to Windows on different cpus too and that (IIRC) opens the door for clang and hence some 'variability' in the toolchain.

Copy link
Contributor

@coatless coatless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rcurtin this should be fine. If not, I'll work on it to bring it back into compliance.

As @eddelbuettel said, there has been quite a few changes to build machines at CRAN since mlpack for R launched back in the day. Plus, if @kalibera is urging or requesting the change, it's likely a good idea to adopt in a proactive manner vs. if a CRAN maintainer says hello 😉

@coatless coatless changed the title Remove extra gcc-specific options from Makevars.win [R] Remove extra gcc-specific options from Makevars.win Feb 23, 2024
@coatless coatless merged commit d8c7fc7 into mlpack:master Feb 23, 2024
@kalibera
Copy link

Yes, it would be nice if you could release to CRAN asap, so that the number of packages with pending changes doesn't grow too large (there are over 20K of packages, with complicated dependencies, etc). If this reveals problems with memory usage during compilation on Winbuilder, we can move from there (and of course feel free to remind in that case that I asked for this change): either conditionally use these options, or restructure the code, or use pre-compiled headers, etc.

@rcurtin rcurtin deleted the r-win-makevars branch February 24, 2024 16:37
This was referenced May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants