sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.33k stars 453 forks source link

Recommend Fortran compiler as a prerequisite #27054

Closed f588ca1e-f96a-4dea-804d-c55eab873dab closed 4 years ago

f588ca1e-f96a-4dea-804d-c55eab873dab commented 5 years ago

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

Depends on #26964

CC: @slel

Component: documentation

Keywords: gfortran

Author: Odile Bénassy, Samuel Lelièvre

Branch/Commit: u/slelievre/mrs/4/gfortran @ a35d77e

Reviewer: Michael Orlitzky

Issue created by migration from https://trac.sagemath.org/ticket/27054

jdemeyer commented 5 years ago

Description changed:

jdemeyer commented 5 years ago
comment:1
  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.

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

dimpase commented 5 years ago
comment:3

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.

fchapoton commented 5 years ago
comment:4

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

embray commented 5 years ago
comment:5

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.

dimpase commented 5 years ago
comment:7

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.

slel commented 5 years ago

Changed branch from u/galois/mrs/4/gfortran to u/slelievre/mrs/4/gfortran

slel commented 5 years ago

Changed keywords from none to gfortran

slel commented 5 years ago

Description changed:

--- 
+++ 
@@ -1,10 +1 @@
-Zerline ([@zerline](https://gitlab.com/zerline)) opened a merge request at https://gitlab.com/sagemath/sage/merge_requests/4:
-
----
-
-
-
-
-
-
-
+Recommend Fortran compiler as a prerequisite in the "installing from source" guide.
slel commented 5 years ago

Changed author from Zerline to Odile Bénassy, Samuel Lelièvre

slel commented 5 years ago

Changed commit from c36d9b5 to a35d77e

slel commented 5 years ago
comment:9

Rephrased as a recommendation rather than a strict prerequisite.


New commits:

a35d77eRecommend Fortran compiler in installation guide
jhpalmieri commented 5 years ago
comment:10

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?

jhpalmieri commented 5 years ago
comment:11

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.
dimpase commented 5 years ago
comment:12

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.

jhpalmieri commented 5 years ago
comment:13

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

slel commented 5 years ago
comment:14

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.

jhpalmieri commented 5 years ago
comment:15

I'm happy with the revised version.

embray commented 5 years ago
comment:16

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

embray commented 5 years ago
comment:17

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).

embray commented 4 years ago
comment:18

Ticket retargeted after milestone closed

mkoeppe commented 4 years ago
comment:19

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

mkoeppe commented 4 years ago

Dependencies: #26964

mkoeppe commented 4 years ago
comment:21

26964 is ready and takes care of this.

orlitzky commented 4 years ago

Reviewer: Michael Orlitzky

fchapoton commented 4 years ago
comment:23

ok, thx