Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 404207 - check-reqs.eclass needs porting for non-Linux platforms
Summary: check-reqs.eclass needs porting for non-Linux platforms
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All OS X
: Normal minor (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-16 23:49 UTC by MATSUI Tetsushi
Modified: 2021-07-27 05:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MATSUI Tetsushi 2012-02-16 23:49:55 UTC
I'm compiling pypy-1.8 with ecopied ebuild on old MacBook with 1GiB RAM.  The ebuild checks whether the memory size is larger than a limit (2GiB) or not.  So, the emerge should have been stopped at the check (or have only warned?, I'm not sure), but it just have passed there with saying OK.

The cause of failure is that, on Linux check-reqs.eclass checks the memory size with /proc/meminfo, which presumably returns memory size in kibibytes, but on the platforms without /proc it checks with "sysctl hw.physmem", which returns memory size in bytes.  Thus, the value obtained by sysctl should be divided by 1024.

Additional information: on OS X, hw.physmem is defined as a 32-bit integer and sysctl hw.physmem returns at most 2^31 = 2GiB, even the machine has more. If you are serious, you have to use hw.memsize.
Comment 1 Fabian Groffen gentoo-dev 2012-02-19 13:27:22 UTC
it's more difficult, since freebsd does it again different...