On Jul 18, 2007, at 11:11 AM, Ralf S. Engelschall wrote:

On Wed, Jul 18, 2007, Jeff Johnson wrote:

[...]
If I read correctly, the conservative/portable approach is - lpthread in
executable so that external libraries linked with -lpthread function
correctly. That kinda forces "mandatory" -lpthread for rpm when
external libraries may (or may not) have -lpthread.

This is for what pkg-config(1) or a foo-config(1) of the third-library
is for: that RPM doesn't have to know this or _always_ try to link
against pthreads. And for the same reason why created our rpm.pc, btw.
But this pthread mess is a general problem, yes.


One other point: Even though it ultimately does not matter how
-lpthread is introduced to rpm linkage, adding -lpthread always
hurts little, and avoids the failure case when *.pc and *.la incorrectly
omit -lpthread.

But we can "flexibly" fail as well as succeed. Fixing the cause when
the symptom is exhibited by rpm is quite confusing.

See one of my ancient rpm albatrosses at
   https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219461

Any failure to specify -lpthread in *.pc (or *.a) will have similar support issues.

73 de Jeff
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to