From: Vladimir T. <vtz...@gm...> - 2009-03-20 21:45:26
|
On Thu, 19 Mar 2009 21:02:33 +0200, Aleksej Saushev <as...@in...> wrote: > Aleksej Saushev <as...@in...> writes: > >> mv lispimag.mem interpreted.mem >> ./lisp.run -B . -N locale -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc -m >> 2MW -M interpreted.mem -q -c compiler.lisp -o ./ >> ;; Compiling file /h/obj/wip/clisp/work/clisp/src/compiler.lisp >> ...Segmentation fault (core dumped) >> *** Error code 139 This particular problem is caused by the default thread implementation on FreeBSD 6 - libpthread. Since I am not familiar with FreeBSD - here is what I learned today - correct me if I am wrong. There are three threads implementations on FreeBSD 6 - libpthread (user space threads - M:1), libthr (kernel threads 1:1) and kse (N:M). libpthread is the default on FreeBSD 6 and causes the above. I am not sure for the exact reason but there are other programs that experience similar problems with it. libpthread looks like deprecated in FreeBSD 7 and the default one is libthr (kernel threads 1:1 - the same as NPTL on linux). With libthr clisp "almost" builds on both FreeBSD 6 and 7. "Almost" since it builds the boot image and hangs on building the linking sets. Also it hangs on check-tests. Not sure what causes the hanging (it happens inside kernel mutex lock) - now I am looking on it - there are reports for similar problem. In order to build with libthr on FreeBSD 6 (on 7 it is default) there are two options: 1. remove from CFLAGS -pthread and add -lthr linker flag (seems the better way). 2. use /etc/libmap.conf to map libpthread.so to libthr.so (there are bug reports stating that symbols from both libs get mixed and bad things happen). Have not tried kse, since 1:1 threading is what we have on linux and win32. Vladimir |