Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jun 2004 20:03:25 -0700
From:      John Merryweather Cooper <johnmary@adelphia.net>
To:        Joe Marcus Clarke <marcus@marcuscom.com>
Cc:        John Merryweather Cooper <johnmary@adelphia.net>
Subject:   Re: Does -CURRENT's gcc generate ___tls_get_addr under any circumstances
Message-ID:  <20040626030325.GB84377@borgdemon.losaca.adelphia.net>
In-Reply-To: <1088218523.17696.2.camel@shumai.marcuscom.com>
References:  <20040625204444.GA50921@borgdemon.losaca.adelphia.net> <1088197748.842.1.camel@gyros> <20040626010822.GB20786@borgdemon.losaca.adelphia.net> <1088218523.17696.2.camel@shumai.marcuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 25, 2004 at 10:55:23PM -0400, Joe Marcus Clarke wrote:
> On Fri, 2004-06-25 at 21:08, John Merryweather Cooper wrote:
> > On Fri, Jun 25, 2004 at 05:09:08PM -0400, Joe Marcus Clarke wrote:
> > > On Fri, 2004-06-25 at 16:44, John Merryweather Cooper wrote:
> > > > I'm working on porting (and getting fully working) lang/mono
> > > > version 0.96, and I'm having a problem.  In one of my object
> > > > files--mini.lo--I'm getting an extern reference to
> > > > ___tls_get_addr.  I've been over the source code in mini.c
> > > > and all the included headers, and I can't find anything to
> > > > get rid of this reference or find a way to resolve it.  As
> > > > a result, the linking of the mono runtime binary fails with
> > > > this symbol unresolved.
> > > > 
> > > > Any and all clues are welcome!
> > > 
> > > As I recall, this is from boehm.  You'll have to tell boehm not to do
> > > thread-local storage.  Note: boehm is in the libgc subdirectory inside
> > > mono.
> > > 
> > > Joe
> > > 
> > > > 
> > > > jmc
> > > > _______________________________________________
> > > > freebsd-gnome@freebsd.org mailing list
> > > > http://lists.freebsd.org/mailman/listinfo/freebsd-gnome
> > > > To unsubscribe, send any mail to "freebsd-gnome-unsubscribe@freebsd.org"
> > > -- 
> > > PGP Key : http://www.marcuscom.com/pgp.asc
> > > 
> > > 
> > 
> > Hmmm . . .
> > 
> > Well, looking at the libgc code, I note that if it detects GCC 3.x it uses
> > pthreads for thread local storage.  The configure script doesn't provide
> > a means to turn off tls.
> > 
> > Just to be sure, I undefined USE_COMPILER_TLS on the command line with 
> > -UUSE_COMPILER_TLS.
> 
> I think you have to remove this from libgc's configure script.  You
> should be able to do a case statement, and match on freebsd.
> 
> > 
> > No dice, ___tls_get_addr still shows up in the mini.lo object which gets linked
> > into libmono.so which causes mono to fail to link with an undefined
> > symbol (see attached build script).
> > 
> > I've checked all the objects in libgc, and none of them are defining
> > this symbol.  It seems prettly clear that it comes into existance
> > during the compile of mini.c (it's in mini.lo), but I can't for the
> > life of me find were it is in mini.c or in it's includes.
> 
> I saw this, too, when I was testing an earlier version of mono.  I had
> actually enabled some additional options thinking they would help, but
> it turned out to be a bad idea.
> 
> See if you can hunt down the TLS options in libgc's configure, and
> remove them.
> 
> Joe
> 
> > 
> > jmc
> -- 
> PGP Key : http://www.marcuscom.com/pgp.asc

OK, I'll dive into libgc's configure.  I can confirm that this is
problem reoccurs with 0.97 (which I'm now working on) which has
become the release candidate.

jmc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040626030325.GB84377>