[Fedora-packaging] Packaging thread safe version of libraries

Tom Lane tgl at redhat.com
Sat Oct 29 02:49:52 UTC 2011


Thomas Spura <tomspur at fedoraproject.org> writes:
> Sergio Pascual wrote:
>> So I was wondering if it's a good idea to compile the code twice and
>> distribute two versions of the library, libcfitsio.so and
>> libcfitsio-mt.so. This implies to distribute two pkg-config files,
>> cfistio.pc and cfitsio-mt.pc

> Completely replacing the library with a thread safe version
> would make the library slower, when using without threads. Don't know
> if that's a big issue here?

FWIW, I think that's mostly a twentieth-century problem.  With modern
toolchains and libraries there isn't likely to be much difference.

I would suggest taking a negative approach: do not ship the
non-thread-safe version unless you have positive evidence that it's
meaningfully faster, or there's a known incompatibility in the
thread-safe version.  It only takes one episode of debugging an
oh-you-should-have-used-the-thread-safe-version problem to wipe out any
possible benefit from using a not-thread-safe-version, when you account
for person-hours saved or wasted by each.

To give a concrete example: there is no non-thread-safe version of glibc
in Fedora.

			regards, tom lane


More information about the packaging mailing list