Mercury Bugs - mercury
View Issue Details
0000255mercuryBugpublic2012-05-19 14:322012-06-19 22:48
Reporterqu1j0t3 
Assigned Tojuliensf 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformPowerPCOSOS XOS Version10.4.11
Product Version 
Target VersionFixed in Version 
Summary0000255: build fails on OS X 10.4.11 PowerPC
Description  $ ./configure --disable-most-grades

pbg4:~/Downloads/mercury-compiler-11.07.1 toby$ make
MMAKE_DIR=`pwd`/scripts scripts/mmake MMAKEFLAGS= all
/tmp/mmake.8duPGY:683: warning: undefined variable `DESTDIR'
scripts/Mmake.vars:683: warning: undefined variable `DESTDIR'
Mmake.common:121: warning: undefined variable `DESTDIR'
/tmp/mmake.8duPGY:1017: warning: undefined variable `DESTDIR'
cd scripts && PATH=../scripts:../util:$PATH MMAKE_VPATH=. MMAKE_DIR=../scripts DESTDIR= ../scripts/mmake
make[2]: Nothing to be done for `default_target'.
/tmp/mmake.8duPGY:1009: warning: undefined variable `DESTDIR'
cd util && PATH=../scripts:../util:$PATH MMAKE_VPATH=. MMAKE_DIR=../scripts DESTDIR= ../scripts/mmake mfiltercc
make[2]: `mfiltercc' is up to date.
/tmp/mmake.8duPGY:1021: warning: undefined variable `DESTDIR'
gc_grade=`scripts/ml --grade reg.gc --print-gc-grade`; \
cd boehm_gc && PATH=../scripts:../util:$PATH MMAKE_VPATH=. MMAKE_DIR=../scripts DESTDIR= ../scripts/mmake GC_GRADE=$gc_grade
MAKEFLAGS=""; export MAKEFLAGS; \
make -j1 GRADE=reg.gc GC_GRADE=gc \
        libgc.a libgc.dylib \
        FINAL_INSTALL_MERC_GC_LIB_DIR=/usr/local/mercury-11.07.1/lib/mercury/lib \
        dylib
