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

Remove support for GCC 7 and 8 #430

Merged
merged 2 commits into from
Jun 6, 2021
Merged

Conversation

awvwgk
Copy link
Member

@awvwgk awvwgk commented Jun 6, 2021

Edit: see discussion here for motivation for dropping GCC 7 and 8 support.

  • remove GCC 8.1 from Windows workflow
  • remove GCC 7.5 and GCC 8.4 from Ubuntu/MacOS workflow
  • remove GCC workaround from stdlib_string_type
  • move GCC <9 from supported to failing compilers
  • create error in CMake for too old GCC version

- remove GCC 8.1 from Windows workflow
- remove GCC 7.5 and GCC 8.4 from Ubuntu/MacOS workflow
- remove GCC workaround from stdlib_string_type
- move GCC <9 from supported to failing compilers
- create error in CMake for too old GCC version
Copy link
Member

@ivan-pi ivan-pi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me.

Copy link
Member

@jvdp1 jvdp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending one minor comment

README.md Outdated Show resolved Hide resolved
@awvwgk awvwgk merged commit b3c3102 into fortran-lang:master Jun 6, 2021
@awvwgk awvwgk deleted the gcc-version branch June 6, 2021 19:57
@LKedward
Copy link
Member

LKedward commented Jun 7, 2021

I'm reading the README and it's not clear which issues were causing problems with GCC<9 on Ubuntu/MacOS - I though #296 only affected Windows? (Apologies if I missed something)

@Romendakil
Copy link

In general, I think ropping older compiler versions is fine, however, I don't know what the vision is for stdlib. I'd assume that the goal would be to deliver stdlib as a precompiled library on OS in a similar fashion as libstdc++. This would mean that LTS OS versions which still have gcc 7/8 as their main compiler (Ubuntu 18 e.g.) could support stdlib only as an addition to their special gcc-9 and newer packages, but not for their system compiler.

@awvwgk
Copy link
Member Author

awvwgk commented Jun 7, 2021

I'm reading the README and it's not clear which issues were causing problems with GCC<9 on Ubuntu/MacOS

We are using one feature implemented in GCC 9 and later for stdlib_string_type, which was using a workaround before:

! GCC 8 and older cannot evaluate pure derived type procedures here
!character(len=len(string)) :: maybe_string
character(len=:), allocatable :: maybe_string

Also, for #420 we hit an issue where GCC 9 and later were required for usage with the real and imaginary component selectors

x = linspace(start%re, end%re, n)
y = linspace(start%im, end%im, n)

In general, I think ropping older compiler versions is fine, however, I don't know what the vision is for stdlib. I'd assume that the goal would be to deliver stdlib as a precompiled library on OS in a similar fashion as libstdc++. This would mean that LTS OS versions which still have gcc 7/8 as their main compiler (Ubuntu 18 e.g.) could support stdlib only as an addition to their special gcc-9 and newer packages, but not for their system compiler.

I have mixed feelings about LTS support of compilers, some project require me to write code compatible with GCC 4.9, the conda-forge Windows toolchain is running on GCC 5.3 and won't get updated any time soon. Using old GCC versions really limits the available features and the known bugs and issues can become tedious to workaround. Sticking with the supported compilers by GCC sounds like the easiest solution for me.

There are currently two lines of code that break GCC 7/8 support, which can be easily reverted, #420 could also be adapted to be compatible with GCC 7/8 without much problems. If we want to keep supporting those versions, this is still easily possible right now. And I'm open to reverting this patch.

@LKedward
Copy link
Member

LKedward commented Jun 7, 2021

Thanks for the explanation @awvwgk - I had missed the discussion in #420 so this PR was a little out of the blue. I've updated the PR description for anyone else who ends up here from the README.

Sticking with the supported compilers by GCC sounds like the easiest solution for me.

This is probably the key point here, particularly regarding bugs and the future development/maintainability of stdlib, so this seems fine to me 👍

@awvwgk awvwgk removed the reviewers needed This patch requires extra eyes label Jun 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants