
Thanks for all the input. I've decided to make sbcl bomb out when having :sb-threads and running on 2.4 or when NPTL is not available. (see patch) Thiemo Seufer wrote:
An additional sarge backport of a newer SBCL with threading disabled might be useful.
I've decided to have a seperate sarge24 (and hoary24) directory on the p.d.o repository with a sbcl without threading. Groetjes, Peter -- signature -at- pvaneynd.mailworks.org http://www.livejournal.com/users/pvaneynd/ "God, root, what is difference?" Pitr | "God is more forgiving." Dave Aronson| --- sbcl-0.9.3.36.orig/src/runtime/linux-os.c +++ sbcl-0.9.3.36/src/runtime/linux-os.c @@ -92,6 +92,21 @@ int linux_sparc_siginfo_bug = 0; int linux_no_threads_p = 0; +#ifdef LISP_FEATURE_SB_THREAD +int isnptl (void) +{ + size_t n = confstr (_CS_GNU_LIBPTHREAD_VERSION, NULL, 0); + if (n > 0) + { + char *buf = alloca (n); + confstr (_CS_GNU_LIBPTHREAD_VERSION, buf, n); + if (strstr (buf, "NPTL")) + return 1; + } + return 0; +} +#endif + void os_init(void) { @@ -121,9 +136,13 @@ } #ifdef LISP_FEATURE_SB_THREAD futex_wait(futex,-1); - if(errno==ENOSYS) linux_no_threads_p = 1; - if(linux_no_threads_p) - fprintf(stderr,"Linux with NPTL support (e.g. kernel 2.6 or newer) required for \nthread-enabled SBCL. Disabling thread support.\n\n"); + if(errno==ENOSYS) { + lose(stderr,"This version of sbcl is compiled with threading support, but your kernel is too old to support this.\n\ +Please use a more recent kernel or a version without threading support.\n"); + } + if(! isnptl()) { + lose("This version of sbcl only works correctly with the NPTL threading library. Please use a newer glibc, older sbcl or stop using LD_ASSUME_KERNEL"); + } #endif os_vm_page_size = getpagesize(); }