-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gfortran cask duplicates the gcc formula in homebrew-core #96135
Comments
Could there be a difference between how this gets linked and how the gcc package does? My expectation using it was that it was "just" gfortran without gcc, that it put gfortran into my PATH, for things that depend on gfortran to find (i.e., R), but didnt otherwise muck up the path with lots of gcc stuff that would interfere with the Apple toolchain. |
It is a reasonably popular Cask, though:
|
Not as much as the
|
The
|
As I said, I don't really see a reason one would want to install the cask over the formula. The reason I provide these standalone installers is only for some colleagues who want to have a gfortran install and don't know / don't want to learn how to install homebrew: the installer is a nice click-through. I would highly recommend people who have brew installed to actually use the formula: it is more up-to-date, as well, and consistently provides the latest version of gfortran. If you look at the cask, you'll see it provides:
|
You have plenty of colleagues. On a more serious note, I don't see a reason why there should be a
I think that should smooth the transition for everyone still using the cask, unless I've misunderstood how all of this works. (That's certainly possible.) Happy to open the necessary PRs if that solution works. |
@carlocab sounds good to me |
PRs opened: |
Hello! This change breaks compatibility with R CRAN source packages with fortran linkage, since they rely on the location /usr/local/gfortran. The gfortran Cask with the .pkg in it installed gfortran to that location. Simply aliasing gfortran to gcc does not provide the same setup as the Cask did. |
Does changing Otherwise, you can maintain a tap for the |
@imrehorvath @carlocab It works by adding two lines to the
|
Thanks @liuyadong! You can also shorten
to
It's not that much shorter, but you might prefer the more standard |
@carlocab Of course! btw there is a typo, 20 -> 19 😄 |
Thank you both! @carlocab @liuyadong
|
Hi all, we've been discussing this in a related issue: Homebrew/discussions#422 (reply in thread) I'd been unable to get I tried setting the R Makevars to those suggested in this thread, and still cannot use devtools That is, I've set Makevars to:
And I then get:
Prior to this my Makevars had been:
Any suggestions on what the ideal solution to this is? I suspect a lot of people will be having this issue if it's a general problem relating to bigSur and R. |
It works well on my machine using brew
|
Thanks for suggesting. Just tried setting that as my Makevars and doesn't work on my system, got the following errors:
|
Editing the Makevars is something of an unsolution. One of the advances in R OS X 4.0 is you don’t have to edit the makevars anymore. Once you start editing them, you can easily get into a situation where things you compile don’t link properly with binary downloads. A better solution is to just download and install gfortran. A few mb of duplicated data isn’t problematic. This is what the cask did. The former cask could easily have been updated to support arm (which r doesn’t support yet anyway) by pointing at fxcoudert’s latest. btw - since we’re talking about R-homebrew compatibility, the decision by homebrew to release arch-specific rather than universal library binaries is going to make transitioning a mess. When r comes out with arm64 support, to use it with r packages, homebrew users will have to switch their whole brew installation to arm64, which is then going to break their r x86 installations. |
We made design decisions that mean it's totally possible to have two Homebrew installs on Apple Silicon, one ARM (in |
R packages are sometimes delivered as source and sometimes as binaries. R has its own internal system for finding its toolchain and libraries, for building packages from source. When the local installation desynchronizes from the toolchain used to compile the binary packages (i.e., by changing Makevars), local administration can become challenging. When there is a stable dev version of R arm64 (which I expect to be this week), and there are also instructions for setting up parallel homebrew installations that don't interfere with each other and migrating from one to the other, I would be happy to try out whether it is possible to setup R with homebrew in the way you propose. |
Interesting to hear! This is probably drifting more into R than Homebrew territory, but if I leave my Makevars empty, then when I run |
@NathanSkene That shouldn't happen, and doesn't happen on my system. Perhaps you are using the homebrew R formula instead of R from CRAN? You really want to use the CRAN one instead of the homebrew one - its compiled with the full set of @fxcoudert The R Mac OS X folks posted a working R-arm64 build this morning. I'm now attempting the dual-homebrew/R setup you proposed. As expected, the split library paths do create a problem, because the R toolchain expects libraries and pkgconfig to be found under /usr. It may be possible to find a Makevars formula that makes it all work (so far my attempts have been unsuccessful). But Makevars is set at the user level rather than the R-installation level, so doing so will affect the user's x86_64 installation as well. If you have an interest in the outcome here, let me know and I'll post additional information as I find it. |
Afraid it is the CRAN version of R that I'm using
…On Mon, 4 Jan 2021, 18:47 elbamos, ***@***.***> wrote:
This email from ***@***.*** originates from outside
Imperial. Do not click on links and attachments unless you recognise the
sender. If you trust the sender, add them to your safe senders list
<https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email
stamping for this address.
@NathanSkene <https://github.com/NathanSkene> That shouldn't happen, and
doesn't happen on my system. Perhaps you are using the homebrew R formula
instead of R from CRAN? You really want to use the CRAN one instead of the
homebrew one - its compiled with the full set of capabilities(), when you
install a new major version it doesn't wipe out your prior versions, it
works properly with binary downloads from CRAN, etc.
@fxcoudert <https://github.com/fxcoudert> The R Mac OS X folks posted a
working R-arm64 build this morning. I'm now attempting the dual-homebrew/R
setup you proposed. As expected, the split library paths do create a
problem, because the R toolchain expects libraries and pkgconfig to be
found under /usr. It may be possible to find a Makevars formula that makes
it all work (so far my attempts have been unsuccessful). But Makevars is
set at the user level rather than the R-installation level, so doing so
will affect the user's x86_64 installation as well. If you have an interest
in the outcome here, let me know and I'll post additional information as I
find it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#96135 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH5ZPEZCF7TM4QCQ7QULHALSYIEM5ANCNFSM4VDNG7PQ>
.
|
I would suggest to change that, make it configurable.
I'm not an R user myself, just trying to get things in the best shape for others. |
I discovered today that there is a
gfortran
cask, which is distributing the gfortran installers that I build and make available. It's been happening for 3 years and I never knew 😄I don't think that it fits the homebrew-cask rules, though:
gcc
formula in homebrew-coreI could understand if the two distributions were different, but as I'm basically maintaining both, I don't think it should be kept that way. I suggest the cask be removed and users redirected to the gcc formula.
The text was updated successfully, but these errors were encountered: