Skip to content

Instantly share code, notes, and snippets.

@szilard
Created June 6, 2024 20:35
Show Gist options
  • Save szilard/a2a233161aa14c7cdb3523f838def709 to your computer and use it in GitHub Desktop.
Save szilard/a2a233161aa14c7cdb3523f838def709 to your computer and use it in GitHub Desktop.
fixing compilation error of lightgbm R package with GPU support
--- build_r.R 2024-06-06 20:27:58.458131823 +0000
+++ build_r.R-fixed 2024-06-06 20:27:54.254093172 +0000
@@ -106,9 +106,9 @@
install_libs_content <- gsub(
pattern = paste0("command_line_args <- NULL")
, replacement = paste0(
- "command_line_args <- c(\'"
- , paste(cmake_args_to_add, collapse = "', '")
- , "')"
+ "command_line_args <- c(\""
+ , paste(cmake_args_to_add, collapse = "\", \"")
+ , "\")"
)
, x = install_libs_content
, fixed = TRUE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment