[R-SIG-Mac] Problems compiling with R CMD build and devtools::build()

2023-05-17 Thread Jarrett Phillips
Hi All, I'm trying to generate a `tar.gz` file on a Mac for R package submission to CRAN but am having issues. I'm using `devtools`, specifically `build()` and `install()`. My package relies on compiled code via `Rcpp/RcppArmadillo`. build("HACSim_OO") ── R CMD build

Re: [R-SIG-Mac] Problems compiling with R CMD build and devtools::build()

2023-05-17 Thread Sparapani, Rodney via R-SIG-Mac
Hi Jarrett: Do the two directories exist that clang is warning you about? '/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1' '/opt/R/arm64/gfortran/lib' -- Rodney Sparapani, Associate Professor of Biostatistics, He/Him/His Director, Wisconsin Chapter of the American Statistical

Re: [R-SIG-Mac] Problems compiling with R CMD build and devtools::build()

2023-05-17 Thread Jarrett Phillips
Hi Rodney, When I paste the directories into the Terminal, I get no such file or directory: suggesting that they don't exist. Seems like I need to create them (I'm a newbie)? What should be my next steps? Thanks! Cheers, Jarrett On Wed, May 17, 2023 at 1:25 PM Jarrett Phillips

Re: [R-SIG-Mac] Problems compiling with R CMD build and devtools::build()

2023-05-17 Thread Jarrett Phillips
Hi Duncan, I did exactly that, but still got the error above when I try building in both RStudio via devtools::build() and the Terminal via R CMD build. To confirm that the right gfortran successfully installed in the correct location, I did jarrettphillips@Jarretts-MacBook-Pro ~ %

Re: [R-SIG-Mac] Problems compiling with R CMD build and devtools::build()

2023-05-17 Thread Simon Urbanek
Jarrett, Duncan's suggestion was correct, but you are using older R, so I'd recommend simply upgrading R to the latest release. If you want to use old R, you have to install the older Fortran binaries that match your R version, but that's not entirely trivial so it's easier to just upgrade R

Re: [R-SIG-Mac] Problems compiling with R CMD build and devtools::build()

2023-05-17 Thread Duncan Murdoch
I think the simplest solution is to remove the gfortran you installed, and then install it back using the installer on https://mac.r-project.org/tools/ Duncan Murdoch On 17/05/2023 1:26 p.m., Jarrett Phillips wrote: Hi Rodney, When I paste the directories into the Terminal, I get no such

Re: [R-SIG-Mac] Problems compiling with R CMD build and devtools::build()

2023-05-17 Thread Duncan Murdoch
Sorry, I don't have an ARM64 Mac. On my Intel Mac, gfortran is located somewhere else, not in the location you listed. The output corresponding to the line that failed on your system looks like this on mine: clang++ -arch x86_64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names

Re: [R-SIG-Mac] Problems compiling with R CMD build and devtools::build()

2023-05-17 Thread Jarrett Phillips
Thanks Simon, Removing the old gfortran and updating R to the latest version (4.3.0) fixed everything. Now I'm able to build and install without issues. I'll be sure to update R every time a new version is released. Cheers, Jarrett On Wed, May 17, 2023 at 4:59 PM Simon Urbanek wrote: >

Re: [R-SIG-Mac] Problems compiling with R CMD build and devtools::build()

2023-05-17 Thread Prof Brian Ripley
On 17/05/2023 21:59, Simon Urbanek wrote: Jarrett, Duncan's suggestion was correct, but you are using older R, so I'd recommend simply upgrading R to the latest release. If you want to use old R, you have to install the older Fortran binaries that match your R version, but that's not