#13407: Move sage-make_relative to sage-location
----------------------------------+-----------------------------------------
       Reporter:  jdemeyer        |         Owner:  GeorgSWeber
           Type:  defect          |        Status:  new        
       Priority:  minor           |     Milestone:  sage-5.4   
      Component:  build           |    Resolution:             
       Keywords:                  |   Work issues:             
Report Upstream:  N/A             |     Reviewers:             
        Authors:                  |     Merged in:             
   Dependencies:  #13397, #13452  |      Stopgaps:             
----------------------------------+-----------------------------------------
Changes (by jdemeyer):

  * dependencies:  => #13397, #13452


Old description:

> 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 most obvious solution is to fix `sage-make_relative` to first open
> the file only for reading and then reopen it for writing only if needed.
>
> However, I think a better 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.

New description:

 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
 }}}

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13407#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to