Skip to content

install.sh should warn or fail early for unsupported Fortran compiler versions #368

Closed

Description

@oas004

Hey! 👋

Thank you for a very cool project!

I tried setting this up for the first time. I initially hit some issues with gfortran. On Pop!_OS 22.04, install.sh accepted GNU Fortran 11.4 and proceeded to build GASNet-EX. The subsequent Caffeine compilation then failed in prif_private_s.F90 with:

Error: Character argument ‘str’ must be length 1 because procedure
‘caf_fatal_error’ is BIND(C)

For compilation I used

 env FC=gfortran CC=gcc CXX=g++  ./install.sh --network=smp

On my system this resolved to GCC/gfortran 11.4. Rebuilding explicitly with GCC/gfortran 13 resolved the problem, and the tests passed.

The README lists gfortran 13–15 as the regularly tested versions. Would it make sense for the installer to detect the selected compiler version before building dependencies and either:

  • reject versions known to be incompatible; or
  • warn when the version is outside the tested range?

This would provide a more actionable error and avoid building GASNet-EX before discovering a compiler incompatibility.

Activity

  1. self-assigned this
    on Sep 9, 2026
  2. bonachea commented on Sep 9, 2026

    @bonachea
    Member

    Hi - thanks for submitting this issue and for the ideas.

    I agree the install experience may currently be suboptimal if the user provides compilers that are not within the recognized set. However on the flip side, we don't want to issue an unconditional fatal error for compilers we don't recognize, in case that detection is somehow unreliable or the user is deliberately trying to expand the set of supported compilers.

    I'll look into deploying an interactive confirmation prompt

  3. bonachea commented on Sep 10, 2026

    @bonachea
    Member

    New behavior deployed in #367:

    $ env CC=gcc FC=gfortran-12 ./install.sh --version --prefix=poop
    [...]
    WARNING: Failed to detect a recognized Fortran compiler.
    
    /usr/bin/gfortran-12 --version reported the following:
    GNU Fortran (Ubuntu 12.4.0-2ubuntu1~24.04.1) 12.4.0
    Copyright (C) 2022 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    This does not appear to be one of the compiler+version combinations
    officially supported by Caffeine (see README.md) and might not work.
    Are you certain you wish to continue installation with /usr/bin/gfortran-12? [yes] no
    Installation declined.
    To use compilers other than Homebrew-installed LLVM flang and clang,
    please set the FC and CC environment variables and rerun './install.sh'.
    Caffeine was not installed.
    
  4. oas004 commented on Sep 10, 2026

    @oas004
    Author

    Thank you so much for a fast response!

    That is a good point! I didn't think about that. An interactive confirmation prompt like you deployed in #367 sounds like a good idea to keep it flexible. Thank you 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions