Skip to content
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

Add gfortran #202

Closed
2 of 5 tasks
certik opened this issue Dec 22, 2019 · 17 comments
Closed
2 of 5 tasks

Add gfortran #202

certik opened this issue Dec 22, 2019 · 17 comments
Assignees
Labels
Area: C/C++ awaiting-deployment Code complete; awaiting deployment and/or deployment in progress OS: macOS OS: Ubuntu

Comments

@certik
Copy link

certik commented Dec 22, 2019

Tool information

  • Tool name: GFortran
  • Add or update? Add
  • Desired version: The default version. E.g. in Ubuntu, just do sudo apt install gfortran
  • Approximate size:
  • If this is an add request:

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Can this tool be installed during the build?

Yes. On Ubuntu:

sudo apt-get install gfortran

On macOS::

brew install gcc9

On Windows: the image already has gfortran, no change necessary.

Are you willing to submit a PR?

Yes! Once I figure out how to do install it (see previous point.) Update: figured it out, I'll see if I can submit a PR.

@alepauly
Copy link
Contributor

alepauly commented Jan 22, 2020

@certik sorry for the delay looking into this. I have a few questions that might help us decide whether we can include this or not:

  1. Do you have workflows depending on this?
  2. Can this be installed on-the-fly during builds? How much does it add to a build?
  3. Are there reliable and consistent binaries available for Ubuntu, Windows, and Mac?

thanks.

@alepauly alepauly added the question Further information is requested label Jan 22, 2020
@certik
Copy link
Author

certik commented Jan 22, 2020

@alepauly thanks a lot for the response. Here are the answers:

  1. Yes, here are a few examples:

https://github.com/fortran-lang/fpm/blob/af56c5890cd28f051147e36fa3c1d8553ec944ea/.github/workflows/CI.yml
https://github.com/fortran-lang/stdlib/blob/dc7e49b17fa728ad9f9cbd179292952f67b78ead/.github/workflows/CI.yml
https://github.com/fortran-lang/stdlib/blob/dc7e49b17fa728ad9f9cbd179292952f67b78ead/.github/workflows/ci_windows.yml

  1. Can this be installed on-the-fly during builds?

Yes, see the above examples that install it on the fly. The Windows image already ships it, but it is installed on macOS and Linux.

How much does it add to a build?

Here is an example on Linux: https://github.com/fortran-lang/fpm/runs/396877419, which adds 1m 29s to the build. Here is an example on macOS: https://github.com/fortran-lang/fpm/runs/396877427, which adds 28s to the build time.

  1. Yes, on Ubuntu just do sudo apt-get install gfortran, on macOS we do brew install gcc9 and the Windows image already has gfortran.

Let me know if you have any other questions.

@alepauly alepauly reopened this Jan 22, 2020
@zbeekman
Copy link

@alepauly I'm a Homebrew maintainer, and, full disclosure, work on fortran-lang/stdlib. I came here for this same reason and I was thinking about working up a PR for this. Looking at the Linux environment there is an install script named
gcc.sh that, somewhat confusingly, is installing g++-7. To install gfortran, one would simply need to add it to the gcc.sh script, or, better-yet, rename the gcc.sh script to indicate it is installing a specific version of g++ and create a gfortran.sh install script for linux.

My personal preference would be to install GFortran 8, but to make it consistent with other gcc tools we could easily install GFortran 7, 8 or 9 following the paradigm set in gcc.sh.

One question: Where is the macOS infrastructure defined? I don't see anything in the images/macos folder. It would be really nice to install graphviz and gcc by default on macOS. (gcc in homebrew is the same as gcc@9, the latest stable release and includes gfortran, and g++.)

@zbeekman
Copy link

(Also, I have a number of public and private repos with workflows depending on gfortran)

@alepauly alepauly added Area: C/C++ and removed needs triage question Further information is requested labels Jan 29, 2020
@alepauly
Copy link
Contributor

@zbeekman thanks for all the info. I've gone ahead and moved this to get done (and figure out #103 and #104 at the same time).

gcc.sh that, somewhat confusingly, is installing g++-7. To install gfortran, one would simply need to add it to the gcc.sh script, or, better-yet, rename the gcc.sh script to indicate it is installing a specific version of g++ and create a gfortran.sh install script for linux.

