for review: document fix for tcl/tk gc problem

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Apr 9 04:57:40 AEST 1999


Could someone please review this one?

--------------------

Estimated hours taken: 0.25
	(+ lots of work to find the bug in the first place).

extras/graphics/mercury_tcltk/HOWTO:
	Document the need to link with a version of libgc that was
	compiled with `-DALL_INTERIOR_POINTERS'.

Index: extras/graphics/mercury_tcltk/HOWTO
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/graphics/mercury_tcltk/HOWTO,v
retrieving revision 1.1
diff -u -r1.1 HOWTO
--- HOWTO	1998/02/17 06:33:30	1.1
+++ HOWTO	1999/04/08 18:54:29
@@ -6,8 +6,17 @@
 fully documented in any way, but if you know Tcl/Tk, you shouldn't
 have any problems.
 
+The main tricky thing is that it is *CRUCIAL* that you link with a
+version of the garbage collection library (libgc.a or libgc.so) which
+has been compiled with `-DALL_INTERIOR_POINTERS'.  You can create
+this by typing the commands
 
-You need to add some information to your Mmakefile to tell mmake where
+	make clean
+	make libgc.a libgc.so EXTRA_CFLAGS=-DALL_INTERIOR_POINTERS
+
+in the boehm_gc directory of the Mercury compiler source distribution.
+
+You also need to add some information to your Mmakefile to tell mmake where
 the mercury_tcltk library is, and to link with the mercury_tcltk, tcl,
 tk and X libraries.
 
@@ -29,6 +38,10 @@
 			  -L$(MERCURY_TCLTK_DIR) 
 	MLLIBS          = -lmercury_tcltk $(TCLTK_MLLIBS) $(EXTRA_MLLIBS)
 	C2INITFLAGS     = $(MERCURY_TCLTK_DIR)/mercury_tcltk.init 
+
+	# Tell ml to link with our specially-compiled version of
+	# the libgc library instead of the usual one.
+	MLFLAGS	+= -L some/other/directory/boehm_gc
 
 You can then use EXTRA_MCFLAGS, EXTRA_MLFLAGS, etc to set any other
 options you need.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list