commit: c6f51f5dc2fe040900180ae160d6b1e0985f17b9 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Wed Jan 27 14:51:37 2021 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Wed Jan 27 15:10:03 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6f51f5d
dev-lang/python: Readd check for failed semaphore checks in 3.7+ Reintroduce the check for failing semaphore checks that result in broken multiprocessing in Python. This check has been mistakenly removed while removing support for USE=-threads. Closes: https://bugs.gentoo.org/496328 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-lang/python/python-3.7.9-r2.ebuild | 6 ++++++ dev-lang/python/python-3.8.7-r1.ebuild | 6 ++++++ dev-lang/python/python-3.9.1-r1.ebuild | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/dev-lang/python/python-3.7.9-r2.ebuild b/dev-lang/python/python-3.7.9-r2.ebuild index 2311ff2ac1b..e40f7af712b 100644 --- a/dev-lang/python/python-3.7.9-r2.ebuild +++ b/dev-lang/python/python-3.7.9-r2.ebuild @@ -167,6 +167,12 @@ src_configure() { ) OPT="" econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi } src_compile() { diff --git a/dev-lang/python/python-3.8.7-r1.ebuild b/dev-lang/python/python-3.8.7-r1.ebuild index af74b94b479..2aee3c92285 100644 --- a/dev-lang/python/python-3.8.7-r1.ebuild +++ b/dev-lang/python/python-3.8.7-r1.ebuild @@ -173,6 +173,12 @@ src_configure() { ) OPT="" econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi } src_compile() { diff --git a/dev-lang/python/python-3.9.1-r1.ebuild b/dev-lang/python/python-3.9.1-r1.ebuild index 5dbe3f9ffb9..250c0d4af54 100644 --- a/dev-lang/python/python-3.9.1-r1.ebuild +++ b/dev-lang/python/python-3.9.1-r1.ebuild @@ -184,6 +184,12 @@ src_configure() { ) OPT="" econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi } src_compile() {
