[Newbie]Unexpected signal from FFI on Solaris 8
Alastair Reid
alastair@reid-consulting-uk.ltd.uk
Thu, 24 Apr 2003 12:36:16 +0100
[redirected to hugs-bugs]
Marco Vezzoli <marco.vezzoli@st.com> writes:
> Hi, I'm learning how to use ffi with hugs (latest version, on
> Solaris 8). I can compile this simple example without errors
> [...]
> Hugs loads correctly the module but fails one of the tests:
> [...]
Thanks for an excellent bug report. I was easily able to
repeat what you did!
On my machine (Linux/x86 running the CVS copy of Hugs),
things worked fine and I got this output:
Test> testIncr
2
Test> testTimes
times running 3
aaa
Test> [Leaving Hugs]
Looks like a bug. The major possibilities are:
1) The problem is a Solaris specific bug in Hugs.
This is highly likely since Sparcs have some peculiar calling
conventions and, more importantly, most testing has been on
my Linux/x86 and Windows/x86 machines.
2) The problem is a C compiler specific bug in Hugs.
Solaris boxes usually have a Sun compiler and it's
often true that gcc isn't installed, properly maintained
or the default compiler. Again, most testing has been with
gcc.
3) The problem was present in the official release but has been
fixed in the CVS repository.
I don't recall any fixes - but it's been a busy 6 months for me
since the release.
4) The problem is in your code.
I don't see an obvious problem.
Can someone who uses the standard release check whether the bug shows up
on solaris and/or non-solaris machines?
Can you (Marco) rerun ffihugs with the additional flag '+L"-v"'
to find out which compiler you're using:
ffihugs -P{Hugs}/libraries/:{Hugs}/oldlib +G +L"test.c" Test.hs +L"-v"
If you're using gcc, this will produce about 50 lines of output which
will start with something like:
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.3/specs
which says that I use gcc 3.2.3. If you're using another compiler,
the flag may be --version or -h or whatever.
--
Alastair Reid alastair@reid-consulting-uk.ltd.uk
Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/