Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 388245 - New keywords for dev-php/pecl-apc-3.1.9-r2: ~{x86,x64}-macos
Summary: New keywords for dev-php/pecl-apc-3.1.9-r2: ~{x86,x64}-macos
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-23 18:29 UTC by nietonfir
Modified: 2014-11-21 15:04 UTC (History)
0 users

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


Attachments
eprefixified pecl-apc-3.1.9-r2.ebuild (pecl-apc-3.1.9-r2.ebuild,1.58 KB, text/plain)
2011-10-23 18:30 UTC, nietonfir
Details
ebuild diff (pecl-apc-3.1.9-r2.ebuild.diff,882 bytes, patch)
2011-10-23 18:30 UTC, nietonfir
Details | Diff
prefix patch for fixing apc_lock.h not choosing the right fallback (pecl-apc-3.1.9-apc_lock-prefix.patch,403 bytes, patch)
2011-10-23 18:33 UTC, nietonfir
Details | Diff
eprefixified php-ext-source-v2.eclass (php-ext-source-r2.eclass,10.75 KB, text/plain)
2011-10-23 18:36 UTC, nietonfir
Details
php-ext-source-r2.eclass diff (php-ext-source-r2.eclass.diff,1.97 KB, patch)
2011-10-23 18:43 UTC, nietonfir
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nietonfir 2011-10-23 18:29:31 UTC
The ebuild builds just fine after some minor adjustements to the ebuild itself,  the php-ext-source-r2 eclass, some upstream patch and local shared memory adjustements. ;)
Te
It seems to be that shared mutexes aren't supported on FreeBSD/OS X. The ebuild will build fine but will crash the PHP process as soon as a php page is requested. To fix this, the upstream patch ([1]) from [2] needs to be added.

Moreover, even with that patch, apc crashes the PHP process at startup because it can't allocate its shared memory segments at the default size of 32Mb ([3]). This is due to an OS X limitation: The default shared memory settings are way to conservative. Thus the user would need to tweak those to be able to use apc by setting saner values in /etc/sysctl.conf, e.g the 512MB settings config from [4]. This (needed change") could be communicated to the user via an elog message or a news item.

But I think that it may be easier to add the "mmap" USE-flag to the ~x86/~x64-macos profile (${EPREFIX}/usr/portage/profiles/prefix/darwin/macos/10.6/package.use) to circumvent that problem. And because of the not working mutexes, the default lock should be changed from "lock_pthreadmutex" to "lock_pthreadrw" as well (as everything performs better than the - fixed by the patch - file fallback [5]). ;)

[1] http://news.php.net/php.pecl.cvs/15669
[2] https://bugs.php.net/bug.php?id=59750
[3] http://php.net/manual/en/apc.configuration.php
[4] http://techjournal.318.com/mac-os-x-server/shared-memory-settings-explain/
[5] http://www.scribd.com/doc/88689/ApcFacebook
Comment 1 nietonfir 2011-10-23 18:30:15 UTC
Created attachment 290649 [details]
eprefixified pecl-apc-3.1.9-r2.ebuild
Comment 2 nietonfir 2011-10-23 18:30:54 UTC
Created attachment 290651 [details, diff]
ebuild diff
Comment 3 nietonfir 2011-10-23 18:33:56 UTC
Created attachment 290653 [details, diff]
prefix patch for fixing apc_lock.h not choosing the right fallback

This patch [1] comes from upstream [2].

[1] http://news.php.net/php.pecl.cvs/15669
[2] https://bugs.php.net/bug.php?id=59750
Comment 4 nietonfir 2011-10-23 18:36:08 UTC
Created attachment 290655 [details]
eprefixified php-ext-source-v2.eclass

This eclass was already submitted with #358987
Comment 5 nietonfir 2011-10-23 18:43:41 UTC
Created attachment 290657 [details, diff]
php-ext-source-r2.eclass diff
Comment 6 Pacho Ramos gentoo-dev 2014-11-21 15:04:29 UTC
was removed