Re: [R-SIG-Mac] gfortran: command not found

2023-07-06 Thread Simon Urbanek



> On 7/07/2023, at 10:15 AM, Spencer Graves  wrote:
> 
> Hi, Simon:
> 
> 
> Thanks for this.  I have more questions:
> 
> 
> On 7/6/23 4:52 PM, Simon Urbanek wrote:
>> In the shell:
>> PATH=/opt/gfortran/bin:$PATH R CMD INSTALL ...
> 
> 
> Please excuse my ignorance, but I don't understand this.  I 
> previously tried "PATH=/bin:/sbin:/user/bin:/user/sbin:/system/Library/ 
> export PATH", recommended on a page associated with support.apple.com, as 
> mentioned below.  That did not seem to work for me.
> 

That one sets the specified fixed path and then exports it. Setting a fixed 
PATH by hand is typically a bad idea since it removes all existing entries - 
and the one you listed didn't even have gfortran on it. Exporting is another 
alternative if you want to set the PATH for all subsequent commands.

The line I sent just prepends the /opt/gfortran/bin to the PATH for the one R 
CMD command, but doesn't affect anything else. I would recommend reading a 
basic tutorial on unix shell if you really want to know more (actually a good 
idea if you ever want to use the Terminal and not kill your machine).


> How is this different?  What did I do wrong before that this would 
> fix?  [Or feel free to ignore this question:  My immediate problem seems to 
> be fixed, and I'm not eager to do more experimentation with this now ;-]
> 
>> in R if using install.packages()
>> Sys.setenv(PATH=paste0("/opt/gfortran/bin:", Sys.getenv("PATH")))
> 
> 
> If I set this in RStudio, will it affect what I do in "Terminal" on 
> my Mac and vice versa?
> 

No, it is only valid for the current R session (and I don't know about RStudio 
- it's not R so sometimes R rules don't apply), that's why I said it's for the 
case where you run install.packages() in the R session.


Note that another alternative is to simply symlink gfortran to your 
/usr/local/bin since that is on the PATH on macOS by default, i.e., you only 
need to run this in the Terminal once (requires admin access):

sudo ln -sfn /opt/gfortran/bin/gfortran /usr/local/bin/gfortran

Cheers,
Simon




> 
> This looks like a potentially similar thing to do from what I did. Is 
> the effect of this different?  If so, how? [Again, please feel free to ignore 
> this question.  I'm not eager to practice my "do-it-myself lobotomy" skills 
> ;-]
> 
> 
> Thanks,
> Spencer Graves>
>>> On Jul 7, 2023, at 5:58 AM, Spencer Graves  
>>> wrote:
>>> 
>>> 1.  I need to apologize to Simon:  I failed to see his reply to the 
>>> original post.  Then I found the instructions and installed 
>>> gfortran-12.2-universal.pkg, as indicated there, but it still didn't work.
>>> 
>>> 
>>> 2.  I'm not finding clear instructions on how to update the path on macOS 
>>> 11.7.8, which is the latest version available for my 2014 MacBook Pro with 
>>> a 2.8 GHz Quad-Core Intel Core i7.  I found several pages with differing 
>>> instructions.  I found one in "support.apple.com" that recommended 
>>> something that didn't work.[2]
>>> 
>>> 
>>>   Further suggestions?
>>> 
>>> 
>>>   Thanks again very much.
>>>   Spencer Graves
>>> 
>>> 
>>> [2] "support.apple.com" recommended 
>>> "PATH=/bin:/sbin:/user/bin:/user/sbin:/system/Library/ export PATH", then 
>>> "env".  I did "env" to get the current path, than appended 
>>> ":/opt/gfortran/bin" to that and executed the revised 
>>> "PATH=...:/opt/gfortran/bin export PATH".  However, when I checked with 
>>> "env" again, the change was not displayed.  I rebooted with the same result.
>>> 
>>> 
>>> https://support.apple.com/guide/terminal/use-environment-variables-apd382cc5fa-4f58-4449-b20a-41c53c006f8f/mac
>>> 
>>> 
>>> On 7/6/23 11:01 AM, Simon Urbanek wrote:
 AFACT he didn't say so, there was no response, just double-posting of the 
 same question after is was answered.
 The installer says:
 The resulting compiler will live in /opt/gfortran and can be called with
 /opt/gfortran/bin/gfortran
 so it's advisable to have /opt/gfortran/bin on the PATH.
 (Side note: the arm64 build of R uses the full path, but some people have 
 been objecting to that since they wanted to use other compilers for the 
 legacy Intel builds, but as I suspected that causes other issues, so I'll 
 change that for the next release).
 Cheers,
 Simon
> On Jul 6, 2023, at 11:45 PM, Peter Dalgaard  > wrote:
> 
> AFAICT, Spencer followed the implied instructions and it still didn't 
> work.
> 
> There may also be a PATH issue when upgrading to 4.3.x, /usr/local -> 
> /opt/R/ Does gfortran 12.2 install to /opt/R/.../bin ?
> 
> -pd
> 
>> On 6 Jul 2023, at 07:42 , Simon Urbanek > > wrote:
>> 
>> Already answered to you and on R-pkg-devel [9 mins after you posted 
>> there - now more than 5h ago...]:
>> 
>> To quote from the page you downloaded R 

Re: [R-SIG-Mac] gfortran: command not found

2023-07-06 Thread Spencer Graves

Hi, Simon:


  Thanks for this.  I have more questions:


On 7/6/23 4:52 PM, Simon Urbanek wrote:

In the shell:

PATH=/opt/gfortran/bin:$PATH R CMD INSTALL ...



	  Please excuse my ignorance, but I don't understand this.  I 
previously tried "PATH=/bin:/sbin:/user/bin:/user/sbin:/system/Library/ 
export PATH", recommended on a page associated with support.apple.com, 
as mentioned below.  That did not seem to work for me.



	  How is this different?  What did I do wrong before that this would 
fix?  [Or feel free to ignore this question:  My immediate problem seems 
to be fixed, and I'm not eager to do more experimentation with this now 
;-]




in R if using install.packages()

Sys.setenv(PATH=paste0("/opt/gfortran/bin:", Sys.getenv("PATH")))



	  If I set this in RStudio, will it affect what I do in "Terminal" on 
my Mac and vice versa?



	  This looks like a potentially similar thing to do from what I did. 
Is the effect of this different?  If so, how? [Again, please feel free 
to ignore this question.  I'm not eager to practice my "do-it-myself 
lobotomy" skills ;-]



  Thanks,
  Spencer Graves>



On Jul 7, 2023, at 5:58 AM, Spencer Graves  wrote:

1.  I need to apologize to Simon:  I failed to see his reply to the original 
post.  Then I found the instructions and installed gfortran-12.2-universal.pkg, 
as indicated there, but it still didn't work.


2.  I'm not finding clear instructions on how to update the path on macOS 11.7.8, which 
is the latest version available for my 2014 MacBook Pro with a 2.8 GHz Quad-Core Intel 
Core i7.  I found several pages with differing instructions.  I found one in 
"support.apple.com" that recommended something that didn't work.[2]


  Further suggestions?


  Thanks again very much.
  Spencer Graves


[2] "support.apple.com" recommended "PATH=/bin:/sbin:/user/bin:/user/sbin:/system/Library/ export PATH", then "env".  I 
did "env" to get the current path, than appended ":/opt/gfortran/bin" to that and executed the revised 
"PATH=...:/opt/gfortran/bin export PATH".  However, when I checked with "env" again, the change was not displayed.  I rebooted 
with the same result.


https://support.apple.com/guide/terminal/use-environment-variables-apd382cc5fa-4f58-4449-b20a-41c53c006f8f/mac


On 7/6/23 11:01 AM, Simon Urbanek wrote:

AFACT he didn't say so, there was no response, just double-posting of the same 
question after is was answered.
The installer says:
The resulting compiler will live in /opt/gfortran and can be called with
/opt/gfortran/bin/gfortran
so it's advisable to have /opt/gfortran/bin on the PATH.
(Side note: the arm64 build of R uses the full path, but some people have been 
objecting to that since they wanted to use other compilers for the legacy Intel 
builds, but as I suspected that causes other issues, so I'll change that for 
the next release).
Cheers,
Simon

On Jul 6, 2023, at 11:45 PM, Peter Dalgaard mailto:pda...@gmail.com>> wrote:

AFAICT, Spencer followed the implied instructions and it still didn't work.

There may also be a PATH issue when upgrading to 4.3.x, /usr/local -> 
/opt/R/ Does gfortran 12.2 install to /opt/R/.../bin ?

-pd


On 6 Jul 2023, at 07:42 , Simon Urbanek mailto:simon.urba...@r-project.org>> wrote:

Already answered to you and on R-pkg-devel [9 mins after you posted there - now 
more than 5h ago...]:

To quote from the page you downloaded R from:

This release uses Xcode 14.2/14.3 and GNU Fortran 12.2. If you wish to compile R packages which 
contain Fortran code, you may need to download the corresponding GNU Fortran compiler from 
https://mac.R-project.org/tools  
>.




On Jul 6, 2023, at 5:16 PM, Spencer Graves mailto:spencer.gra...@prodsyse.com>> wrote:

Hello, All:


  "R CMD check KFAS" under macOS 11.7.8 (the latest version that will run on my aging 
Mac) complains "gfortran: command not found".


  I just upgraded to R 4.3.1 and installed "gfortran-12.2-universal.pkg" per 
"https://cran.r-project.org/bin/macosx/tools/ 
".  I expected this to solve the problem.  It 
didn't.


  Suggestions?
  Thanks,
  Spencer Graves


p.s.  This is my fork of KFAS, available at "https://github.com/sbgraves237/KFAS 
".  "sessionInfo()" appears below.


##


sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.7.8

Matrix products: default
BLAS: 
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: 
/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;
  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Chicago
tzcode source: internal

attached base packages:

Re: [R-SIG-Mac] gfortran: command not found

2023-07-06 Thread Simon Urbanek
In the shell:

PATH=/opt/gfortran/bin:$PATH R CMD INSTALL ...

in R if using install.packages()

Sys.setenv(PATH=paste0("/opt/gfortran/bin:", Sys.getenv("PATH")))



> On Jul 7, 2023, at 5:58 AM, Spencer Graves  
> wrote:
> 
> 1.  I need to apologize to Simon:  I failed to see his reply to the original 
> post.  Then I found the instructions and installed 
> gfortran-12.2-universal.pkg, as indicated there, but it still didn't work.
> 
> 
> 2.  I'm not finding clear instructions on how to update the path on macOS 
> 11.7.8, which is the latest version available for my 2014 MacBook Pro with a 
> 2.8 GHz Quad-Core Intel Core i7.  I found several pages with differing 
> instructions.  I found one in "support.apple.com" that recommended something 
> that didn't work.[2]
> 
> 
> Further suggestions?
>   
> 
> Thanks again very much.
> Spencer Graves
> 
> 
> [2] "support.apple.com" recommended 
> "PATH=/bin:/sbin:/user/bin:/user/sbin:/system/Library/ export PATH", then 
> "env".  I did "env" to get the current path, than appended 
> ":/opt/gfortran/bin" to that and executed the revised 
> "PATH=...:/opt/gfortran/bin export PATH".  However, when I checked with "env" 
> again, the change was not displayed.  I rebooted with the same result.
> 
> 
> https://support.apple.com/guide/terminal/use-environment-variables-apd382cc5fa-4f58-4449-b20a-41c53c006f8f/mac
> 
> 
> On 7/6/23 11:01 AM, Simon Urbanek wrote:
>> AFACT he didn't say so, there was no response, just double-posting of the 
>> same question after is was answered.
>> The installer says:
>> The resulting compiler will live in /opt/gfortran and can be called with
>> /opt/gfortran/bin/gfortran
>> so it's advisable to have /opt/gfortran/bin on the PATH.
>> (Side note: the arm64 build of R uses the full path, but some people have 
>> been objecting to that since they wanted to use other compilers for the 
>> legacy Intel builds, but as I suspected that causes other issues, so I'll 
>> change that for the next release).
>> Cheers,
>> Simon
>>> On Jul 6, 2023, at 11:45 PM, Peter Dalgaard >> > wrote:
>>> 
>>> AFAICT, Spencer followed the implied instructions and it still didn't work.
>>> 
>>> There may also be a PATH issue when upgrading to 4.3.x, /usr/local -> 
>>> /opt/R/ Does gfortran 12.2 install to /opt/R/.../bin ?
>>> 
>>> -pd
>>> 
 On 6 Jul 2023, at 07:42 , Simon Urbanek >>> > wrote:
 
 Already answered to you and on R-pkg-devel [9 mins after you posted there 
 - now more than 5h ago...]:
 
 To quote from the page you downloaded R from:
 
 This release uses Xcode 14.2/14.3 and GNU Fortran 12.2. If you wish to 
 compile R packages which contain Fortran code, you may need to download 
 the corresponding GNU Fortran compiler from 
 https://mac.R-project.org/tools  
 >.
 
 
 
> On Jul 6, 2023, at 5:16 PM, Spencer Graves  > wrote:
> 
> Hello, All:
> 
> 
>  "R CMD check KFAS" under macOS 11.7.8 (the latest version that will run 
> on my aging Mac) complains "gfortran: command not found".
> 
> 
>  I just upgraded to R 4.3.1 and installed "gfortran-12.2-universal.pkg" 
> per "https://cran.r-project.org/bin/macosx/tools/ 
> ".  I expected this to 
> solve the problem.  It didn't.
> 
> 
>  Suggestions?
>  Thanks,
>  Spencer Graves
> 
> 
> p.s.  This is my fork of KFAS, available at 
> "https://github.com/sbgraves237/KFAS 
> ".  "sessionInfo()" appears below.
> 
> 
> ##
> 
> 
> sessionInfo()
> R version 4.3.1 (2023-06-16)
> Platform: x86_64-apple-darwin20 (64-bit)
> Running under: macOS Big Sur 11.7.8
> 
> Matrix products: default
> BLAS: 
> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
> LAPACK: 
> /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;
>   LAPACK version 3.11.0
> 
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> 
> time zone: America/Chicago
> tzcode source: internal
> 
> attached base packages:
> [1] stats graphics  grDevices utils datasets  methods   base
> 
> loaded via a namespace (and not attached):
> [1] compiler_4.3.1  R6_2.5.1magrittr_2.0.3  cli_3.6.1
> [5] tools_4.3.1 glue_1.6.2  rstudioapi_0.14 roxygen2_7.2.3
> [9] xml2_1.3.4  vctrs_0.6.2 stringi_1.7.12  knitr_1.42
> [13] xfun_0.39   stringr_1.5.0   lifecycle_1.0.3 rlang_1.1.1
> [17] purrr_1.0.1
>> 
> 
> 

Re: [R-SIG-Mac] gfortran: command not found

2023-07-06 Thread Spencer Graves

Hi, Peter et al.:


On 7/6/23 1:15 PM, Peter Dalgaard wrote:

I think the cleanest way is to diddle the /etc/paths.d structure. I have

PeterDaardsiMac:R pd$ ls /etc/paths.d
40-XQuartz  R   TeX clang8  gfortran
PeterDaardsiMac:R pd$ cat /etc/paths.d/gfortran
/usr/local/gfortran/bin
PeterDaardsiMac:R pd$ cat /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

and the latter would want to be /opt/gfortran/bin for 12.2 (I still have 8.2 
for now).



	  I could not figure out how "to diddle the /etc/paths.d structure", 
but I was successful by appending "/opt/gfortran/bin" to etc/paths using 
"sudo vi etc/paths".  It didn't work immediately nor after I exited and 
restarted Terminal, but it did after I rebooted.



	  There's till a lot I do not understand about this. 
readLines('/etc/paths') now returns a character vector of length 8, with 
the last string being the one I appended. Meanwhile, "echo $PATH" at a 
prompt returned a path with 13 components with "/opt/gfortran/bin" being 
number 11, and 'Sys.getenv("PATH")' returned a path with 18 components, 
with "/opt/gfortran/bin" being number 12.



  Anyway, thanks again to Simon and Peter.


  Best Wishes,
  Spencer Graves



Two things to note:

1. The directories in paths.d/* are added to those in /etc/paths in 
alphabetical order, so careful with older versions in /usr/local/bin.

2. You (probably) need to logout and back in for the changes to take effect in 
your Terminal windows.

Alternatively, you can twiddle the shell startup files (~/.profile /etc/profile 
/etc/bashrc ) directly. The trouble I have with that, is that I never feel 
sure that I am doing it in the right place.

- Peter D.


On 6 Jul 2023, at 19:58 , Spencer Graves  wrote:

1.  I need to apologize to Simon:  I failed to see his reply to the original 
post.  Then I found the instructions and installed gfortran-12.2-universal.pkg, 
as indicated there, but it still didn't work.


2.  I'm not finding clear instructions on how to update the path on macOS 11.7.8, which 
is the latest version available for my 2014 MacBook Pro with a 2.8 GHz Quad-Core Intel 
Core i7.  I found several pages with differing instructions.  I found one in 
"support.apple.com" that recommended something that didn't work.[2]


  Further suggestions?


  Thanks again very much.
  Spencer Graves


[2] "support.apple.com" recommended "PATH=/bin:/sbin:/user/bin:/user/sbin:/system/Library/ export PATH", then "env".  I 
did "env" to get the current path, than appended ":/opt/gfortran/bin" to that and executed the revised 
"PATH=...:/opt/gfortran/bin export PATH".  However, when I checked with "env" again, the change was not displayed.  I rebooted 
with the same result.


https://support.apple.com/guide/terminal/use-environment-variables-apd382cc5fa-4f58-4449-b20a-41c53c006f8f/mac


On 7/6/23 11:01 AM, Simon Urbanek wrote:

AFACT he didn't say so, there was no response, just double-posting of the same 
question after is was answered.
The installer says:
The resulting compiler will live in /opt/gfortran and can be called with
/opt/gfortran/bin/gfortran
so it's advisable to have /opt/gfortran/bin on the PATH.
(Side note: the arm64 build of R uses the full path, but some people have been 
objecting to that since they wanted to use other compilers for the legacy Intel 
builds, but as I suspected that causes other issues, so I'll change that for 
the next release).
Cheers,
Simon

On Jul 6, 2023, at 11:45 PM, Peter Dalgaard mailto:pda...@gmail.com>> wrote:

AFAICT, Spencer followed the implied instructions and it still didn't work.

There may also be a PATH issue when upgrading to 4.3.x, /usr/local -> 
/opt/R/ Does gfortran 12.2 install to /opt/R/.../bin ?

-pd


On 6 Jul 2023, at 07:42 , Simon Urbanek mailto:simon.urba...@r-project.org>> wrote:

Already answered to you and on R-pkg-devel [9 mins after you posted there - now 
more than 5h ago...]:

To quote from the page you downloaded R from:

This release uses Xcode 14.2/14.3 and GNU Fortran 12.2. If you wish to compile R packages which 
contain Fortran code, you may need to download the corresponding GNU Fortran compiler from 
https://mac.R-project.org/tools  
>.




On Jul 6, 2023, at 5:16 PM, Spencer Graves mailto:spencer.gra...@prodsyse.com>> wrote:

Hello, All:


  "R CMD check KFAS" under macOS 11.7.8 (the latest version that will run on my aging 
Mac) complains "gfortran: command not found".


  I just upgraded to R 4.3.1 and installed "gfortran-12.2-universal.pkg" per 
"https://cran.r-project.org/bin/macosx/tools/".
  I expected this to solve the problem.  It didn't.


  Suggestions?
  Thanks,
  Spencer Graves


p.s.  This is my fork of KFAS, available at "https://github.com/sbgraves237/KFAS 

Re: [R-SIG-Mac] gfortran: command not found

2023-07-06 Thread Peter Dalgaard
I think the cleanest way is to diddle the /etc/paths.d structure. I have

PeterDaardsiMac:R pd$ ls /etc/paths.d
40-XQuartz  R   TeX clang8  gfortran
PeterDaardsiMac:R pd$ cat /etc/paths.d/gfortran 
/usr/local/gfortran/bin
PeterDaardsiMac:R pd$ cat /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

and the latter would want to be /opt/gfortran/bin for 12.2 (I still have 8.2 
for now).

Two things to note:

1. The directories in paths.d/* are added to those in /etc/paths in 
alphabetical order, so careful with older versions in /usr/local/bin.

2. You (probably) need to logout and back in for the changes to take effect in 
your Terminal windows.

Alternatively, you can twiddle the shell startup files (~/.profile /etc/profile 
/etc/bashrc ) directly. The trouble I have with that, is that I never feel 
sure that I am doing it in the right place.

- Peter D.

> On 6 Jul 2023, at 19:58 , Spencer Graves  wrote:
> 
> 1.  I need to apologize to Simon:  I failed to see his reply to the original 
> post.  Then I found the instructions and installed 
> gfortran-12.2-universal.pkg, as indicated there, but it still didn't work.
> 
> 
> 2.  I'm not finding clear instructions on how to update the path on macOS 
> 11.7.8, which is the latest version available for my 2014 MacBook Pro with a 
> 2.8 GHz Quad-Core Intel Core i7.  I found several pages with differing 
> instructions.  I found one in "support.apple.com" that recommended something 
> that didn't work.[2]
> 
> 
> Further suggestions?
>   
> 
> Thanks again very much.
> Spencer Graves
> 
> 
> [2] "support.apple.com" recommended 
> "PATH=/bin:/sbin:/user/bin:/user/sbin:/system/Library/ export PATH", then 
> "env".  I did "env" to get the current path, than appended 
> ":/opt/gfortran/bin" to that and executed the revised 
> "PATH=...:/opt/gfortran/bin export PATH".  However, when I checked with "env" 
> again, the change was not displayed.  I rebooted with the same result.
> 
> 
> https://support.apple.com/guide/terminal/use-environment-variables-apd382cc5fa-4f58-4449-b20a-41c53c006f8f/mac
> 
> 
> On 7/6/23 11:01 AM, Simon Urbanek wrote:
>> AFACT he didn't say so, there was no response, just double-posting of the 
>> same question after is was answered.
>> The installer says:
>> The resulting compiler will live in /opt/gfortran and can be called with
>> /opt/gfortran/bin/gfortran
>> so it's advisable to have /opt/gfortran/bin on the PATH.
>> (Side note: the arm64 build of R uses the full path, but some people have 
>> been objecting to that since they wanted to use other compilers for the 
>> legacy Intel builds, but as I suspected that causes other issues, so I'll 
>> change that for the next release).
>> Cheers,
>> Simon
>>> On Jul 6, 2023, at 11:45 PM, Peter Dalgaard >> > wrote:
>>> 
>>> AFAICT, Spencer followed the implied instructions and it still didn't work.
>>> 
>>> There may also be a PATH issue when upgrading to 4.3.x, /usr/local -> 
>>> /opt/R/ Does gfortran 12.2 install to /opt/R/.../bin ?
>>> 
>>> -pd
>>> 
 On 6 Jul 2023, at 07:42 , Simon Urbanek >>> > wrote:
 
 Already answered to you and on R-pkg-devel [9 mins after you posted there 
 - now more than 5h ago...]:
 
 To quote from the page you downloaded R from:
 
 This release uses Xcode 14.2/14.3 and GNU Fortran 12.2. If you wish to 
 compile R packages which contain Fortran code, you may need to download 
 the corresponding GNU Fortran compiler from 
 https://mac.R-project.org/tools  
 >.
 
 
 
> On Jul 6, 2023, at 5:16 PM, Spencer Graves  > wrote:
> 
> Hello, All:
> 
> 
>  "R CMD check KFAS" under macOS 11.7.8 (the latest version that will run 
> on my aging Mac) complains "gfortran: command not found".
> 
> 
>  I just upgraded to R 4.3.1 and installed "gfortran-12.2-universal.pkg" 
> per 
> "https://cran.r-project.org/bin/macosx/tools/".
>   I expected this to solve the problem.  It didn't.
> 
> 
>  Suggestions?
>  Thanks,
>  Spencer Graves
> 
> 
> p.s.  This is my fork of KFAS, available at 
> "https://github.com/sbgraves237/KFAS 
> ".  "sessionInfo()" appears below.
> 
> 
> ##
> 
> 
> sessionInfo()
> R version 4.3.1 (2023-06-16)
> Platform: x86_64-apple-darwin20 (64-bit)
> Running under: macOS Big Sur 11.7.8
> 
> Matrix products: default
> BLAS: 
> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
> LAPACK: 
> 

Re: [R-SIG-Mac] gfortran: command not found

2023-07-06 Thread Spencer Graves
1.  I need to apologize to Simon:  I failed to see his reply to the 
original post.  Then I found the instructions and installed 
gfortran-12.2-universal.pkg, as indicated there, but it still didn't work.



2.  I'm not finding clear instructions on how to update the path on 
macOS 11.7.8, which is the latest version available for my 2014 MacBook 
Pro with a 2.8 GHz Quad-Core Intel Core i7.  I found several pages with 
differing instructions.  I found one in "support.apple.com" that 
recommended something that didn't work.[2]



  Further suggestions?


  Thanks again very much.
  Spencer Graves


[2] "support.apple.com" recommended 
"PATH=/bin:/sbin:/user/bin:/user/sbin:/system/Library/ export PATH", 
then "env".  I did "env" to get the current path, than appended 
":/opt/gfortran/bin" to that and executed the revised 
"PATH=...:/opt/gfortran/bin export PATH".  However, when I checked with 
"env" again, the change was not displayed.  I rebooted with the same 
result.



https://support.apple.com/guide/terminal/use-environment-variables-apd382cc5fa-4f58-4449-b20a-41c53c006f8f/mac


On 7/6/23 11:01 AM, Simon Urbanek wrote:
AFACT he didn't say so, there was no response, just double-posting of 
the same question after is was answered.


The installer says:

The resulting compiler will live in /opt/gfortran and can be called with
/opt/gfortran/bin/gfortran

so it's advisable to have /opt/gfortran/bin on the PATH.

(Side note: the arm64 build of R uses the full path, but some people 
have been objecting to that since they wanted to use other compilers for 
the legacy Intel builds, but as I suspected that causes other issues, so 
I'll change that for the next release).


Cheers,
Simon



On Jul 6, 2023, at 11:45 PM, Peter Dalgaard > wrote:


AFAICT, Spencer followed the implied instructions and it still didn't 
work.


There may also be a PATH issue when upgrading to 4.3.x, /usr/local -> 
/opt/R/ Does gfortran 12.2 install to /opt/R/.../bin ?


-pd

On 6 Jul 2023, at 07:42 , Simon Urbanek > wrote:


Already answered to you and on R-pkg-devel [9 mins after you posted 
there - now more than 5h ago...]:


To quote from the page you downloaded R from:

This release uses Xcode 14.2/14.3 and GNU Fortran 12.2. If you wish 
to compile R packages which contain Fortran code, you may need to 
download the corresponding GNU Fortran compiler from 
https://mac.R-project.org/tools  
>.




On Jul 6, 2023, at 5:16 PM, Spencer Graves 
mailto:spencer.gra...@prodsyse.com>> 
wrote:


Hello, All:


 "R CMD check KFAS" under macOS 11.7.8 (the latest version that will 
run on my aging Mac) complains "gfortran: command not found".



 I just upgraded to R 4.3.1 and installed 
"gfortran-12.2-universal.pkg" per 
"https://cran.r-project.org/bin/macosx/tools/ 
".  I expected this to 
solve the problem.  It didn't.



 Suggestions?
 Thanks,
 Spencer Graves


p.s.  This is my fork of KFAS, available at 
"https://github.com/sbgraves237/KFAS 
".  "sessionInfo()" appears below.



##


sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.7.8

Matrix products: default
BLAS: 
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: 
/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0


locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Chicago
tzcode source: internal

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.3.1  R6_2.5.1    magrittr_2.0.3  cli_3.6.1
[5] tools_4.3.1 glue_1.6.2  rstudioapi_0.14 roxygen2_7.2.3
[9] xml2_1.3.4  vctrs_0.6.2 stringi_1.7.12  knitr_1.42
[13] xfun_0.39   stringr_1.5.0   lifecycle_1.0.3 rlang_1.1.1
[17] purrr_1.0.1




___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org 
https://stat.ethz.ch/mailman/listinfo/r-sig-mac




[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org 
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk   Priv: pda...@gmail.com 







___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org

Re: [R-SIG-Mac] gfortran: command not found

2023-07-06 Thread Simon Urbanek
AFACT he didn't say so, there was no response, just double-posting of the same 
question after is was answered.

The installer says:

The resulting compiler will live in /opt/gfortran and can be called with
/opt/gfortran/bin/gfortran

so it's advisable to have /opt/gfortran/bin on the PATH.

(Side note: the arm64 build of R uses the full path, but some people have been 
objecting to that since they wanted to use other compilers for the legacy Intel 
builds, but as I suspected that causes other issues, so I'll change that for 
the next release).

Cheers,
Simon



> On Jul 6, 2023, at 11:45 PM, Peter Dalgaard  wrote:
> 
> AFAICT, Spencer followed the implied instructions and it still didn't work. 
> 
> There may also be a PATH issue when upgrading to 4.3.x, /usr/local -> 
> /opt/R/ Does gfortran 12.2 install to /opt/R/.../bin ?
> 
> -pd  
> 
>> On 6 Jul 2023, at 07:42 , Simon Urbanek  wrote:
>> 
>> Already answered to you and on R-pkg-devel [9 mins after you posted there - 
>> now more than 5h ago...]:
>> 
>> To quote from the page you downloaded R from:
>> 
>> This release uses Xcode 14.2/14.3 and GNU Fortran 12.2. If you wish to 
>> compile R packages which contain Fortran code, you may need to download the 
>> corresponding GNU Fortran compiler from https://mac.R-project.org/tools 
>> . 
>> 
>> 
>> 
>>> On Jul 6, 2023, at 5:16 PM, Spencer Graves  
>>> wrote:
>>> 
>>> Hello, All:
>>> 
>>> 
>>>   "R CMD check KFAS" under macOS 11.7.8 (the latest version that will 
>>> run on my aging Mac) complains "gfortran: command not found".
>>> 
>>> 
>>>   I just upgraded to R 4.3.1 and installed 
>>> "gfortran-12.2-universal.pkg" per 
>>> "https://cran.r-project.org/bin/macosx/tools/;.  I expected this to solve 
>>> the problem.  It didn't.
>>> 
>>> 
>>>   Suggestions?
>>>   Thanks,
>>>   Spencer Graves
>>> 
>>> 
>>> p.s.  This is my fork of KFAS, available at 
>>> "https://github.com/sbgraves237/KFAS;.  "sessionInfo()" appears below.
>>> 
>>> 
>>> ##
>>> 
>>> 
>>> sessionInfo()
>>> R version 4.3.1 (2023-06-16)
>>> Platform: x86_64-apple-darwin20 (64-bit)
>>> Running under: macOS Big Sur 11.7.8
>>> 
>>> Matrix products: default
>>> BLAS: 
>>> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
>>>  
>>> LAPACK: 
>>> /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;
>>>   LAPACK version 3.11.0
>>> 
>>> locale:
>>> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>>> 
>>> time zone: America/Chicago
>>> tzcode source: internal
>>> 
>>> attached base packages:
>>> [1] stats graphics  grDevices utils datasets  methods   base
>>> 
>>> loaded via a namespace (and not attached):
>>> [1] compiler_4.3.1  R6_2.5.1magrittr_2.0.3  cli_3.6.1
>>> [5] tools_4.3.1 glue_1.6.2  rstudioapi_0.14 roxygen2_7.2.3
>>> [9] xml2_1.3.4  vctrs_0.6.2 stringi_1.7.12  knitr_1.42
>>> [13] xfun_0.39   stringr_1.5.0   lifecycle_1.0.3 rlang_1.1.1
>>> [17] purrr_1.0.1
 
>>> 
>>> ___
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac@r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>> 
>> 
>> 
>>  [[alternative HTML version deleted]]
>> 
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> -- 
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd@cbs.dk  Priv: pda...@gmail.com
> 


[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] gfortran: command not found

2023-07-06 Thread Spencer Graves

Hi, Peter et al.:


On 7/6/23 6:45 AM, Peter Dalgaard wrote:

AFAICT, Spencer followed the implied instructions and it still didn't work.

There may also be a PATH issue when upgrading to 4.3.x, /usr/local -> 
/opt/R/ Does gfortran 12.2 install to /opt/R/.../bin ?



  The default install went to "/opt/gfortran", and gcc is in "/usr/bin".


  What should I do to fix this?


	  I downloaded and reinstalled "gfortran-12.2-universal.pkg". I did NOT 
see an option to install it anyplace else.



  Thanks,
  Spencer Graves



-pd


On 6 Jul 2023, at 07:42 , Simon Urbanek  wrote:

Already answered to you and on R-pkg-devel [9 mins after you posted there - now 
more than 5h ago...]:

To quote from the page you downloaded R from:

This release uses Xcode 14.2/14.3 and GNU Fortran 12.2. If you wish to compile R 
packages which contain Fortran code, you may need to download the corresponding GNU 
Fortran compiler from https://mac.R-project.org/tools 
.




On Jul 6, 2023, at 5:16 PM, Spencer Graves  wrote:

Hello, All:


  "R CMD check KFAS" under macOS 11.7.8 (the latest version that will run on my 
aging Mac) complains "gfortran: command not found".


  I just upgraded to R 4.3.1 and installed "gfortran-12.2-universal.pkg" per 
"https://cran.r-project.org/bin/macosx/tools/;.  I expected this to solve the problem.  
It didn't.


  Suggestions?
  Thanks,
  Spencer Graves


p.s.  This is my fork of KFAS, available at "https://github.com/sbgraves237/KFAS;.  
"sessionInfo()" appears below.


##


sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.7.8

Matrix products: default
BLAS: 
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: 
/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;
  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Chicago
tzcode source: internal

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.3.1  R6_2.5.1magrittr_2.0.3  cli_3.6.1
[5] tools_4.3.1 glue_1.6.2  rstudioapi_0.14 roxygen2_7.2.3
[9] xml2_1.3.4  vctrs_0.6.2 stringi_1.7.12  knitr_1.42
[13] xfun_0.39   stringr_1.5.0   lifecycle_1.0.3 rlang_1.1.1
[17] purrr_1.0.1




___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac




[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac




___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] gfortran: command not found

2023-07-06 Thread Peter Dalgaard
AFAICT, Spencer followed the implied instructions and it still didn't work. 

There may also be a PATH issue when upgrading to 4.3.x, /usr/local -> 
/opt/R/ Does gfortran 12.2 install to /opt/R/.../bin ?

-pd  

> On 6 Jul 2023, at 07:42 , Simon Urbanek  wrote:
> 
> Already answered to you and on R-pkg-devel [9 mins after you posted there - 
> now more than 5h ago...]:
> 
> To quote from the page you downloaded R from:
> 
> This release uses Xcode 14.2/14.3 and GNU Fortran 12.2. If you wish to 
> compile R packages which contain Fortran code, you may need to download the 
> corresponding GNU Fortran compiler from https://mac.R-project.org/tools 
> . 
> 
> 
> 
>> On Jul 6, 2023, at 5:16 PM, Spencer Graves  
>> wrote:
>> 
>> Hello, All:
>> 
>> 
>>"R CMD check KFAS" under macOS 11.7.8 (the latest version that will 
>> run on my aging Mac) complains "gfortran: command not found".
>> 
>> 
>>I just upgraded to R 4.3.1 and installed 
>> "gfortran-12.2-universal.pkg" per 
>> "https://cran.r-project.org/bin/macosx/tools/;.  I expected this to solve 
>> the problem.  It didn't.
>> 
>> 
>>Suggestions?
>>Thanks,
>>Spencer Graves
>> 
>> 
>> p.s.  This is my fork of KFAS, available at 
>> "https://github.com/sbgraves237/KFAS;.  "sessionInfo()" appears below.
>> 
>> 
>> ##
>> 
>> 
>> sessionInfo()
>> R version 4.3.1 (2023-06-16)
>> Platform: x86_64-apple-darwin20 (64-bit)
>> Running under: macOS Big Sur 11.7.8
>> 
>> Matrix products: default
>> BLAS: 
>> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
>>  
>> LAPACK: 
>> /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;
>>   LAPACK version 3.11.0
>> 
>> locale:
>> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>> 
>> time zone: America/Chicago
>> tzcode source: internal
>> 
>> attached base packages:
>> [1] stats graphics  grDevices utils datasets  methods   base
>> 
>> loaded via a namespace (and not attached):
>> [1] compiler_4.3.1  R6_2.5.1magrittr_2.0.3  cli_3.6.1
>> [5] tools_4.3.1 glue_1.6.2  rstudioapi_0.14 roxygen2_7.2.3
>> [9] xml2_1.3.4  vctrs_0.6.2 stringi_1.7.12  knitr_1.42
>> [13] xfun_0.39   stringr_1.5.0   lifecycle_1.0.3 rlang_1.1.1
>> [17] purrr_1.0.1
>>> 
>> 
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>> 
> 
> 
>   [[alternative HTML version deleted]]
> 
> ___
> R-SIG-Mac mailing list
> R-SIG-Mac@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac