Package: fftw3
Severity: important
Version: 3.2.1-2
Tags: patch
User: [email protected]
Usertags: kfreebsd
Hi,
the current version fails to build on GNU/kFreeBSD.
It hangs in testsuite.
The current code uses ***shared*** POSIX semaphores,
they are not supported on GNU/kFreeBSD.
Only ***non-shared*** POSIX semaphores are supported.
The code does not check return code of sem_init(s, 1, 0),
the C library correctly returns ENOSYS in this case.
Please guard compile time selection of POSIX_SEMAPHORES as shown bellow.
Also, is sharing between ***processes*** really necessary ?
Please note (man sem_init):
The pshared argument indicates whether this semaphore is to be
shared between the threads of a process, or between processes.
It looks like sharing between ***threads of a process*** should be
sufficient. Given it would be true, just twice change sem_init(s,1,...)
into sem_init(s,0,...).
It would also be nice if you can inform upstream about this issue.
Thanks in advance
Petr
--- threads/threads.c
+++ threads/threads.c
@@ -34,7 +34,8 @@
#endif
/* imlementation of semaphores and mutexes: */
-#if (defined(_POSIX_SEMAPHORES) && (_POSIX_SEMAPHORES >= 200112L))
+#if (defined(_POSIX_SEMAPHORES) && (_POSIX_SEMAPHORES >= 200112L)) \
+ && defined (_POSIX_THREAD_PROCESS_SHARED) && (_POSIX_THREAD_PROCESS_SHARED
>= 200112L)
/* If optional POSIX semaphores are supported, use them to
implement both semaphores and mutexes. */
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]