not sure why it's pinned to g++7, from what I can see only gcc 8 and 9 are still supported, so we should definitely upgrade. Based on yours and other requests we should probably go to 8 across all languages for consistency.

One question: Where is the macOS infrastructure defined? I don't see anything in the images/macos folder. It would be really nice to install graphviz and gcc by default on macOS. (gcc in homebrew is the same as gcc@9, the latest stable release and includes gfortran, and g++.)

Unfortunately that's not public yet, we have some work to clean it up and make it public in this repository - so in the meantime we have to make all the changes to it. Do you want to open a new issue for graphviz so our team can look into adding it? I see you opened #335, I'll go ahead and add some detail there.

thanks again.

@zbeekman
Copy link

not sure why it's pinned to g++7, from what I can see only gcc 8 and 9 are still supported, so we should definitely upgrade. Based on yours and other requests we should probably go to 8 across all languages for consistency.

That sounds good to me. I'd also recommend renaming gcc.sh unless you want to lump the gfortran install in with it. FYI, the gfortran compiler isn't policed as strictly as gcc and g++ so having access to at least the previous version is recommended; sometimes severe gfortran bugs and regressions make it into major releases of GCC.

Unfortunately that's not public yet, we have some work to clean it up and make it public in this repository

It would be really awesome if that were documented in CONTRIBUTING.md, the README.md (both for the repo and the images/macos/README.md) and/or somewhere else logical. I spent a while hunting around to make sense of why there was nothing in the images/macos folder. Adding detail to #335 is helpful but a more prominent notice would be nice.

Do you want to open a new issue for graphviz

I'm going to take a look at the packages installed in macos runners and I'll open new issues for graphviz, and possibly gcc and/or gcc@8 if they're missing. But I have other fires to put out first.

@zbeekman zbeekman mentioned this issue Jan 29, 2020
5 tasks
@alepauly
Copy link
Contributor

It would be really awesome if that were documented in CONTRIBUTING.md, the README.md (both for the repo and the images/macos/README.md) and/or somewhere else logical. I spent a while hunting around to make sense of why there was nothing in the images/macos folder. Adding detail to #335 is helpful but a more prominent notice would be nice.

Will do, thanks for noting it. There's a few areas where docs could be very much improved in this repo, I'll add this to the list.

@ivan-nosar
Copy link
Contributor

Good day!
We have added gcc, gfortran and clang tools on Windows and Ubuntu virtual environments in #369

@al-cheb al-cheb added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Feb 10, 2020
@al-cheb
Copy link
Contributor

al-cheb commented Feb 10, 2020

Hello, All

We have added gfortran for Ubuntu in #369 and MacOs. It should start rolling out early next week, once the rollout start it shows up as a pre-release here: https://github.com/actions/virtual-environments/releases

After that it takes about 6-7 days to reach all accounts (assuming no delays).

@miketimofeev
Copy link
Contributor

@certik the images have been rolled out. Could you check GFortran, please?

@certik
Copy link
Author

certik commented Feb 20, 2020

@miketimofeev thanks for the heads up. I tested it in fortran-lang/fpm#37 and it works!

So this issue is fixed, as far as I am concerned. Thank you everybody (@miketimofeev, @al-cheb, @ivan-nosar, @alepauly) for fixing it, and thanks @zbeekman for providing additional info.

@junghans
Copy link

Is there a reason gfortran-10 isn’t included in the latest images?

@certik
Copy link
Author

certik commented Oct 12, 2020

@junghans they probably install the version in Ubuntu 18.04, which is 7.5.0.

@junghans
Copy link

junghans commented Oct 12, 2020

ubuntu-latest comes with 4 versions of gcc, but only 3 versions of gfortran.
(See https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md)

@certik
Copy link
Author

certik commented Oct 12, 2020

Ok, in that case it should be possible to enable gfortran for GCC version 10 also.

@maxim-lobanov
Copy link
Contributor

@junghans , no one has asked for it so we didn't add it.
Feel free to raise feature request.

@junghans junghans mentioned this issue Oct 12, 2020
6 tasks
@junghans
Copy link

@maxim-lobanov see #1796

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C/C++ awaiting-deployment Code complete; awaiting deployment and/or deployment in progress OS: macOS OS: Ubuntu
Projects
None yet
Development

No branches or pull requests

8 participants