Bug#648993: ecl: FTBFS on hurd-i386

Pino Toscano pino at debian.org
Sun Feb 5 11:56:39 UTC 2012


Hi,


Alle mercoledì 16 novembre 2011, Svante Signell ha scritto:
> The attached patch fixes the FTBFS problems of ecl on GNU/Hurd. When
> native threads are enabled the "./ecl_min compile" command hangs.

Preface: libgc, used by ecl, makes use of the SIGUSR1 & SIGUSR2 signals 
(handling them on its own) to respectively suspend and & threads when 
the main thread needs to "stop the world" and garbage collect or so.

In ecl, src/c/unixint.d, there is the following function:
| static void
| install_process_interrupt_handler()
| {
| #ifdef SIGRTMIN
| # define DEFAULT_THREAD_INTERRUPT_SIGNAL SIGRTMIN + 2
| #else
| # define DEFAULT_THREAD_INTERRUPT_SIGNAL SIGUSR1
| #endif
| #if defined(ECL_THREADS) && !defined(ECL_MS_WINDOWS_HOST)
|   if (ecl_get_option(ECL_OPT_TRAP_INTERRUPT_SIGNAL)) {
|     int signal = ecl_get_option(ECL_OPT_THREAD_INTERRUPT_SIGNAL);
|     if (signal == 0) {
|       signal = DEFAULT_THREAD_INTERRUPT_SIGNAL;
|       ecl_set_option(ECL_OPT_THREAD_INTERRUPT_SIGNAL,
|                signal);
|     }
|     mysignal(signal, non_evil_signal_handler);
| #ifdef HAVE_SIGROCMASK
|     sigdelset(cl_core.default_sigmask, signal);
|     pthread_sigmask(SIG_SETMASK, cl_core.default_sigmask, NULL);
| #endif
|   }
| #endif
| }
given on Hurd we don't have realtime signals yet, SIGRTMIN (and 
SIGRTMAX) is not defined, which makes SIGUSR1 the signal being used for 
the inter-thread communication, overriding the SIGUSR1 handler set by 
libgc.

The solution (a bit of hack, actually) I have is use a different signal 
for DEFAULT_THREAD_INTERRUPT_SIGNAL (I chose SIGINFO, generally not used 
and not POSIX); this allowed me to compile ecl correctly. 
I attached the patch for it; note I don't think it should be forwarded 
upstream, as it is not clean and kind of working around the lack of 
realtime signals in Hurd.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hurd.diff
Type: text/x-patch
Size: 280 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-common-lisp-devel/attachments/20120205/aa1b8cdc/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-common-lisp-devel/attachments/20120205/aa1b8cdc/attachment.pgp>


More information about the pkg-common-lisp-devel mailing list