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:

Status badges

Description (last modified by ncarter)


I got a pre-built 10.6 Sage from here: 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.


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.


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)

trac-12285-darwin-memory-usage.patch (584 bytes) - added by ncarter 9 years ago.
patch making the one-line change described in the ticket

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by ncarter

patch making the one-line change described in the ticket

comment:1 Changed 9 years ago by ncarter

  • Description modified (diff)

comment:2 Changed 9 years ago by jason

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 ncarter

  • Status changed from new to needs_review

comment:4 Changed 9 years ago by jhpalmieri

Is this a duplicate of #11965? Or at least does the fix in #11965 fix your problem?

comment:5 Changed 9 years ago by ncarter

  • 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 jdemeyer

  • Resolution set to duplicate
  • Reviewers set to Nathan Carter
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.