#7095: os x 10.6 port -- numerous mysterious errors caused by weird "abort trap"
issue
-----------------------+----------------------------------------------------
   Reporter:  was      |       Owner:  tbd                                      
                
       Type:  defect   |      Status:  needs_review                             
                
   Priority:  blocker  |   Milestone:  sage-4.3.1                               
                
  Component:  porting  |    Keywords:                                           
                
Work_issues:           |      Author:  Craig Citro, John Palmieri, Francis 
Clarke, William Stein
   Upstream:  N/A      |    Reviewer:                                           
                
     Merged:           |  
-----------------------+----------------------------------------------------
Changes (by newvalueoldvalue):

  * priority:  critical => blocker
  * status:  new => needs_review
  * author:  => Craig Citro, John Palmieri, Francis Clarke, William Stein


Comment:

 Ok, I think I've got this one nailed down. To test, install the new spkgs
 here:

 http://sage.math.washington.edu/home/craigcitro/sage/SPKGs/python-2.6.4.p2.spkg
 
http://sage.math.washington.edu/home/craigcitro/sage/SPKGs/matplotlib-0.99.1.p4.spkg

 I'm also attaching a patch for the main sage repository which does a
 handful of minor cleanup (removes the big 10.6 warning at startup, fixes a
 few doctest failures and typos). To test, install python, then matplotlib,
 and do a `sage -br` or `sage -ba` (it will need to rebuild everything
 regardless, unfortunately). I've done this on my laptop and bsd.math, and
 all of the doctests mentioned in this ticket pass. I did a full `-long`
 test on my machine, and everything passes with this patch.

 Here's what was going on: we built Python with `MACOSX_DEPLOYMENT_TARGET`
 set to `10.3`. However, the OSX 10.3 headers are no longer available on
 the system, and this leads to Python and its dependencies get compiled
 with a mishmash of 10.4 and 10.6 headers. For most files, this isn't a
 problem, but Apple does some clever trickery with its system libraries to
 maintain multiple copies of system calls with different behavior. For
 instance, there are multiple copies of `fopen(1)` floating around, and
 which one you're using depends on which copy of `stdio.h` you include. So
 in the case of the matplotlib errors above, we ended up with some
 confusion between `_fopen` and `_fopen$DARWIN_EXTSN`, where we compiled
 `ft2font.o` looking for the first one, but we actually needed the
 functionality provided by the second one. The reason that William's patch
 for matplotlib was working is that he forced a recompile of `ft2font.o`
 (and `ft2font.so`) in an environment where the `MACOSX_DEPLOYMENT_TARGET`
 was set differently (i.e. not set at all), which led to the right symbols
 getting generated at compile time.

 The fix I added was to just set `MACOSX_DEPLOYMENT_TARGET` to the
 architecture we're building on at compile-time. This means that we can't
 use 10.6 binaries on 10.5, which I don't think anyone would feel safe
 about anyway. In theory, we could set it to 10.4, but I don't see why we
 would -- it doesn't really make sense for us, since we have a monolithic
 distribution.

 Many thanks to everyone who commented on this ticket -- in particular,
 John Palmieri's simplified matplotlib issue above (the one in pure python)
 made debugging this a snap (for some definition of "snap," I guess). I'm
 listing John and William as authors, since they were key, and Francis too,
 because he actually suggested the right fix above!

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7095#comment:36>
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