Created attachment 515222 [details, diff] php-ebuild-dep.patch --enable-shmop takes use of POSIX shared memory and relies on libc only (do not pull in dev-libs/mm). And it does nothing with --enable-maintainer-zts. --with-mm is only used by session support. It doesn't depend on --enable-shmop, vice versa. It's used by setting "session.save_handler = mm" in php.ini. I had looked up git history. It lies at https://gitweb.gentoo.org/repo/gentoo/historical.git/commit/dev-lang/php?id=eb65d6f4bc67946bfee172cffd01b696f6197076 . Commit message is simple. Don't know why such dependencies put in.
USE=threads will set --enable-maintainer-zts. I'll take a closer look at the patch soon, thanks!
(In reply to Michael Orlitzky from comment #1) > USE=threads will set --enable-maintainer-zts. > > I'll take a closer look at the patch soon, thanks! Ummm wranglers changed the title which didn't reflect my meaning precisely... My patch does: 1) Remove mutually exclusive relation between USE flag "sharedmem" and "threads" 2) Decouple USE flag "sharedmem" with new added "mm"(which responses for --with-mm and used by "session" only) Reasons are at my first post :)
Thanks, I think this makes sense. PHP has a shared memory extension in ext/shmop that better maps to the "sharedmem" USE flag, but currently we conflate that with the "mm" support that applies only to the session extension. Would you mind if I named the flag "session-mm" instead, to clarify? Afterwards, there is this line in our current ebuilds... sharedmem? ( !threads ) which could mean that --enable-maintainer-zts used to conflict with either ext/shmop, or --with-mm, because we used to enable them both with USE=sharedmem. I've done a quick check and I can't figure out what the problem was, though; PHP will happily let me do, ./configure --with-mm --enable-shmop --enable-maintainer-zts so I guess we'll get rid of that restriction like you suggest and see what happens =)
Ok, it turns out that "--with-mm" and "--enable-maintainer-zts" are incompatible: https://github.com/php/php-src/pull/3027 I'll add a different REQUIRED_USE for that.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6fd6c07c3c92aa7d27816749383c77ab025e07d commit c6fd6c07c3c92aa7d27816749383c77ab025e07d Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2018-01-19 16:35:41 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2018-01-20 05:01:15 +0000 dev-lang/php: new revisions to fix shared memory and threads support. Our PHP ebuilds used the "sharedmem" flag to conflate two ./configure flags, namely --enable-shmop and --with-mm. The former is the "shared memory" extension, and the latter enables the dev-libs/mm backend for session storage. This commit separates the two: * The old USE=sharedmem enables the shared memory extension * The new USE=session-mm enables the dev-libs/mm session backend The nascent session-mm flag depends on USE=session being set. Additionally, we had a REQUIRED_USE constraint prohibiting USE=sharedmem from being set at the same time as USE=threads. This turns out to be due to an incompatibility between the --with-mm and --enable-maintainer-zts flags, the latter of which is toggled by USE=threads. So in the new revisions, we have a REQUIRED_USE constraint that blocks USE=threads when USE=session-mm is set. Thanks are due to Xiami who reported and fixed all of these issues in bug 644922. Reported-by: Xiami <i@f2light.com> Closes: https://bugs.gentoo.org/644922 Package-Manager: Portage-2.3.13, Repoman-2.3.3 dev-lang/php/metadata.xml | 7 +- dev-lang/php/php-7.1.13-r1.ebuild | 721 +++++++++++++++++++++ .../php/{php-7.2.1.ebuild => php-7.2.1-r1.ebuild} | 8 +- 3 files changed, 731 insertions(+), 5 deletions(-)