make[3]: `libgc.a' is up to date.
make[3]: `libgc.dylib' is up to date.
make[3]: Nothing to be done for `dylib'.
/tmp/mmake.8duPGY:1026: warning: undefined variable `DESTDIR'
cd runtime && PATH=../scripts:../util:$PATH MMAKE_VPATH=. MMAKE_DIR=../scripts DESTDIR= ../scripts/mmake
make[2]: Nothing to be done for `default_target'.
/tmp/mmake.8duPGY:1013: warning: undefined variable `DESTDIR'
cd util && PATH=../scripts:../util:$PATH MMAKE_VPATH=. MMAKE_DIR=../scripts DESTDIR= ../scripts/mmake
make[2]: Nothing to be done for `default_target'.
/tmp/mmake.8duPGY:1030: warning: undefined variable `DESTDIR'
cd robdd && PATH=../scripts:../util:$PATH MMAKE_VPATH=. MMAKE_DIR=../scripts DESTDIR= ../scripts/mmake
make[2]: Nothing to be done for `default_target'.
/tmp/mmake.8duPGY:1034: warning: undefined variable `DESTDIR'
cd library && PATH=../scripts:../util:$PATH MMAKE_VPATH=. MMAKE_DIR=../scripts DESTDIR= ../scripts/mmake
/tmp/mmake.8duPGY:1038: warning: undefined variable `DESTDIR'
cd mdbcomp && PATH=../scripts:../util:$PATH MMAKE_VPATH=. MMAKE_DIR=../scripts DESTDIR= ../scripts/mmake
/tmp/mmake.f0C9tK:1097: Extraneous text after `else' directive
/tmp/mmake.f0C9tK:1102: *** only one `else' per conditional. Stop.
make[1]: *** [mdbcomp] Error 2
make: *** [all] Error 2
Steps To Reproduce$ ./configure --disable-most-grades
$ make
Additional Informationmercury-compiler-11.07.1

$ gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1819)
TagsNo tags attached.
Attached Files? configure-log (13,747) 2012-05-19 15:22
https://bugs.mercurylang.org/file_download.php?file_id=151&type=bug
? make-log (38,349) 2012-05-19 15:22
https://bugs.mercurylang.org/file_download.php?file_id=152&type=bug
log patch-test.log (15,494) 2012-05-21 16:14
https://bugs.mercurylang.org/file_download.php?file_id=153&type=bug

Notes
(0000455)
qu1j0t3   
2012-05-19 14:34   
I also have access to OS X 10.5/PowerPC and 10.6/x86_64 systems for testing if wanted.
(0000456)
juliensf   
2012-05-19 23:28   
Fix committed. It should be available in the ROTD in a few days and will also
be included in the next 11.07.2-beta release.
(0000457)
qu1j0t3   
2012-05-21 16:14   
Sorry, patch (forwarded by PB) seems not to resolve things. Log attached.
(0000458)
juliensf   
2012-05-21 16:20   
(Last edited: 2012-05-22 00:07)
That's a different problem, most probably caused by the version of
autoconf on Mac OS 10.4 being too old. (I'll take a look at the configure
script to see if it can be worked around, but it may not be possible to
do anything about it.)

If you wait until there is an ROTD available containing the patch and
compile from the source distribution you won't have that problem (since
you won't need to run autoconf).

(0000459)
qu1j0t3   
2012-05-23 10:59   
Not out of the woods yet, I'm afraid; I get this during 'sudo make install':

ranlib -c /usr/local/mercury-rotd-2012-05-20/lib/mercury/lib/hlc.gc/libmer_rt.a
../Mmake.common:486: warning: undefined variable `mer_std.mhs'
../Mmake.common:489: warning: undefined variable `mer_std.mhs'
../Mmake.common:495: warning: undefined variable `mer_std.os'
/tmp/mmake.26t9a3:987: warning: undefined variable `mer_std.trans_opts'
/tmp/mmake.26t9a3:991: warning: undefined variable `mer_std.ms'
/tmp/mmake.26t9a3:1000: warning: undefined variable `mer_std.ms'
/tmp/mmake.26t9a3:1020: warning: undefined variable `mer_std.os'
/tmp/mmake.26t9a3:1021: warning: undefined variable `mer_std.cs'
/tmp/mmake.26t9a3:1022: warning: undefined variable `mer_std.ss'
/tmp/mmake.26t9a3:1023: warning: undefined variable `mer_std.pic_ss'
/tmp/mmake.26t9a3:1024: warning: undefined variable `mer_std.ils'
/tmp/mmake.26t9a3:1025: warning: undefined variable `mer_std.javas'
/tmp/mmake.26t9a3:1205: warning: undefined variable `mer_std.os'
mmc --generate-dependencies --grade hlc.gc --mercury-linkage shared --flags LIB_FLAGS --flags INTER_FLAGS --no-warn-nothing-exported --no-warn-unused-imports mer_std
mercury_compile: `--host-env-type posix` is incompatible with
  `--csharp-compiler-type microsoft'.
Mercury Compiler, version rotd-2012-05-20, configured for powerpc-apple-darwin8.11.0
Copyright (C) 1993-2012 The University of Melbourne
Usage: mmc [<options>] <arguments>
Use `mmc --help' for more information.
make[2]: *** [mer_std.depend] Error 1
To clean up from failed install, remove /Users/toby/Downloads/mercury-compiler-rotd-2012-05-20/install_grade_dir.hlc.gc
make[1]: *** [install_grades] Error 1
make: *** [install] Error 2
(0000460)
juliensf   
2012-05-23 14:53   
Can you check the setting of the variable MERCURY_CSHARP_COMPILER_TYPE
in scripts/Mercury.config and scripts/Mercury.config.bootstrap. Are
they set to "microsoft"?
(0000461)
qu1j0t3   
2012-05-25 12:54   
pbg4:~/Downloads/mercury-compiler-rotd-2012-05-20 toby$ grep -i csharp.*= scripts/Mercury.config*
scripts/Mercury.config:MERCURY_CSHARP_COMPILER=csc
scripts/Mercury.config:MERCURY_CSHARP_COMPILER_TYPE=microsoft
scripts/Mercury.config.bootstrap:MERCURY_CSHARP_COMPILER=csc
scripts/Mercury.config.bootstrap:MERCURY_CSHARP_COMPILER_TYPE=microsoft
(0000462)
juliensf   
2012-05-25 15:46   
I'm pretty sure that Microsoft have never ported their C# compiler to
Mac OS X or to powerpc. What is the csc executable on that system?

