Opened 8 years ago

Closed 7 years ago

#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: Merged in: sage-5.1.beta4
Authors: Mike Hansen Reviewers: Dan Drake, Karl-Dieter Crisman
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by ddrake)

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 (2)

trac_12076.patch (5.9 KB) - added by mhansen 7 years ago.
trac_12076-2.patch (3.1 KB) - added by mhansen 7 years ago.

Download all attachments as: .zip

Change History (15)

Changed 7 years ago by mhansen

comment:1 Changed 7 years ago by mhansen

  • Authors set to Mike Hansen
  • Keywords sd40.5 added
  • Status changed from new to needs_review

comment:2 Changed 7 years 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: Changed 7 years ago by mhansen

After installing the patch, did you move the Sage directory and start it?

comment:4 in reply to: ↑ 3 Changed 7 years 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 7 years 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 7 years ago by mhansen

The new patch, which applies on top of the previous one, should (really!) fix this issue.

Changed 7 years ago by mhansen

comment:7 Changed 7 years ago by ddrake

  • Reviewers set to Dan Drake
  • Status changed from needs_info to needs_review

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:8 Changed 7 years ago by ddrake

  • Description modified (diff)

comment:9 Changed 7 years 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 7 years ago by ddrake

  • Reviewers changed from Dan Drake to Dan Drake, Karl-Dieter Crisman

comment:11 Changed 7 years 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:12 Changed 7 years ago by jdemeyer

  • Component changed from optional packages to scripts

comment:13 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.1.beta4
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.