[mercury-users] Latest ROTD on MacOSX problems

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Sep 8 03:23:43 AEST 2002

On 07-Sep-2002, Roy Ward <roy at videoscript.com> wrote:
> I'm trying to compile rotd-2002-09-05 for MacOSX 10.2. I'm only trying
> to get the hlc.gc grade going.
> When I try with gcc 3.1, it builds OK, but dies on the install:
> Compiler version: Apple Computer, Inc. GCC version 1040, based on gcc
> version 3.1 20020105 (experimental)
> ../scripts/mgnuc --grade hlc.gc [...] -c mercury.c -o mercury.o
> mercury.c:54: redefinition of `MR_create1'
> mercury_heap.h:223: `MR_create1' previously defined here

Thanks for reporting that.  I will investigate.

If you get to this point, then you have at least successfully
installed the default grade.  So you can go ahead and use
this installation.  But it hasn't installed the hlc.gc grade.

> When I try with gcc 2.95.2, it dies during the build with the following:
> Compiler version: Apple Computer, Inc. version gcc-937.2, based on gcc
> version 2.95.2 19991024 (release)
> ../scripts/mgnuc --grade none.gc      --no-mercury-stdlib-dir   --
> -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime
> -I../library -I../library/ -I../browser -I../browser/ -I../trace     -c
> hlds.make_hlds.c -o hlds.make_hlds.o
> hlds.make_hlds.c: In function
> `mercury__hlds__make_hlds__add_pragma_export_9_0_i15':
> hlds.make_hlds.c:16379: parse error at null character
> That error is kind of strange, because there is no null character on
> that line.

It looks like a bug in gcc.

Perhaps this is related to Apple's precompiled header support?
It may be worth trying with precompiled headers disabled,
e.g. by putting the line

	EXTRA_CFLAGS = --traditional-cpp

in Mmake.params.

> * Which compiler (2.95.2 or 3.1) is the best to use?

We test mostly with gcc 2.95.*.

However, it should work with 3.1 too.  We have tested it with 3.1 too,
just not as thoroughly.  We intend to support the use of gcc 3.1.

My recommendation is to use gcc 2.95.* if you care most about compilation
speed, and gcc 3.1 if you care most about the efficiency of the generated
code.  If you're not sure, use gcc 2.95.*.

Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
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