[R-pkg-devel] Problems with devtools::build() in R
Simon Urbanek
@|mon@urb@nek @end|ng |rom R-project@org
Thu May 18 01:49:37 CEST 2023
This thread went way off the rails and was cross-posted so the solution is on R-SIG-Mac.
It was simply wrong Fortran with wrong R - installing latest R and Fortran (from CRAN or https://mac.r-project.org/tools/) is the easiest way to solve the problem.
Note that R binaries and tools go together so if in doubt, just go to CRAN and follow the instructions.
Cheers,
Simon
> On 18/05/2023, at 3:41 AM, Ivan Krylov <krylov.r00t using gmail.com> wrote:
>
> В Wed, 17 May 2023 11:05:46 -0400
> Jarrett Phillips <phillipsjarrett1 using gmail.com> пишет:
>
>> `which gfortran` returns
>>
>> /usr/local/bin/gfortran
>
> I think you ran the other gfortran. Is there a gfortran installation in
> /opt/gfortran?
>
>> libraries:
>> =/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/:/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/../../../../aarch64-apple-darwin22/lib/aarch64-apple-darwin22/12.2.0/:/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/../../../../aarch64-apple-darwin22/lib/:/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/../../../aarch64-apple-darwin22/12.2.0/:/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/../../../
>
>> "/Library/Frameworks/R.framework/Resources/etc/Makeconf"
>
> If you open this file, the flags
> -L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1
> -L/opt/R/arm64/gfortran/lib must be present in there somewhere. (Or
> maybe it's in ~/.R/Makevars, but you would've remembered creating it
> yourself.)
>
> What if you replace the paths with the ones returned by gfortran,
> namely, -L/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0
> -L/usr/local/gfortran/lib? (Even better, with the paths returned by
> /opt/gfortran/bin/gfortran -print-search-dirs, assuming this command
> works.) While you're at it, fix other Fortran-related paths like the
> path to the compiler. I still suspect you may end up having problems
> because your R was built with a different version of gfortran, but I
> don't know a better way of moving forward.
>
> I'm going on general POSIX-like knowledge since I lack a Mac to test
> things on. Maybe R-SIG-Mac will have better advice for you.
>
> --
> Best regards,
> Ivan
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
More information about the R-package-devel
mailing list