Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Sep 2006 19:47:48 +0200
From:      Thierry Thomas <thierry@FreeBSD.org>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: detect presence of threads support in sqlite3 port
Message-ID:  <20060930174748.GD19733@graf.pompo.net>
In-Reply-To: <200609301709.k8UH9gWG034468@Laptop.mine.box>
References:  <200609301709.k8UH9gWG034468@Laptop.mine.box>

next in thread | previous in thread | raw e-mail | index | archive | help
Le Sam 30 sep 06 à 19:09:42 +0200, Alexander Botero-Lowry <alexbl@FreeBSD.org>
 écrivait :
> This is the exact issue that sparked my interest in some kind of OPTIONS 
> dependency/checking mechanism in ports. One of my ports (audio/xmms2) requires
> that sqlite3 be built threadsafe, and there is no way to detect this at runtime
> so it would be possible to end up with a nastly corrupted medialib because of
> this.
> 
> So the idea would be to store the OPTIONS choices file in the pkgdb as +OPTIONS
> or something, and then to be able to say NEED_OPTIONS=sqlite3:THREADS or 
> something like that.

I don't know if someone has planned to add such a mechanism in options,
but it's always possible to create a config file, where you can store
what you need. E.g. see how PHP ports create the file etc/php.conf.

> > sqlite supports pkg-config, so you could try something based upon
> >
> > pkg-config --libs sqlite3 | grep '\${PTHREAD_LIBS}'
> This might not always work since sqlite3's thread safety is if I remember 
> correctly a test to see if threads are using their own contexts or using a
> global one, and asserting if they try to use a global one. It doesn't 
> really requite pthreads and that is probably just there as a convenience.

I did'nt know that, but that's how a configure script would solve the
problem...
-- 
Th. Thomas.



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