2019-09-20 11:58 AEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000109mercuryBugpublic2010-09-14 12:23
Reporterjanicek 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformDarwinOSMac OS XOS Version10.5.8
Product Version 
Target VersionFixed in Version 
Summary0000109: rotd-2009-10-05's library install fails for grade hlc
DescriptionI'm installing Mercury rotd-2009-10-05, with libgrade hlc. "make" seems to run without problems, but while in "make install", I get the following message and the install terminates:

-- BEGIN SNIPPET
...
mmc --compile-to-c --grade hlc --mercury-linkage shared --flags LIB_FLAGS --flags INTER_FLAGS -R/Users/sandius/Developer/mercury-rotd-2009-10-05/lib/mercury/lib/hlc -R/Users/sandius/Developer/mercury-rotd-2009-10-05/lib/mercury/lib bit_buffer.read > bit_buffer.read.err 2>&1
mmc --make-optimization-interface --grade hlc --mercury-linkage shared --flags LIB_FLAGS --flags INTER_FLAGS -R/Users/sandius/Developer/mercury-rotd-2009-10-05/lib/mercury/lib/hlc -R/Users/sandius/Developer/mercury-rotd-2009-10-05/lib/mercury/lib bit_buffer.write
mmc --make-transitive-optimization-interface --grade hlc --mercury-linkage shared --flags LIB_FLAGS --flags INTER_FLAGS -R/Users/sandius/Developer/mercury-rotd-2009-10-05/lib/mercury/lib/hlc -R/Users/sandius/Developer/mercury-rotd-2009-10-05/lib/mercury/lib bit_buffer.write
mmc --compile-to-c --grade hlc --mercury-linkage shared --flags LIB_FLAGS --flags INTER_FLAGS -R/Users/sandius/Developer/mercury-rotd-2009-10-05/lib/mercury/lib/hlc -R/Users/sandius/Developer/mercury-rotd-2009-10-05/lib/mercury/lib bit_buffer.write > bit_buffer.write.err 2>&1
mmc --compile-to-c --grade hlc --mercury-linkage shared --flags LIB_FLAGS --flags INTER_FLAGS -R/Users/sandius/Developer/mercury-rotd-2009-10-05/lib/mercury/lib/hlc -R/Users/sandius/Developer/mercury-rotd-2009-10-05/lib/mercury/lib --no-warn-insts-without-matching-type --no-erlang-native-code bitmap > bitmap.err 2>&1
gmake[2]: *** [bitmap.c_date] Error 1
gmake[2]: Leaving directory `/Users/sandius/tmp/mercury-compiler-rotd-2009-10-05/install_grade_dir.hlc/library'
To clean up from failed install, remove /Users/sandius/tmp/mercury-compiler-rotd-2009-10-05/install_grade_dir.hlc
gmake[1]: *** [install_grades] Error 1
gmake[1]: Leaving directory `/Users/sandius/tmp/mercury-compiler-rotd-2009-10-05'
make: *** [install] Error 2

-- END SNIPPET --

$ cat install_grade_dir.hlc/library/bitmap.err
Uncaught Mercury exception:
Software Error: ml_disj_gen.m: Unexpected: ml_gen_disj: single disjunct

$ gcc --version
i686-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5566)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ uname -a
Darwin dfki-guestpool8.dfki.uni-sb.de 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386

Configure command:
$ ./configure --prefix=$HOME/Developer/mercury-rotd-2009-10-05 --enable-libgrades=hlc

config.log attached.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000198

wangp (developer)

Last edited: 2009-10-09 21:26

What about grade "hlc.gc"? It worked for me on Linux. (Nonetheless it does look like a bug.)

~0000199

janicek (reporter)

hlc.gc works. However, I wanted to suppress garbage collection as it randomly causes SIGBUSes in my code (which is my fault, I suppose, probably some stray pointers caused by sloppy interfacing to C++...)

~0000200

janicek (reporter)

Is there perhaps a way to *delay* garbage collection as much as possible? That would also be helpful (to me right now, not solving this issue of course).

~0000201

wangp (developer)

You can use hlc.gc but set the GC_DONT_GC environment variable to switch it off completely. There are other environment variables (from Boehm GC) which let you set the initial heap size, etc.

~0000202

janicek (reporter)

That helped, thanks!

~0000203

juliensf (administrator)

What is the reason you are using the hlc grade? Grades without
garbage collection are not generally useful. (It should still
work of course.)

~0000205

juliensf (administrator)

Sorry, didn't see the above.

~0000206

juliensf (administrator)

I have uploaded a cut-down test case for this bug.
It appears to be a problem with --reclaim-heap-on-failure.

~0000287

zs (developer)

Fix committed 14 sep 2010.
+Notes

-Issue History
Date Modified Username Field Change
2009-10-09 18:28 janicek New Issue
2009-10-09 18:28 janicek File Added: config.log
2009-10-09 21:25 wangp Note Added: 0000198
2009-10-09 21:26 wangp Note Edited: 0000198
2009-10-09 21:34 janicek Note Added: 0000199
2009-10-09 21:41 janicek Note Added: 0000200
2009-10-09 21:59 wangp Note Added: 0000201
2009-10-09 22:43 janicek Note Added: 0000202
2009-10-12 10:23 juliensf Note Added: 0000203
2009-10-12 10:23 juliensf Status new => acknowledged
2009-10-12 10:30 juliensf Note Added: 0000205
2009-10-12 12:34 juliensf File Added: bug109.m
2009-10-12 12:34 juliensf Note Added: 0000206
2009-10-12 12:34 juliensf Status acknowledged => confirmed
2010-09-13 14:23 zs Status confirmed => assigned
2010-09-13 14:23 zs Assigned To => zs
2010-09-14 12:23 zs Note Added: 0000287
2010-09-14 12:23 zs Status assigned => resolved
2010-09-14 12:23 zs Resolution open => fixed
+Issue History