Opened 2 years ago

Closed 12 months ago

#27054 closed enhancement (duplicate)

Recommend Fortran compiler as a prerequisite

Reported by: galois Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: documentation Keywords: gfortran
Cc: slelievre Merged in:
Authors: Odile Bénassy, Samuel Lelièvre Reviewers: Michael Orlitzky
Report Upstream: N/A Work issues:
Branch: u/slelievre/mrs/4/gfortran (Commits, GitHub, GitLab) Commit: a35d77e1c3a1710c4dbebf6956169ec82f60a71a
Dependencies: #26964 Stopgaps:

Status badges

Description (last modified by slelievre)

Recommend Fortran compiler as a prerequisite in the "installing from source" guide.

Change History (23)

comment:1 follow-up: Changed 2 years ago by jdemeyer

  • Description modified (diff)
  1. It's not completely correct to say that gfortran must be installed since Sage will install it if needed. It would be good to clarify that.
  1. What's up with the changes to src/sage/combinat/tutorial.py? There should be a separate ticket for that.

comment:2 Changed 2 years ago by jdemeyer

  • Status changed from needs_review to needs_work

comment:3 in reply to: ↑ 1 Changed 2 years ago by dimpase

Replying to jdemeyer:

  1. What's up with the changes to src/sage/combinat/tutorial.py? There should be a separate ticket for that.

there is one, in fact, by the same author. Using a wrong branch, I presume.

comment:4 Changed 2 years ago by chapoton

NOTE: Authors should be filled with the author full name.

comment:5 Changed 2 years ago by embray

  • Milestone changed from sage-8.6 to sage-8.7

Retarging tickets optimistically to the next milestone. If you are responsible for this ticket (either its reporter or owner) and don't believe you are likely to complete this ticket before the next release (8.7) please retarget this ticket's milestone to sage-pending or sage-wishlist.

comment:6 Changed 2 years ago by embray

  • Component changed from PLEASE CHANGE to documentation
  • Type changed from PLEASE CHANGE to defect

comment:7 Changed 2 years ago by dimpase

I don't like this from the point of Fortran point of view - it is possible to build Sage with e.g. Flang. Do not break this.

comment:8 Changed 2 years ago by slelievre

  • Branch changed from u/galois/mrs/4/gfortran to u/slelievre/mrs/4/gfortran

comment:9 Changed 2 years ago by slelievre

  • Authors changed from Zerline to Odile Bénassy, Samuel Lelièvre
  • Cc slelievre added
  • Commit changed from c36d9b504b6eaeb0b4240091a34f4849a936ef2a to a35d77e1c3a1710c4dbebf6956169ec82f60a71a
  • Description modified (diff)
  • Keywords gfortran added
  • Status changed from needs_work to needs_review
  • Summary changed from MR4: Gfortran as a prerequisite to Recommend Fortran compiler as a prerequisite
  • Type changed from defect to enhancement

Rephrased as a recommendation rather than a strict prerequisite.


New commits:

a35d77eRecommend Fortran compiler in installation guide

comment:10 follow-up: Changed 2 years ago by jhpalmieri

On OS X, for what it's worth, I have installed gfortran (6.4.0) and I routinely build Sage with the built-in version of clang plus this gfortran. So maybe in an ideal world, the version of gfortran should match the C compiler, but it doesn't seem to be strictly necessary. Or have I just been getting lucky?

comment:11 Changed 2 years ago by jhpalmieri

In more detail:

$ which gcc
/usr/bin/gcc
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ which gfortran
/usr/local/bin/gfortran
$ gfortran --version
GNU Fortran (GCC) 6.4.0
Copyright (C) 2017 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.

comment:12 in reply to: ↑ 10 Changed 2 years ago by dimpase

Replying to jhpalmieri:

On OS X, for what it's worth, I have installed gfortran (6.4.0) and I routinely build Sage with the built-in version of clang plus this gfortran. So maybe in an ideal world, the version of gfortran should match the C compiler, but it doesn't seem to be strictly necessary. Or have I just been getting lucky?

this is what we routinely do on OSX, so it does not look like a problem to me.

comment:13 Changed 2 years ago by jhpalmieri

My comment was in response to the proposed change, which includes the line "it is necessary to have matching versions of these two compilers".

comment:14 Changed 2 years ago by slelievre

  • Status changed from needs_review to needs_work

Thanks for your feedback on my proposed phrasing in commit a35d77e:

A Fortran compiler (matching the C/C++ compiler) is recommended, although not a strict requirement: if none is present, gfortran will be built, and this might also trigger building gcc, since it is necessary to have matching versions of these two compilers. Thus having a Fortran compiler present and compatible with the C/C++ compiler (for example matching versions of gcc and gfortran, or Clang and Flang) can make the build simpler and faster.

How about the following?

A Fortran compiler is recommended, although not a strict requirement: if none is present, gfortran will be built, and this might also trigger building gcc, depending on the OS and on what C/C++ compiler and what version of it is present. Having a Fortran compiler compatible with the C/C++ compiler (for example matching versions of gcc and gfortran, or compatible versions of Clang and Flang, or of Clang and gfortran) can thus save time and power when building Sage.

comment:15 Changed 2 years ago by jhpalmieri

I'm happy with the revised version.

comment:16 Changed 2 years ago by embray

  • Milestone changed from sage-8.7 to sage-8.8

Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)

comment:17 Changed 22 months ago by embray

  • Milestone changed from sage-8.8 to sage-8.9

Tickets still needing working or clarification should be moved to the next release milestone at the soonest (please feel free to revert if you think the ticket is close to being resolved).

comment:18 Changed 16 months ago by embray

  • Milestone changed from sage-8.9 to sage-9.1

Ticket retargeted after milestone closed

comment:19 Changed 14 months ago by mkoeppe

See also #26964, which generates the commands to install recommended system packages.

comment:20 Changed 14 months ago by mkoeppe

  • Dependencies set to #26964
  • Milestone changed from sage-9.1 to sage-duplicate/invalid/wontfix
  • Status changed from needs_work to needs_review

comment:21 Changed 14 months ago by mkoeppe

#26964 is ready and takes care of this.

comment:22 Changed 12 months ago by mjo

  • Reviewers set to Michael Orlitzky
  • Status changed from needs_review to positive_review

comment:23 Changed 12 months ago by chapoton

  • Resolution set to duplicate
  • Status changed from positive_review to closed

ok, thx

Note: See TracTickets for help on using tickets.