<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection"><font face="Palatino, serif">Does Mercury need `signal` in the absence of `sigaction`? If so, the porting may not be possible currently since neither of these are implemented for emscripten unfortunately.</font></div>
<div name="messageSignatureSection"><br />
<font face="Palatino, serif">Thank you,</font>
<div dir="auto"><font face="Palatino, serif">Patrick</font></div>
</div>
<div name="messageReplySection">On Mar 16, 2020, 3:16 AM -0700, Julien Fischer <jfischer@opturion.com>, wrote:<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;"><br />
Just realised the replies here weren't going through to the list.<br />
<br />
Julien.<br />
<br />
On Sun, 15 Mar 2020, Patrick Henning wrote:<br />
<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">Ok thats great to hear! I applied the patch and compilation succeeded, which is very encouraging. Unfortunately, there is an issue at run time, within the function “MR_init_conservative_GC”<br />
something relating to the Boehm GC has the following error: "GC_is_visible test failed”. I’m not sure whether this is a problem with Boehm GC, supposedly it is working fine with WASM (according<br />
to comments on this closed issue: https://github.com/ivmai/bdwgc/issues/163), but I think I will open a new issue on their Github to see if anyone has input on that.<br />
Regarding your question about integer size, for WASM, according to the spec integers are 32 bit (via https://webassembly.org/docs/c-and-c++/#platform-features). I believe that the configuration<br />
step for Mercury is picking up on this correctly; during config I get the following relevant message: "checking whether int is 32-bit… yes”. This being the case, perhaps it is odd that symbols<br />
relating to 64 bit integers are involved in compilation.<br />
<br />
Patrick<br />
On Mar 15, 2020, 6:01 AM -0700, Julien Fischer <jfischer@opturion.com>, wrote:<br />
<br />
Hi Patrick,<br />
<br />
The patch is now in rotd-2020-03-15 and also in the latest 20.01.2 beta.<br />
<br />
Cheers,<br />
Julien.<br />
<br />
<br />
On Sat, 14 Mar 2020, Patrick Henning wrote:<br />
<br />
I see, I’ll try applying that patch then. Will it eventually land in a future release?<br />
On Mar 14, 2020, 7:55 PM -0700, Julien Fischer <jfischer@opturion.com>, wrote:<br />
<br />
Hi Patrick,<br />
<br />
On Sat, 14 Mar 2020, Patrick Henning wrote:<br />
<br />
Hello again, I’ve made some progress with this but am still<br />
struggling. I was able to successfully carry out the “make" step with<br />
grade hlc.gc without errors occurring, but have not been able to run<br />
‘make install’ successfully. For now I am attempting to make do with<br />
the results of the “make” step. <br />
Currently I am stuck on a linking error: when attempting to do the<br />
final step of linking a simple mercury program object file with `emcc<br />
-o hello.js hello_init.o hello.o<br />
/mercury-srcdist-20.01.1/library/libmer_std.a<br />
/mercury-srcdist-20.01.1/runtime/libmer_rt.a<br />
/mercury-srcdist-20.01.1/boehm_gc/libgc.a`, I get two errors about<br />
symbols “MR_box_int64” and “MR_box_uint64” being undefined. <br />
<br />
These two symbols are defined in mercury.h, so I would expect them to<br />
be present in libmer_rt.a, but examining it with llvm-nm seems to<br />
indicate that they are not defined there or in fact in any of the<br />
other library files. Can anyone help point me in the direction of what<br />
I am missing? Does libmer_rt need to be built in a specific way to<br />
ensure that  “MR_box_int64” and “MR_box_uint64” are included? <br />
<br />
<br />
No, I think there is some code missing from the runtime. The attached<br />
(untested) patch to runtime/mercury.c should address it.<br />
<br />
Julien.<br />
<br />
<br />
<br /></blockquote>
</blockquote>
</div>
</body>
</html>