On Jul 18, 2007, at 10:14 AM, Ralf S. Engelschall wrote:
On Wed, Jul 18, 2007, Jeff Johnson wrote:
Ripping the need for -lpthread is on my todo list. Easier to rip than
discuss.
Well, a simple --without-pthreads now does the trick just fine and
allows one to build RPM without any needs for an existing POSIX
pthreads
API. That's all I personally needed...
Is --without-pthreads sufficient in all possibl;e cases?
What I worry about is TLS (thread local storage) on linux. There is a
known
incompatibility using dlopen() in a statically -TLS executable, trying
to load +TLS modules. That insolvabkle problem is what forced -all-
static out
of rpm.
I have been linking -lpthreads in rpm because beecrypt uses threads to
gather entropy, and because of posix-shared-mutexes.
What I don't know generally is whether an executable needs -lpthread if
a library uses -lpthread. The general answer (of course) needs to
investigate code paths deeply. E.g. there is much compexity added
to the signal handler so that rpmlib (through rpm-python) can be run
on a thread.
There are two approaches to sanity without general answers that are
not forthcoming. My previous answer was -lpthreads always, the
alternative
"flexible" answer is expunge every use of thread functions, the path
I am now
pursuing.
73 de Jeff
______________________________________________________________________
RPM Package Manager http://rpm5.org
Developer Communication List rpm-devel@rpm5.org