Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13395 closed defect (fixed)

Fix upgrading with GCC

Reported by: jdemeyer Owned by: jdemeyer
Priority: blocker Milestone: sage-5.4
Component: build Keywords:
Cc: leif Merged in: sage-5.4.beta1
Authors: Jeroen Demeyer Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

The GCC spkg broke upgrading from old Sage versions because of the LD_LIBRARY_PATH not containing lib32 or lib64. We can fix this using Leif's idea of sage-env versioning (see #10469).

We should also rebuild GCC if gcc was already installed before.

Attachments (1)

13395_upgrade.patch (9.1 KB) - added by jdemeyer 7 years ago.

Download all attachments as: .zip

Change History (24)

comment:1 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-5.3 to sage-5.4
  • Priority changed from critical to blocker

comment:2 Changed 7 years ago by jdemeyer

  • Description modified (diff)
  • Summary changed from Fix upgrading to Fix upgrading and relocation with GCC

comment:3 Changed 7 years ago by jdemeyer

  • Description modified (diff)
  • Summary changed from Fix upgrading and relocation with GCC to Fix upgrading with GCC

comment:4 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:5 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-5.4 to sage-5.3
  • Status changed from new to needs_review

comment:6 Changed 7 years ago by jdemeyer

  • Authors set to Jeroen Demeyer

comment:7 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:8 Changed 7 years ago by jdemeyer

  • Status changed from needs_review to needs_work

comment:9 Changed 7 years ago by jdemeyer

  • Cc leif added
  • Description modified (diff)
  • Owner changed from GeorgSWeber to jdemeyer

comment:10 Changed 7 years ago by jdemeyer

  • Description modified (diff)
  • Status changed from needs_work to needs_review

comment:11 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-5.3 to sage-5.4

comment:12 follow-up: Changed 7 years ago by jhpalmieri

Why doesn't touching spkg/installed/gcc-* before going an upgrade cause all packages that depend on gcc to be rebuilt? Oh, I see, nothing actually depends on gcc.

I've tried upgrading using this patch, and several times I've gotten an error with R:

mkdir /Users/palmieri/Desktop/Sage_stuff/sage_builds/sage-5.X-upgrade/local/lib/R/include
mkdir: /Users/palmieri/Desktop/Sage_stuff/sage_builds/sage-5.X-upgrade/local/lib/R/include: File exists

And sure enough, there is a *file* (not a directory) SAGE_LOCAL/lib/R/include. It's not from the previous installation, since the spkg-install file deletes SAGE_LOCAL/lib/R/. I'm guessing that it's not related to this ticket. Have you ever seen this before?

Version 0, edited 7 years ago by jhpalmieri (next)

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

If sage-env gets sourced more than once (as can happen during upgrading with this patch), we will get duplicate entries in $PATH, $LD_LIBRARY_PATH, and others. I don't think this is an issue, but it was one of the points of #10469. Should I be concerned about this?

comment:14 Changed 7 years ago by jhpalmieri

In the comments about versioning in sage-env, is it worth mentioning the motivation behind it, or are the pointers to the tickets good enough? We don't want people updating the version needlessly, so maybe add a sentence or two explaining when it's necessary (and when it's not?) to change the version number.

comment:15 follow-up: Changed 7 years ago by jhpalmieri

Regarding the problem with R, I see it without this patch also. This is on OS X 10.7, for what that's worth. The file src/include/libintl.h from the R spkg ends up copied to the file SAGE_LOCAL/lib/R/include.

Last edited 7 years ago by jhpalmieri (previous) (diff)

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

Replying to jhpalmieri:

And sure enough, there is a file (not a directory) SAGE_LOCAL/lib/R/include. It's not from the previous installation, since the spkg-install file deletes SAGE_LOCAL/lib/R/. I'm guessing that it's not related to this ticket. Have you ever seen this before?

Yes, I only ever saw it on OS X though but I haven't investigated further.

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

Replying to jhpalmieri:

If sage-env gets sourced more than once (as can happen during upgrading with this patch), we will get duplicate entries in $PATH, $LD_LIBRARY_PATH, and others.

True.

I don't think this is an issue, but it was one of the points of #10469. Should I be concerned about this?

Personally, I am not concerned about this. I don't see a problem (apart from efficiency perhaps) with having duplicate PATH or LD_LIBRARY_PATH entries. Also note that #10469 did not point out a particular problem that this causes.

Also remember that this can happen only during upgrading.

comment:18 Changed 7 years ago by jdemeyer

Made a comment-only change to the patch. I made a potentially controversial edit to the list of authors, let me know what you think (we could also get rid of the "authors" list completely).

comment:19 Changed 7 years ago by jhpalmieri

  • Reviewers set to John Palmieri
  • Status changed from needs_review to positive_review

Looks good to me. If you feel like one more minor edit, in line 11 of sage-env, change "intented" to "intended". Obviously not a big deal.

comment:20 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.4.beta1
  • Resolution set to fixed
  • Status changed from positive_review to closed

Changed 7 years ago by jdemeyer

comment:21 in reply to: ↑ 15 ; follow-up: Changed 7 years ago by kcrisman

Regarding the problem with R, I see it without this patch also. This is on OS X 10.7, for what that's worth. The file src/include/libintl.h from the R spkg ends up copied to the file SAGE_LOCAL/lib/R/include.

For the record, I have seen this too now, same type of system.

comment:22 in reply to: ↑ 21 ; follow-up: Changed 7 years ago by jhpalmieri

Replying to kcrisman:

Regarding the problem with R, I see it without this patch also. This is on OS X 10.7, for what that's worth. The file src/include/libintl.h from the R spkg ends up copied to the file SAGE_LOCAL/lib/R/include.

For the record, I have seen this too now, same type of system.

Also for the record, it's fixed at #13428.

comment:23 in reply to: ↑ 22 Changed 7 years ago by kcrisman

For the record, I have seen this too now, same type of system.

Also for the record, it's fixed at #13428.

Great, thanks!

Note: See TracTickets for help on using tickets.