Opened 10 years ago

Closed 10 years ago

#13689 closed defect (fixed)

Fix upgrading from relocated Sage with GCC

Reported by: Jeroen Demeyer Owned by: Georg S. Weber
Priority: blocker Milestone: sage-5.4.1
Component: build Keywords:
Cc: Leif Leonhardy Merged in: sage-5.4.1.rc1
Authors: Jeroen Demeyer Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Jeroen Demeyer)

Older versions of sage-location (before #13397) do not properly fix GCC, leading to problems with upgrading from sage-5.3 if GCC was installed and Sage was relocated after building GCC but before upgrading. The problem shows up during the build of LinBox from #12883:

make[6]: Entering directory `/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/spkg/build/linbox-1.3.2/src/linbox/util'
/bin/bash ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../linbox -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include -DDISABLE_COMMENTATOR -O2    -g -DNDEBUG -U_LB_DEBUG -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include  -g -fPIC -c -o error.lo error.C
/bin/bash ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../linbox -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include -DDISABLE_COMMENTATOR -O2    -g -DNDEBUG -U_LB_DEBUG -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include  -g -fPIC -c -o debug.lo debug.C
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../linbox -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include -DDISABLE_COMMENTATOR -O2 -g -DNDEBUG -U_LB_DEBUG -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include -g -fPIC -c debug.C  -fPIC -DPIC -o .libs/debug.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../linbox -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include -DDISABLE_COMMENTATOR -O2 -g -DNDEBUG -U_LB_DEBUG -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include -g -fPIC -c error.C  -fPIC -DPIC -o .libs/error.o
/bin/bash ../../libtool --tag=CXX   --mode=link g++ -O2    -g -DNDEBUG -U_LB_DEBUG -I/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/include  -g -fPIC -L/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/lib -lgivaro  -L/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/lib -lcblas -latlas -L/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/lib -lcblas -latlas -o libutil.la  error.lo debug.lo  -L/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/local/lib -lgivaro
/bin/grep: /home/buildbot/sage-5.3/local/lib/../lib64/libstdc++.la: No such file or directory
/bin/sed: can't read /home/buildbot/sage-5.3/local/lib/../lib64/libstdc++.la: No such file or directory
libtool: link: `/home/buildbot/sage-5.3/local/lib/../lib64/libstdc++.la' is not a valid libtool archive
make[6]: *** [libutil.la] Error 1
make[6]: Leaving directory `/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/spkg/build/linbox-1.3.2/src/linbox/util'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/spkg/build/linbox-1.3.2/src/linbox/util'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/spkg/build/linbox-1.3.2/src/linbox'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/spkg/build/linbox-1.3.2/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/release/buildbot/sage/sage-1/sage_upgrade_5.3/build/sage-5.4.1.rc0/spkg/build/linbox-1.3.2/src'

Blocker because it breaks upgrading from sage-5.3.

Attachments (1)

13689_relocate_gcc.patch (1.1 KB) - added by Jeroen Demeyer 10 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 10 years ago by Leif Leonhardy

Cc: Leif Leonhardy added
Description: modified (diff)

comment:2 Changed 10 years ago by Jeroen Demeyer

Description: modified (diff)

comment:3 Changed 10 years ago by Jeroen Demeyer

Summary: Rebuild GCC when Sage has been movedFix upgrading from relocated Sage with GCC

Changed 10 years ago by Jeroen Demeyer

Attachment: 13689_relocate_gcc.patch added

comment:4 Changed 10 years ago by Jeroen Demeyer

Status: newneeds_review

comment:5 Changed 10 years ago by Jeroen Demeyer

Description: modified (diff)

comment:6 Changed 10 years ago by Jeroen Demeyer

Description: modified (diff)

comment:7 Changed 10 years ago by John Palmieri

I haven't been able to reproduce a problem by following the directions, but I can see that some paths are wrong in local/lib64/*.la files, and they're fixed after upgrading from a version of Sage which includes this patch. For libgfortran.la, the path for dependency_libs is still wrong, but all of the libdir paths are okay. Does the wrong path for dependency_libs actually matter?

comment:8 in reply to:  7 ; Changed 10 years ago by Jeroen Demeyer

Replying to jhpalmieri:

I haven't been able to reproduce a problem by following the directions

Which exact version of Sage did you try?

Does the wrong path for dependency_libs actually matter?

Not sure. The main point is that this patch makes upgrading work.

comment:9 Changed 10 years ago by Jeroen Demeyer

Also: with #13452 and #13407, all paths would be fixed at least after the build.

comment:10 in reply to:  8 ; Changed 10 years ago by John Palmieri

Replying to jdemeyer:

Replying to jhpalmieri:

I haven't been able to reproduce a problem by following the directions

Which exact version of Sage did you try?

I built Sage 5.3 from scratch, moved the build directory, did ./sage -f spkg/standard/ppl-... and ./sage -f spkg/standard/linbox-.... No obvious errors. I also tried doing ./sage -upgrade ..., upgrading from 5.4-rc4. This was all on sage.math.

Also: with #13452 and #13407, all paths would be fixed at least after the build.

I'm not sure about that. When you upgrade, the old sage-location script is run so sage-current-location.txt is changed but a few paths aren't, so how can those old paths ever be fixed?

comment:11 in reply to:  10 Changed 10 years ago by Jeroen Demeyer

Description: modified (diff)

comment:12 in reply to:  10 Changed 10 years ago by Jeroen Demeyer

Description: modified (diff)

Replying to jhpalmieri:

I'm not sure about that. When you upgrade, the old sage-location script is run so sage-current-location.txt is changed but a few paths aren't, so how can those old paths ever be fixed?

Because I changed sage-location in #13407 to always relocate after the build is finished, even if no paths have changed.

Last edited 10 years ago by Jeroen Demeyer (previous) (diff)

comment:13 Changed 10 years ago by John Palmieri

Reviewers: John Palmieri
Status: needs_reviewpositive_review

I guess I don't see anything which changes the dependency_libs path, before or after #13407. But that's not new to this ticket, so we won't worry about it.

The patch does fix upgrading, though, at least on sage.math. (At first I didn't see the problem because I built Sage 5.3, then copied the installation elsewhere, so the hard-coded path referred to a still-existing file. When I moved the installation instead, upgrading failed unless I upgraded from a copy of 5.4.rc4 with this patch applied.)

comment:14 in reply to:  13 Changed 10 years ago by Jeroen Demeyer

Replying to jhpalmieri:

I guess I don't see anything which changes the dependency_libs path, before or after #13407.

sage-location doesn't specifically change dependency_libs, it changes the .la file as a whole.

comment:15 Changed 10 years ago by John Palmieri

If you build sage 5.3, then move the installation, then upgrade, then dependency_libs is not fixed. The reason is that files in lib64 aren't touched by the old version of sage-location, just spkg/install, and spkg/install only fixes libdir. Then later, when sage-location is run, it looks for the path in libdir, then changes other paths in that file to match them. But once the path for dependency_libs is not in SAGE_ROOT and is not related to the path for libdir, sage-location can't fix that path.

In practice, I applied the patches here, #13407, and #13452, to sage-5.4.rc4, built a copy of sage 5.3, moved it, and upgraded it from the patched 5.4.rc4. The path for dependency_libs was not fixed.

comment:16 Changed 10 years ago by Jeroen Demeyer

Merged in: sage-5.4.1.rc1
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.