Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix upgrading from relocated Sage with GCC #13689

Closed
jdemeyer opened this issue Nov 6, 2012 · 17 comments
Closed

Fix upgrading from relocated Sage with GCC #13689

jdemeyer opened this issue Nov 6, 2012 · 17 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Nov 6, 2012

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.

CC: @nexttime

Component: build

Author: Jeroen Demeyer

Reviewer: John Palmieri

Merged: sage-5.4.1.rc1

Issue created by migration from https://trac.sagemath.org/ticket/13689

@nexttime

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer changed the title Rebuild GCC when Sage has been moved Fix upgrading from relocated Sage with GCC Nov 7, 2012
@jdemeyer
Copy link
Author

jdemeyer commented Nov 8, 2012

Attachment: 13689_relocate_gcc.patch.gz

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jhpalmieri
Copy link
Member

comment:7

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?

@jdemeyer
Copy link
Author

comment:8

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.

@jdemeyer
Copy link
Author

comment:9

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

@jhpalmieri
Copy link
Member

comment:10

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?

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

comment:12

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.

@jhpalmieri
Copy link
Member

Reviewer: John Palmieri

@jhpalmieri
Copy link
Member

comment:13

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.)

@jdemeyer
Copy link
Author

comment:14

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.

@jhpalmieri
Copy link
Member

comment:15

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.

@jdemeyer
Copy link
Author

Merged: sage-5.4.1.rc1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants