
Donn Cave wrote:
On Mon, 02 Jun 2008 09:36:41 +0100 Simon Marlow
wrote: Donn Cave wrote: ...
20080531 and NetBSD-amd64 4.0, not so good:
GHCi, version 6.8.2.20080531: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Bad system call (core dumped)
SIGSYS appears to happen in select(), is all I could get out of gdb. Prior to the patch, it was the usual error. I guess the error in the linker was masking the SIGSYS in select(), because it occurred first. So now we need to figure out what is causing this SIGSYS.
Well, good news and bad news. The patch works - this was indeed a different problem, and with that out of the way ghci comes up and works well enough to pass some randomly selected tests from a testsuite - ghci, rts. This is 20080531 plus patch 2013.
The SIGSYS problem is an awkward issue between GHC and NetBSD, which I see has already been reported, #2305. C code compiled from /usr/include/signal.h links to __sigprocmask14, but libraries/base/System/Posix/Internals.hs links to sigprocmask because it misses out on the __RENAME magic in signal.h. That's a compatibility function that doesn't work out so well for ghci. I will take this up with the NetBSD ghc package maintainer. At worst, we can just hard-code the (incompatibility?) function names.
See my update to #2305 - it looks like we need a C wrapper for sigprocmask() in the base package. Would you like to make a ticket for this, or better still a patch (it's not too hard, there are plenty of other examples of this in base already)? Cheers, Simon