Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13992 closed enhancement (fixed)

Set Fortran compiler variables

Reported by: jdemeyer Owned by: GeorgSWeber
Priority: critical Milestone: sage-5.7
Component: build Keywords:
Cc: Merged in: sage-5.7.beta1
Authors: Jeroen Demeyer Reviewers: François Bissey
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

Since SCons is too stupid to figure out by itself how to compile Fortran code (#13985), we should set environment variables in sage-env, similar to how we do for CC and CXX. This is sort-of a follow-up to #13349 (deprecate SAGE_FORTRAN).

Just for information:

Parts of Sage still using sage_fortran:

Apply:

  1. 13992_fortran_env.patch to SAGE_ROOT
  2. 13992_inline_fortran.patch to $SAGE_LOCAL/bin

Attachments (2)

13992_fortran_env.patch (2.3 KB) - added by jdemeyer 7 years ago.
13992_inline_fortran.patch (688 bytes) - added by jdemeyer 7 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 7 years ago by jdemeyer

  • Description modified (diff)

Changed 7 years ago by jdemeyer

comment:2 Changed 7 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Description modified (diff)

comment:3 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:4 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:5 Changed 7 years ago by jdemeyer

  • Description modified (diff)

Changed 7 years ago by jdemeyer

comment:6 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:7 follow-up: Changed 7 years ago by fbissey

I like the patches. I am surprised that you put g77 as a candidate. I am not sure sage can be built using g77. I would have to dig to check.

comment:8 in reply to: ↑ 7 Changed 7 years ago by jdemeyer

Replying to fbissey:

I like the patches. I am surprised that you put g77 as a candidate. I am not sure sage can be built using g77. I would have to dig to check.

I don't know either whether it works, I could remove it if you prefer.

comment:9 Changed 7 years ago by fbissey

After a quick scan of the spkg, nothing jumps at me as deal breaker. Building with g77 could be interesting experiment but let's not go there for this ticket. It's good as is. Numpy may need bumping before numpy 1.7.0 is ready - especially given its dependency on #12415. Ypu haven't put this for review, what do you think needs to be done apart from bumping spkg?

comment:10 Changed 7 years ago by jdemeyer

I didn't put this to needs_review mainly because I wanted to test it on the buildbots first. But if you say "positive_review if it works", that's fine for me.

Note that the spkgs are not part of this ticket, just the two patches.

comment:11 Changed 7 years ago by fbissey

Sure. Positive review if it works for me.

comment:12 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.7.beta1
  • Resolution set to fixed
  • Reviewers set to François Bissey
  • Status changed from new to closed

Works fine.

comment:13 follow-up: Changed 7 years ago by leif

Does CPP meanwhile get a default value?

Just asking because you also removed

# letting at least CPP have a default value ('cpp') probably makes sense.

from sage-env.

comment:14 in reply to: ↑ 13 ; follow-up: Changed 7 years ago by jdemeyer

Replying to leif:

Does CPP meanwhile get a default value?

No, it doesn't. I removed your comment because I don't know any reason why we should set CPP.

comment:15 Changed 7 years ago by leif

P.S.: Just found out somebody finally removed setting FC to sage_fortran in the R spkg... :-) (which I did years? ago, in an spkg that never got merged...)

comment:16 in reply to: ↑ 14 Changed 7 years ago by leif

Replying to jdemeyer:

Replying to leif:

Does CPP meanwhile get a default value?

No, it doesn't. I removed your comment because I don't know any reason why we should set CPP.

Mainly for use in spkg-install scripts and the like. I don't think I had anything else in mind (other than overriding a preset CPP if Sage's GCC gets installed, which we already do).

comment:17 follow-up: Changed 7 years ago by jdemeyer

To what should be set CPP then? $CC -E? Or cpp? Or /lib/cpp? For now, letting configure figure it out has worked fine.

comment:18 in reply to: ↑ 17 Changed 7 years ago by leif

Replying to jdemeyer:

To what should be set CPP then? $CC -E? Or cpp? Or /lib/cpp? For now, letting configure figure it out has worked fine.

Just to cpp in case it's not already set, for use in our "own" scripts (that don't have/use configure), just like CC, CXX, but also AR etc., i.e., for convenience (and consistency).

comment:19 Changed 7 years ago by jdemeyer

But $CPP is not so clear, as configure uses $CC -E by default.

Note: See TracTickets for help on using tickets.