[Mono-devel-list] GAC and third party libraries: post Beta planning.

Todd Berman tberman at sevenl.net
Thu May 6 09:27:47 EDT 2004


On Thu, 2004-06-05 at 13:43 +0200, Michal Moskal wrote:
> On Wed, May 05, 2004 at 09:10:56PM -0400, Todd Berman wrote:
> > I dont see how the /probe replaces the need for /package.
> > 
> > You still have one of the issues that caused the need for /package in
> > the first place (Different versions of the same assembly). It seems that
> > it wouldn't replace it at all, but compliment it.
> 
> Oh, that's simple:
> 
> 	/usr/lib/pkgconfig/gtk+-2.0.pc
> 	/usr/lib/pkgconfig/gtk+.pc
> 
> The same way you can have gtk-sharp and gtk-sharp-2 or whatever.

Hah, not exactly.

The problem is where do the compiler reference-able assemblies go.

Right now it is determined by /package gtk-sharp which installs the
symlinks into $prefix/lib/mono/gtk-sharp/ and will eventually be used
with the -pkg: stuff.

The problem with removing that /package argument is where do the
gtk-sharp-2.0 assemblies go, the ones with the same filenames as the
gtk-sharp assemblies. Note, this is a compile time issue, *NOT* a
runtime issue as the gac solves this.

This is why i said that I didnt see the /probe argument
replacing /package, but augmenting it.
> 
> > We still have a (imo) huge issue with regards to prefixes. 
> 
> Why should you care about prefixes? You just need to know how to call
> pkg-config -- and it should simply be in the PATH. Then you can simply
> do:
> 
> 	mcs -pkg:gtk-sharp foo.cs
> 
> and that's all.

Here you have the same confusion as above, but backward. Now the issue
is at runtime.

For example, lets say I have mono installed into /usr and i install
gtk-sharp into /usr/local.

the mono gac is /usr/lib/mono/gac/ and gtk-sharp gac's
into /usr/local/lib/mono/gac/. Thus gtk-sharp isnt found at runtime *or*
compile time, and everything is broken.

> 
> > I think this
> > can be fixed by reversing the direction of our symlinks (instead of from
> > $prefix/lib/mono/package/blah.dll to the real gac'd assembly, symlink
> > the other way around). This will remove the need for some kind of hacky
> > MONO_GAC_PATHS or something evil like that, as regardless of what prefix
> > your libraries are really on, you would have them all symlink'd to the
> > proper place. Of course, then you get into typical issue of touching
> > files outside of the user requested prefix, and auto* distchecking, and
> > that general unix nightmare.
> 
> The symlinks are IMHO needed *only* for system assemblies, as they are
> likely to be referenced using just /r: and not /pkg:. I would vote for
> the pkg-config to be the only officially supported way of referencing
> gtk# and co.

The symlinks are required either way. mcs does not reference assemblies
out of the gac, it references the symlinks put into its appbase
(/usr/lib/mono/1.0/) because if you notice, mcs.exe is now located in
that directory.

The reason gtk-sharp compiles work now without an issue is a clever (and
ugly, gross, ick) hack put into place at the 11th hour. In the mcs shell
script installed into /usr/bin/ it adds a -lib:/usr/lib/mono/gtk-sharp/
so it will pick up the gtk-sharp symlinks.


--Todd




More information about the Mono-devel-list mailing list