Opened 10 years ago

Closed 10 years ago

#13407 closed defect (fixed)

Move sage-make_relative to sage-location

Reported by: jdemeyer Owned by: GeorgSWeber
Priority: minor Milestone: sage-5.4.1
Component: build Keywords:
Cc: Merged in: sage-5.4.1.rc1
Authors: Jeroen Demeyer Reviewers: Dmitrii Pasechnik
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #13397, #13452 Stopgaps:

Status badges

Description (last modified by jdemeyer)

There is a rare race condition associated to sage-make_relative: when a file is open for writing, it cannot be executed (you get a "Text file busy" error). Since the sage-make_relative Python script opens all files in $SAGE_LOCAL/bin for writing, it can happen that a Sage build fails.

Example from install.log of a failed parallel build:

sage_fortran -fPIC  -c sposv.f -o sposv.o
sage_fortran -fPIC  -c sposvx.f -o sposvx.o
sage_fortran -fPIC  -c spotf2.f -o spotf2.o
Making Python scripts relocatable...
sage_fortran -fPIC  -c spotrf.f -o spotrf.o
sage_fortran -fPIC  -c spotri.f -o spotri.o
sage_fortran -fPIC  -c spotrs.f -o spotrs.o
sage_fortran -fPIC  -c sppcon.f -o sppcon.o
make[2]: execvp: sage_fortran: Text file busy
make[2]: *** [sppcon.o] Error 127
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/buildbot/build/sage/lena-1/lena_upgrade_4.7.1/build/sage-5.3.rc1/spkg/build/lapack-20071123.p2/src/SRC'
make[1]: *** [lapacklib] Error 2
make[1]: Leaving directory `/home/buildbot/build/sage/lena-1/lena_upgrade_4.7.1/build/sage-5.3.rc1/spkg/build/lapack-20071123.p2/src'
Error compiling lapack.

The best solution is to move sage-make_relative to sage-location: the latter script is intented precisely to fix relocation issues. It would also be faster, as currently every file in $SAGE_LOCAL/bin is checked after every package is installed. It also means we need a mechanism to force a sage-location run even when the installation tree hasn't moved. For this, I propose to use the existence of the file

$SAGE_LOCAL/lib/sage-force-relocate.txt

Apply:

  1. 13407_make_relative.patch to the scripts repository.
  2. 13407_spkg.patch to the SAGE_ROOT repository.

Attachments (2)

13407_make_relative.patch (4.3 KB) - added by jdemeyer 10 years ago.
13407_spkg.patch (1.0 KB) - added by jdemeyer 10 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 10 years ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 10 years ago by jdemeyer

  • Dependencies set to #13397, #13452
  • Description modified (diff)

Changed 10 years ago by jdemeyer

Changed 10 years ago by jdemeyer

comment:3 Changed 10 years ago by jdemeyer

  • Description modified (diff)

comment:4 Changed 10 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Status changed from new to needs_review

comment:5 Changed 10 years ago by dimpase

  • Status changed from needs_review to positive_review

all seems to make sense, and it does work.

comment:6 Changed 10 years ago by jdemeyer

  • Reviewers set to Dmitrii Pasechnik

comment:7 Changed 10 years ago by jdemeyer

  • Milestone changed from sage-5.4 to sage-5.4.1

comment:8 Changed 10 years ago by jdemeyer

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