Issue 10062: Python 3.2 does not build on systems which do not have sem_timedwait (original) (raw)

Created on 2010-10-10 07:51 by akitada, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg118315 - (view) Author: Akira Kitada (akitada) * Date: 2010-10-10 07:51
Build fails on FreeBSD 4 due to the lack of sem_timedwait. """ gcc -pthread -Wl,--export-dynamic -o python Modules/python.o libpython3.2.a -lutil -lm libpython3.2.a(thread.o): In function `PyThread_acquire_lock_timed': /home/akitada/src/py3k/Python/thread_pthread.h:315: undefined reference to `sem_timedwait' gmake: *** [python] Error 1 """
msg118316 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-10-10 08:04
What happens if you comment out "# define USE_SEMAPHORES" in Python/thread_pthread.h?
msg118317 - (view) Author: Akira Kitada (akitada) * Date: 2010-10-10 08:12
It works fine with USE_SEMAPHORES commented out.
msg118318 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-10-10 08:19
What about this patch? Index: Python/thread_pthread.h =================================================================== --- Python/thread_pthread.h (révision 85348) +++ Python/thread_pthread.h (copie de travail) @@ -64,7 +64,8 @@ /* Whether or not to use semaphores directly rather than emulating them with * mutexes and condition variables: */ -#if defined(_POSIX_SEMAPHORES) && !defined(HAVE_BROKEN_POSIX_SEMAPHORES) +#if (defined(_POSIX_SEMAPHORES) && !defined(HAVE_BROKEN_POSIX_SEMAPHORES) && \ + defined(HAVE_SEM_TIMEDWAIT)) # define USE_SEMAPHORES #else # undef USE_SEMAPHORES
msg118320 - (view) Author: Akira Kitada (akitada) * Date: 2010-10-10 08:27
The patch does fix the build error. Thank you!
msg118321 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-10-10 08:37
Patch committed in r85352, thanks.
History
Date User Action Args
2022-04-11 14:57:07 admin set github: 54271
2010-10-10 08:37:43 pitrou set status: open -> closedresolution: fixedmessages: + stage: resolved
2010-10-10 08:27:39 akitada set messages: +
2010-10-10 08:19:30 pitrou set messages: +
2010-10-10 08:12:16 akitada set messages: +
2010-10-10 08:04:16 pitrou set nosy: + pitroumessages: +
2010-10-10 07:51:18 akitada create