#12285: Update darwin_memory_usage.c for Lion header files
-----------------------+----------------------------------------------------
Reporter: ncarter | Owner: GeorgSWeber
Type: defect | Status: new
Priority: major | Milestone: sage-4.8
Component: build | Keywords: sd35.5 osx lion
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
-----------------------+----------------------------------------------------
Description changed by ncarter:
Old description:
> Problem:
>
> I got a pre-built 10.6 Sage from here:
> [http://www.google.com/url?sa=D&q=http://wstein.org/home/wstein/tmp/sage-4.7.3.alpha1-x86_64-Darwin.dmg&usg
> =AFQjCNGZr8xE-ECiC8ecV7TPI5nOamLiNQ]. Even though I'm on Lion, this
> installs and runs correctly.
> But when I tried {{{./sage -b}}}, it fails when compiling
> {{{devel/sage/misc/darwin_memory_usage.c}}}.
>
> Details:
>
> The error is that that file contains the line {{{#include
> <mach/task_info.h>}}}, which, on Lion, assumes that the symbol
> {{{vm_extmod_statistics_data_t}}} has already been defined.
>
> Fix:
>
> To define that symbol, we need to first {{{#include
> <mach/vm_statistics.h>}}}. It is simple to insert such a line at the
> beginning of {{{darwin_memory_usage.c}}}, right before the first
> {{{#include}}}. Doing so fixes the problem. Jason Grout was kind enough
> to test the same change on his 10.6 machine, and verify that the change
> doesn't screw up the build there.
New description:
Problem:
I got a pre-built 10.6 Sage from here:
[http://www.google.com/url?sa=D&q=http://wstein.org/home/wstein/tmp/sage-4.7.3.alpha1-x86_64-Darwin.dmg&usg
=AFQjCNGZr8xE-ECiC8ecV7TPI5nOamLiNQ]. Even though I'm on Lion, this
installs and runs correctly.
But when I tried {{{./sage -b}}}, it fails when compiling
{{{devel/sage/misc/darwin_memory_usage.c}}}.
Details:
The error is that that file contains the line {{{#include
<mach/task_info.h>}}}, which, on Lion, assumes that the symbol
{{{vm_extmod_statistics_data_t}}} has already been defined.
Fix:
To define that symbol, we need to first {{{#include
<mach/vm_statistics.h>}}}. It is simple to insert such a line at the
beginning of {{{darwin_memory_usage.c}}}, right before the first
{{{#include}}}. Doing so fixes the problem. See tiny attached patch.
Jason Grout was kind enough to test the same change on his 10.6 machine,
and verify that the change doesn't screw up the build there.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12285#comment:1>
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.