<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection"><font face="Palatino, serif">Hello again, I’ve made some progress with this but am still struggling. I was able to successfully carry out the “make" step with grade hlc.gc without errors occurring, but have not been able to run ‘make install’ successfully. For now I am attempting to make do with the results of the “make” step. </font>
<div dir="auto"><font face="Palatino, serif"><br /></font></div>
<div dir="auto"><font face="Palatino, serif">Currently I am stuck on a linking error: when attempting to do the final step of linking a simple mercury program object file with `emcc -o hello.js hello_init.o hello.o /mercury-srcdist-20.01.1/library/libmer_std.a /mercury-srcdist-20.01.1/runtime/libmer_rt.a /mercury-srcdist-20.01.1/boehm_gc/libgc.a`, I get two errors about symbols “MR_box_int64” and “MR_box_uint64” being undefined. </font></div>
<div dir="auto"><font face="Palatino, serif"><br /></font></div>
<div dir="auto"><font face="Palatino, serif">These two symbols are defined in mercury.h, so I would expect them to be present in libmer_rt.a, but examining it with llvm-nm seems to indicate that they are not defined there or in fact in any of the other library files. Can anyone help point me in the direction of what I am missing? Does libmer_rt need to be built in a specific way to ensure that  </font><span style="caret-color: rgb(213, 218, 222); font-family: Palatino, serif; color: var(--textColor); background-color: var(--backgroundColor);">“MR_box_int64” and “MR_box_uint64” are included? </span></div>
</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 Jan 29, 2020, 3:27 PM -0800, Patrick Henning <path@fea.st>, wrote:<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div name="messageBodySection"><font face="Palatino, serif">Great, I’ll try both, thank you!</font></div>
<div name="messageReplySection">On Jan 28, 2020, 3:29 PM -0800, Peter Wang <novalazy@gmail.com>, wrote:<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">On Wed, 29 Jan 2020 10:13:47 +1100 (AEDT), Julien Fischer <jfischer@opturion.com> wrote:<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;"><br />
Hi Patrick,<br />
<br />
On Tue, 28 Jan 2020, Patrick Henning wrote:<br />
<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #d35400;">I am writing to request help with compiling Mercury code to<br />
WebAssembly via Emscripten. I believe this would involve using the<br />
Mercury compiler to compile the gc, runtime, standard library, etc, to<br />
c; and then using Emscripten to compile the c to WebAssembly code.<br />
From there it should be possibly to compile arbitrary Mercury code to<br />
c and then use Emscripten to compile that, linking in the previously<br />
prepared runtime and standard library and whatnot. <br />
<br />
Does anyone know if and how it would be possbile to carry out the<br />
first step of compiling all the Mercury preliminaries to c (similar to<br />
the functionality that the '-C' flag for mmc provides)?<br /></blockquote>
<br />
It's certainly possible to compile it all to C; that's how we build the<br />
source distribution.<br /></blockquote>
<br />
You can also do it with: mmc --make prog.cs<br />
<br />
Peter<br /></blockquote>
</div>
_______________________________________________<br />
developers mailing list<br />
developers@lists.mercurylang.org<br />
https://lists.mercurylang.org/listinfo/developers<br /></blockquote>
</div>
</body>
</html>