Opened 9 years ago
Closed 9 years ago
#12285 closed defect (duplicate)
Update darwin_memory_usage.c for Lion header files
Reported by: | ncarter | Owned by: | GeorgSWeber |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | build | Keywords: | sd35.5 osx lion |
Cc: | Merged in: | ||
Authors: | Reviewers: | Nathan Carter | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
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.
Attachments (1)
Change History (7)
Changed 9 years ago by
comment:1 Changed 9 years ago by
- Description modified (diff)
comment:2 Changed 9 years ago by
Looks good for OSX 10.6 (since sage -b is successful with this change and then sage starts up). Someone with 10.7 should probably also review this.
comment:3 Changed 9 years ago by
- Status changed from new to needs_review
comment:4 Changed 9 years ago by
comment:5 Changed 9 years ago by
- Milestone changed from sage-4.8 to sage-duplicate/invalid/wontfix
- Status changed from needs_review to positive_review
You are correct, that is a better fix.
comment:6 Changed 9 years ago by
- Resolution set to duplicate
- Reviewers set to Nathan Carter
- Status changed from positive_review to closed
patch making the one-line change described in the ticket