Ticket #12076 (closed defect: fixed)
sage-location doesn't deal with packages after initialize_pkgconfig_files has run
| Reported by: | mariah | Owned by: | tbd |
|---|---|---|---|
| Priority: | major | Milestone: | sage-5.1 |
| Component: | scripts | Keywords: | sd40.5 |
| Cc: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | Dan Drake, Karl-Dieter Crisman |
| Authors: | Mike Hansen | Merged in: | sage-5.1.beta4 |
| Dependencies: | Stopgaps: |
Description (last modified by ddrake) (diff)
sage-4.7.2 with optional package libogg-1.1.4.spkg installed. Now when I move the sage tree I get:
eno% ./sage ---------------------------------------------------------------------- | Sage Version 4.7.2, Release Date: 2011-10-29 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- The Sage installation tree may have moved (from /home/mariah/sage/sage-4.7.2-x86_64-Linux-core2-fc to /home/mariah/sage/sage-4.7.2-x86_64-Linux-core2-fc-libogg-test). Changing various hardcoded paths... (Please wait at most a few minutes.) DO NOT INTERRUPT THIS. Error: sage_location: update_pkgconfig_files(): File "ogg.pc" doesn't contain a definition of SAGE_ROOT. Skipping it... Done resetting paths. sage:
Apply:
Both trac_12076.patch and trac_12076-2.patch.
Attachments
Change History
comment:1 Changed 12 months ago by mhansen
- Keywords sd40.5 added
- Status changed from new to needs_review
- Authors set to Mike Hansen
comment:2 Changed 12 months ago by ddrake
- Status changed from needs_review to needs_info
The patch here appears to fix the problem, but I notice that the ogg.pc file looks a little different from all the others:
drake@sagenb:~/s/y5.1.b0/local/lib/pkgconfig$ grep ^prefix= *
bdw-gc.pc:prefix=${SAGE_ROOT}/local
freetype2.pc:prefix=${SAGE_ROOT}/local
gnutls-extra.pc:prefix=${SAGE_ROOT}/local
gnutls.pc:prefix=${SAGE_ROOT}/local
gsl.pc:prefix=${SAGE_ROOT}/local
libpng12.pc:prefix=${SAGE_ROOT}/local
libpng.pc:prefix=${SAGE_ROOT}/local
m4ri.pc:prefix=${SAGE_ROOT}/local
ogg.pc:prefix=/home/drake/s/5.1b0/local
opencdk.pc:prefix=${SAGE_ROOT}/local
pynac.pc:prefix=${SAGE_ROOT}/local
python-2.7.pc:prefix=${SAGE_ROOT}/local
python.pc:prefix=${SAGE_ROOT}/local
sqlite3.pc:prefix=${SAGE_ROOT}/local
zlib.pc:prefix=${SAGE_ROOT}/local
Observe that only ogg.pc has the original SAGE_ROOT in its prefix; all other files have prefix in terms of SAGE_ROOT. Is that what we want? Is that okay?
comment:3 follow-up: ↓ 4 Changed 12 months ago by mhansen
After installing the patch, did you move the Sage directory and start it?
comment:4 in reply to: ↑ 3 Changed 12 months ago by ddrake
Replying to mhansen:
After installing the patch, did you move the Sage directory and start it?
I did. And the relocation appears to work properly. I'm mostly just curious about the difference in the .pc file.
comment:5 Changed 12 months ago by kcrisman
I can confirm this problem, and that this patch fixes it, and the patch seems right, just abstracting out something.
But Dan and I agree that
config = config.replace(SAGE_ROOT_absolute, "${SAGE_ROOT}")
seems to not be happening here for some reason. But maybe we are parsing it wrong.
comment:6 Changed 12 months ago by mhansen
The new patch, which applies on top of the previous one, should (really!) fix this issue.
comment:7 Changed 12 months ago by ddrake
- Status changed from needs_info to needs_review
- Reviewers set to Dan Drake
Whew! These two patches now fix the problem. To be sure, I'd like one more person to look at this, and then we'll do a positive review.
comment:9 Changed 12 months ago by ddrake
- Status changed from needs_review to positive_review
Karl-Dieter Crisman tried this and it works as expected. Positive review.
comment:10 Changed 12 months ago by ddrake
- Reviewers changed from Dan Drake to Dan Drake, Karl-Dieter Crisman
comment:11 Changed 12 months ago by jdemeyer
- Summary changed from optional package libogg-1.1.4.spkg causes error upon SAGE_ROOT relocation to sage-location doesn't deal with packages after initialize_pkgconfig_files has run
comment:13 Changed 11 months ago by jdemeyer
- Status changed from positive_review to closed
- Resolution set to fixed
- Merged in set to sage-5.1.beta4

