[mercury-users] Re: Problem building on Mac OS X / Xcode 4 / clang

Julien Fischer juliensf at csse.unimelb.edu.au
Tue May 22 21:58:47 AEST 2012


Hi Sean,

On Tue, 22 May 2012, Sean Johnson wrote:

>
> 	Building without a parallel build did fix the problem with transform_hlds.ctgc.structure_reuse.indirect.int3 not being found. Do you know why that is?

No.  I suspect there are some missing dependencies in the dependency
files (the *.d files in the compiler directory) generated for mmake.
The remainder is just "bad luck", you're using enough cores and have a
fast enough machine for these missing dependencies to be a problem.

[Does this problem occur only at -j6 or at say -j2?  If mmake is being 
troublesome then you could use mmc --make when rebuilding the compiler, 
e.g doing

    mmake --use-mmc-make -j6

will cause the build system to use mmc's internal --make tool for most
of the build.]

> 	Without parallel, the make completed. The make install then failed with:
>
> /Users/sean/build/mercury-compiler-11.07.1/install_grade_dir.hlc.par.gc/scripts/mgnuc --grade hlc.par.gc      --c-debug --no-ansi   --       -c mercury.c -o mercury.o
> /Users/sean/build/mercury-compiler-11.07.1/install_grade_dir.hlc.par.gc/scripts/mgnuc --grade hlc.par.gc      --c-debug --no-ansi   --       -c mercury_accurate_gc.c -o mercury_accurate_gc.o
> In file included from mercury_accurate_gc.c:42:
> In file included from ./mercury_imp.h:62:
> ./mercury_engine.h:465:12: error: thread-local storage is unsupported for the current target
>    extern __thread MercuryEngine *MR_thread_engine_base;
>           ^

It appears that clang does not support GCC's __thread extension on Mac
OS X (or more specifically on platforms that don't use ELF).
Annoyingly, the configure script's test for this feature passes even
though it doesn't appear to work with clang.  I think I have a fix for
this one - I will test it and get back to you.

Julien.
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list