[mercury-users] SegV on ROTD2006-04-26.sun.sparc.solaris2.8 on pointer passing with cc

Julien Fischer juliensf at cs.mu.OZ.AU
Tue Jun 13 12:11:45 AEST 2006

On Mon, 12 Jun 2006 doug.auclair at logicaltypes.com wrote:

> Dear all,
> I'd like to use mercury on the Sparc with the Solaris C compiler (project
> resources and requirements force this play).  I can get C functions that
> accept and return primitive simple types (I've tried int), but when I, for
> example use the io library, it SegV's with an unuseful stack dump (the stack
> frames are all simply memory pointers with no file or line information),
> e.g., this following function:
> :- pragma export(print_num(in, di, uo)).
> :- pred print_num(int::in, io::di, io::uo) is det.
> print_num(Int) --> write(Int).
> breaks the C program calling it:
> int main(int argc, char* argv[])
> {
>   print_num(5);
> }
> I followed the user-man's instructions to mercury_config for the Solaris C
> compiler and statically linked in the mercury runtime, etc (i.e. I used the
> libmer_<foo>.a files).

Has the runtime been initialised?

mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe

More information about the users mailing list