(A workaround for the above problem would be to set MERCURY_CSHARP_COMPILER_TYPE
to "unknown" in both cases.)
(0000463)
qu1j0t3   
2012-05-25 23:07   
Aha! There is a csc executable (the Chicken Scheme compiler). Maybe the test needs to be a little more specific? (And which Unix platforms *do* support the C# compiler?)

(I guess I can also work around this with a --disable-<foo> option to configure?)
(0000464)
juliensf   
2012-05-25 23:12   
Ok, that would be it - IIRC the current test just looks for an executable named csc.
(The only C# compiler -- that works with Mercury -- on Unix is mono, but the executable
for that is usually called gmcs.) I'll put a stronger test into configure, in the meantime you
will need to edit scripts/Mercury.config and scripts/Mercury.config.bootstrap by hand.
(I don't think there is a --disable-foo option that will help here.)
(0000465)
qu1j0t3   
2012-05-26 23:17   
'make install' was successful, thankyou very much for the prompt help. I am trying a tools/bootcheck as suggested by Boney.
(0000469)
juliensf   
2012-06-19 22:48   
I've added a stronger test for MS C# to the configure script; it should (hopefully) now distinguish
between that and the Chicken Scheme compiler.

I don't think anything can be done about not being able to generate configure on Mac OX X 10.4,
except upgrading to a newer version of autoconf.

Issue History
2012-05-19 14:32qu1j0t3New Issue
2012-05-19 14:34qu1j0t3Note Added: 0000455
2012-05-19 15:22qu1j0t3File Added: configure-log
2012-05-19 15:22qu1j0t3File Added: make-log
2012-05-19 23:28juliensfNote Added: 0000456
2012-05-19 23:28juliensfStatusnew => resolved
2012-05-19 23:28juliensfResolutionopen => fixed
2012-05-19 23:28juliensfAssigned To => juliensf
2012-05-21 16:14qu1j0t3Note Added: 0000457
2012-05-21 16:14qu1j0t3Statusresolved => feedback
2012-05-21 16:14qu1j0t3Resolutionfixed => reopened
2012-05-21 16:14qu1j0t3File Added: patch-test.log
2012-05-21 16:20juliensfNote Added: 0000458
2012-05-22 00:07juliensfNote Edited: 0000458bug_revision_view_page.php?bugnote_id=458#r2
2012-05-23 10:59qu1j0t3Note Added: 0000459
2012-05-23 10:59qu1j0t3Statusfeedback => assigned
2012-05-23 14:53juliensfNote Added: 0000460
2012-05-25 12:54qu1j0t3Note Added: 0000461
2012-05-25 15:46juliensfNote Added: 0000462
2012-05-25 23:07qu1j0t3Note Added: 0000463
2012-05-25 23:12juliensfNote Added: 0000464
2012-05-26 23:17qu1j0t3Note Added: 0000465
2012-06-19 22:48juliensfNote Added: 0000469
2012-06-19 22:48juliensfStatusassigned => resolved
2012-06-19 22:48juliensfResolutionreopened => fixed