Set up a symlink to override xcode's clang with a valid version of gcc. If this doesn't work, first try following these instructions.
Usage
setup_gcc(
version = "latest",
link = "/usr/local/bin/gcc",
sudo = FALSE,
pass = Sys.getenv("PASS"),
overwrite = TRUE,
verbose = TRUE
)Arguments
- version
gcc version to use (e.g. 7,8,9,10). If
"latest", the latest version of gcc currently installed on your machine will be used.- link
The path or pathname of the link to be created. If
"."(orNULL), it is inferred from thetargetargument, if possible.- sudo
Whether to run commands in
sudomode.- pass
Admin password.
- overwrite
If
TRUE, an existing link file is overwritten, otherwise not.- verbose
Print messages.
Examples
if(interactive()) gcc_df <- setup_gcc(overwrite=FALSE)