#13348 closed enhancement (fixed)
Set CPATH in sage-env
Reported by: | jdemeyer | Owned by: | GeorgSWeber |
---|---|---|---|
Priority: | major | Milestone: | sage-5.4 |
Component: | build | Keywords: | |
Cc: | leif | Merged in: | sage-5.4.beta2 |
Authors: | Jeroen Demeyer | Reviewers: | Volker Braun |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Since we're setting LIBRARY_PATH
in sage-env
(which is the compile-time equivalent of LD_LIBRARY_PATH
, corresponding to the compiler flag -L
), we should analogously set CPATH
to SAGE_LOCAL/include
(corresponding to the compiler flag -I
). This is already done in the spkg-install
file for sagenb-0.10.2
.
Within Sage, SAGE_LOCAL
effectively acts as installation prefix, so this is the logical thing to do. A GCC compiled within Sage will already look at SAGE_LOCAL/include
by default.
This doesn't immediately change anything, but it will allow simplifying many spkg-install
files by not having to care about -I$SAGE_LOCAL/include
anymore.
Apply 13348_CPATH.patch to SAGE_ROOT
.
Attachments (1)
Change History (11)
comment:1 Changed 8 years ago by
- Priority changed from blocker to major
comment:2 Changed 8 years ago by
- Cc leif added
comment:3 Changed 7 years ago by
- Milestone changed from sage-5.3 to sage-5.4
- Status changed from new to needs_review
comment:4 Changed 7 years ago by
- Description modified (diff)
comment:5 Changed 7 years ago by
- Description modified (diff)
Changed 7 years ago by
comment:6 Changed 7 years ago by
- Reviewers set to Volker Braun
- Status changed from needs_review to positive_review
comment:7 Changed 7 years ago by
- Merged in set to sage-5.4.beta2
- Resolution set to fixed
- Status changed from positive_review to closed
comment:8 Changed 7 years ago by
- Description modified (diff)
comment:9 follow-up: ↓ 10 Changed 7 years ago by
Setting CPATH
, LIBRARY_PATH
etc. is certainly not equivalent to passing -I...
and -L...
on the command line, since directories specified explicitly are always searched first.
Furthermore, Sage's paths should get prepended, not appended, at least if using this feature is supposed to "replace" explicitly specifying paths in commands / CFLAGS
, CPPFLAGS
and LDFLAGS
, e.g. in spkg-install
scripts.
And if ld
is used directly (as opposed to linking with gcc
/ g++
etc.), LIBRARY_PATH
won't get used at all (unless it is part of the make
rule, say).
comment:10 in reply to: ↑ 9 Changed 7 years ago by
Replying to leif:
Setting
CPATH
,LIBRARY_PATH
etc. is certainly not equivalent to passing-I...
and-L...
on the command line, since directories specified explicitly are always searched first.Furthermore, Sage's paths should get prepended, not appended, at least if using this feature is supposed to "replace" explicitly specifying paths in commands /
CFLAGS
,CPPFLAGS
andLDFLAGS
, e.g. inspkg-install
scripts.And if
ld
is used directly (as opposed to linking withgcc
/g++
etc.),LIBRARY_PATH
won't get used at all (unless it is part of themake
rule, say).
Even if $SAGE_LOCAL/lib
got prepended to LIBRARY_PATH
, system folders might still get searched before those specified in LIBRARY_PATH
.
Follow-up: #14709
Looks good to me.