[m-users.] Error in building mercury 20.06.1

Stephen Brady stephen at fac.tt
Mon May 3 03:36:44 AEST 2021


Thank you! I am now able to build the compiler on my M1 Mac.


On Sat, May 1, 2021 at 7:35 PM Julien Fischer <jfischer at opturion.com> wrote:

>
> Hi Stephen
>
> On Sat, 1 May 2021, Stephen Brady wrote:
>
> > I'm new to Mercury and so am just building for the first time. I'm
> trying to build version 20.06.1 using the tar
> > ball distribution.
> >
> > I'm getting the following error during make install:
> >
> > mercury_memory_zones.c:390:5: error: use of undeclared identifier
> 'MR_CPU_SFENCE'
> >     MR_CPU_SFENCE;
> >
> > I'm building on an M1 Mac, so I'm wondering if this is an issue,
> directly or indirectly?
>
> In this case, very much directly. I fixed that bug on April 13, so
> you'll need to use one of the recent ROTDs not 20.06.01.
> However, see below ...
>
> > Rest of the environment:
> > macOS Big Sur 11.2.3
> >
> > XCode v. 12.5
> >
> > gcc --version redirects to clang (as usual) and yields:
> > Apple clang version 12.0.0 (clang-1200.0.32.29)
> > Target: arm64-apple-darwin20.3.0
> > Thread model: posix
>
> It's possible to get a working Mecury installation on M1 based
> Macs but for now you'll need to jump through a few extra hoops.
> If you want to the steps are here:
>
>     1. Unpack the source distribution as normal.
>
>     2. In the top-level of the Mercury distribution, create a file
>     named Mmake.params and put the following in it:
>
>          EXTRA_CFLAGS = -O0
>
>     3. Build and install as per the instructions.
>
> The result should work, although it hasn't been extensively tested.
>
> Julien.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20210502/57cfc13d/attachment.html>


More information about the users mailing list