Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 434716 - dev-lang/python:2.7 - POSIX_SEMAPHORES_NOT_ENABLED 1 in /usr/include/python2.7/pyconfig.h
Summary: dev-lang/python:2.7 - POSIX_SEMAPHORES_NOT_ENABLED 1 in /usr/include/python2....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-11 10:09 UTC by Andreas Nüßlein
Modified: 2014-01-01 16:45 UTC (History)
0 users

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 Andreas Nüßlein 2012-09-11 10:09:59 UTC
Recently I ran into a problem, when trying to install dev-python/billiard . 
It said something about semaphores not being available on my system
As +Samuele Santi pointed out, one could uncomment the line 
#define POSIX_SEMAPHORES_NOT_ENABLED 1
in /usr/include/python2.7/pyconfig.h

Funny enough, reinstalling python:2.7 also turned this line into
/* #undef POSIX_SEMAPHORES_NOT_ENABLED */

Ergo: it's enough to re-merge python:2.7, but we thought it's worth mentioning to developers and others who run into this bug.

Reproducible: Always

Steps to Reproduce:
1. Have a somewhat recent build of Gentoo (amd64) with python:2.7
2. Try to merge dev-python/billiard 

Actual Results:  
SEM_HANDLE not defined or something like that.

Expected Results:  
happy merge
Comment 1 Tully Gray 2013-05-15 19:03:55 UTC
Just had a sandbox violation trying to build Python 3.2, the failed conftest checks for semaphores and because I did not have tmpfs mounted on /dev/shm, "sem_open" was using the only tmpfs mount which was /run.  Not sure if this is relevant here, but any extra info is good info.  =)
Comment 2 Marien Zwart (RETIRED) gentoo-dev 2013-05-16 09:16:53 UTC
I've come across this before (and so have others, see bug #462542, but I think there's at least one other that I actually commented on). The short version is that with current glibc you need to have a tmpfs mounted on /dev/shm for shared memory (and some other bits) to work. I think only more recent glibcs have the fallback described in comment #1.

For the original reporter: please check what /dev/shm is. It should be on a tmpfs, or possibly a symlink to a tmpfs.
Comment 3 Mike Gilbert gentoo-dev 2014-01-01 16:45:08 UTC
I added a check to src_configure for this. See bug 496328.