[Mono-list] [roam@ringlet.net: Re: lang/mono port]

Juli Mallett jmallett@FreeBSD.ORG
Wed, 11 Dec 2002 12:59:19 -0800

Does anyone object to the third option here?


----- Forwarded message from Peter Pentchev <roam@ringlet.net> -----

Delivered-To: jmallett@freebsd.org
Date: Wed, 11 Dec 2002 12:48:28 +0200
From: Peter Pentchev <roam@ringlet.net>
To: Juli Mallett <jmallett@FreeBSD.org>
Cc: miguel@ximian.com
Subject: Re: lang/mono port
In-Reply-To: <20021211023605.A60780@FreeBSD.org>
User-Agent: Mutt/1.5.1i

On Wed, Dec 11, 2002 at 02:36:05AM -0800, Juli Mallett wrote:
> * De: Peter Pentchev <roam@ringlet.net> [ Data: 2002-12-11 ]
> 	[ Subjecte: lang/mono port ]
> > Hi,
> > 
> > In browsing the gnome@ archives, I found that you were interested in
> > updating the lang/mono port to 0.17.  You mention some issues with
> > boehm-gc; IMHO, there are no issues really, except for the fact that the
> > Mono build has changed a bit, and the files that need to be tweaked in
> > the pre-patch phase are different: the #include <gc.h> is now in a
> > header file, and is not caught by the find/xargs/sed-i in the port's
> > pre-patch target.
> Hrm, the version of libgc I installed from ports didn't seem to install
> the _THREADS related defines that are required, and I had problems with
> GC_MALLOC, and I don't understand why the <gc.h> thing needs changed...
> I'm the one who added the gc wrapper, and I added <gc.h> so it would work
> on FreeBSD.  If the CPPFLAGS are wrong, or not being obeyed, then that
> is the problem.  Thoughts?  If you can clear that up for me, then I'll
> gladly give it a go and push happily for this to be included.

The problem is that there is a gc.h in the mono/metadata/ directory.
Since mono/metadata/Makefile.in has a "DEFS= ... -I.", gc_wrapper.h's
inclusion of <gc.h> actually picks up mono/metadata/gc.h instead of
Boehm's ${LOCALBASE}/include/gc.h :(  This is *exactly* the reason for
the problems with GC_MALLOC: Mono's gc.h does not define it, so the
parts of Mono which try to use Boehm's GC cannot see it.

The problem could be solved in three ways:

1. Make the FreeBSD port of boehm-gc install gc.h into <gc/gc.h>
   instead of <gc.h>, as it does now - IMHO, this might break lots of
   other ports.

2. Remove the -I. from mono/metadata's DEFS - I have no idea what
   other changes will be necessitated by this.

3. Rename mono/metadata/gc.h to, say, mono-gc.h, so that there are no
   chances of its ever conflicting with any other header file named gc.h
   or similarly - this will require propagating the change all through
   the Mono sources, but IMHO this is the cleanest solution.


Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
I am the meaning of this sentence.

----- End forwarded message -----

Juli Mallett <jmallett@FreeBSD.org>
OpenDarwin, Mono, FreeBSD Developer.
ircd-hybrid Developer, EFnet addict.
FreeBSD on MIPS-Anything on FreeBSD.