Opened 6 years ago

Closed 6 years ago

#8481 closed bug (fixed)

Builing HEAD fails under OSX 10.9/Xcode5/clang at OSMem.c

Reported by: jloos Owned by: thoughtpolice
Priority: highest Milestone: 7.8.1
Component: Compiler Version: 7.7
Keywords: Cc: maxdaten@…
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Recent changes to OSMem.c brings a build failure on OS X 10.9

/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen           -O2    -c rts/posix/OSMem.c -o rts/dist/build/posix/OSMem.o

rts/posix/OSMem.c:274:23:
     error: use of undeclared identifier '_SC_PHYS_PAGES'
            ret = sysconf(_SC_PHYS_PAGES);
                          ^
1 error generated.
make[1]: *** [rts/dist/build/posix/OSMem.o] Error 1
make: *** [all] Error 2

looking at man sysconf:

These values also exist, but may not be standard:

     _SC_PHYS_PAGES
             The number of pages of physical memory.  Note that it is possible that the product of this value and the value of _SC_PAGESIZE
             will overflow a long in some configurations on a 32bit machine.

I bootstrapped with a homebrew ghc compiled with a homebrew gcc 4.8

Attachments (4)

config.log (200.3 KB) - added by jloos 6 years ago.
build.log (1.6 KB) - added by jloos 6 years ago.
settings (966 bytes) - added by jloos 6 years ago.
fingerprint.log (2.1 KB) - added by jloos 6 years ago.

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by jloos

Attachment: config.log added

Changed 6 years ago by jloos

Attachment: build.log added

Changed 6 years ago by jloos

Attachment: settings added

Changed 6 years ago by jloos

Attachment: fingerprint.log added

comment:1 Changed 6 years ago by jloos

Cc: maxdaten@… added
Version: 7.6.37.7

comment:2 Changed 6 years ago by thoughtpolice

Milestone: 7.8.1
Priority: normalhighest

I have a fix for this incoming.

comment:3 Changed 6 years ago by thoughtpolice

Owner: set to thoughtpolice

comment:4 Changed 6 years ago by Austin Seipp <austin@…>

In 619fd18de0700edb531db5f3836b034489460b88/ghc:

Fix getPhysicalMemorySize on OS X (#8481)

Darwin doesn't support _SC_PHYS_PAGES, but we can get the exact number
of bytes of physical memory via 'hw.memsize', so we use that instead.

Signed-off-by: Austin Seipp <austin@well-typed.com>

comment:5 Changed 6 years ago by thoughtpolice

Resolution: fixed
Status: newclosed

Should be fixed now - thanks!

Note: See TracTickets for help on using tickets.