#16017: Get libs.mwrank to compile on OS X 10.4
--------------------------------------+------------------------
       Reporter:  kcrisman            |        Owner:
           Type:  defect              |       Status:  new
       Priority:  blocker             |    Milestone:  sage-6.2
      Component:  packages: standard  |   Resolution:
       Keywords:                      |    Merged in:
        Authors:                      |    Reviewers:
Report Upstream:  N/A                 |  Work issues:
         Branch:                      |       Commit:
   Dependencies:                      |     Stopgaps:
--------------------------------------+------------------------

Comment (by leif):

 Replying to [comment:16 kcrisman]:
 > Yikes!  As long as I have a specific thing to try out on Monday I'll be
 happy - if you guys can agree on what I should try, I don't have infinite
 time with that machine ;-)

 There are plenty of things you ''could'' try... :-)

 But I think kiwifb and me agree on that you could first try to:

  * Restore `module_list.py` (at least remove `flint`, optionally also
 `pari`) from the "needed" libraries of the libs.mwrank Python extension
 module -- to test whether it works for ''one of'' the affected modules
 (you had to change about five IIRC)

  * Make sure libflint's `install_name` is still just `libflint.dylib`
 (otherwise `install_name_tool` will give an error):
 {{{
 #!sh
 $ cd $SAGE_ROOT
 $ otool -D local/lib/libflint.dylib
 local/lib/libflint.dylib:
 libflint.dylib
 }}}
  * Change the `install_name` (here called "id") to the library's absolute
 path:
 {{{
 #!sh
 $ install_name_tool -id `pwd`/local/lib/libflint.dylib
 local/lib/libflint.dylib
 }}}
  * Then either rebuild/reinstall eclib (which should now record libflint's
 absolute path), or -- simpler -- just change the recorded name (for FLINT)
 in `libec.0.dylib` manually:
 {{{
 #!sh
 $ otool -L local/lib/libec.0.dylib  # just to check libflint's name there
 local/lib/libec.0.dylib:
         <path to>/sage-6.2.beta5/local/lib/libec.0.dylib (compatibility
 version 1.0.0, current version 1.0.0)
         libflint.dylib (compatibility version 0.0.0, current version
 0.0.0)
         ...

 $ install_name_tool -change libflint.dylib `pwd`/local/lib/libflint.dylib
 local/lib/libec.0.dylib  # now really change the name

 $ otool -L local/lib/libec.0.dylib  # just to verify it changed
 local/lib/libec.0.dylib:
         <path to>/sage-6.2.beta5/local/lib/libec.0.dylib (compatibility
 version 1.0.0, current version 1.0.0)
         <path to>/sage-6.2.beta5/local/lib/libflint.dylib (compatibility
 version 0.0.0, current version 0.0.0)
         ...

 }}}

  * Pretend file modification to trigger the rebuild of the module(s):
 {{{
 #!sh
 $ touch src/sage/libs/mwrank/mwrank.pyx  # and more if you like

 $ ./sage -b  # and now rebuild
 }}}

 The linker should now be able to locate `libflint.dylib` referenced by
 `libec.dylib`.

 [[BR]]

 Optionally, repeat the steps analogously for `pari` (which in contrast is
 originally listed as a needed lib in `module_list.py`, so you'd have to
 really remove it rather than restoring the state of vanilla beta4 or
 beta5); just libpari's original `install_name` is a bit more complicated
 (with a non-existing temporary path):
 {{{
 #!sh
  $ otool -D local/lib/libpari-gmp.dylib
 local/lib/libpari-gmp.dylib:
 <path
 to>/sage-6.2.beta5/local/var/tmp/sage/build/pari-2.5.5b.p1/src/Odarwin-i386
 /libpari-gmp.dylib
 }}}
 (`libpari.dylib` is a symbolic link to `libpari-gmp.dylib`.)

 When you change the name (again in `libec.0.dylib`), you have to specify
 the '''full original (invalid) path''':
 {{{
 #!sh
 $ install_name_tool -change
 
/Users/leif/Sage/sage-6.2.beta5/local/var/tmp/sage/build/pari-2.5.5b.p1/src/Odarwin-i386
 /libpari-gmp.dylib `pwd`/local/lib/libpari-gmp.dylib
 local/lib/libec.0.dylib
 }}}
 (Just as an example -- note that the invalid path will differ on a
 PowerPC, and of course your `$SAGE_ROOT`.)

--
Ticket URL: <http://trac.sagemath.org/ticket/16017#comment:18>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to