Subject: pthreads and libc version for debian 1.1

From: Michael Callahan <[email-masked]>
Date: Mon, 3 Jun 1996 22:26:14 -0600 (MDT)

I would like to play with pthreads, and was wondering what I must
do to get phtreads support built into my libc.  Do I have to
compile the latest version of libc myself, with pthreads
specified somewhere?  Or is it in the latest version already?

Also, why does debian 1.1 use libc-5.2.18 when libc-5.3.12 is available?
Is it for stability reasons?

  Michael

---

From: [email-masked] (David Engel)
Date: Tue, 4 Jun 1996 11:22:22 -0500 (CDT)

Here is the relevant section from H.J. Lu's release notes:

> PTHREAD NOTES:
> 
> The MIT pthread library 1.60 beta2 seems to work.  It passed most of tests
> in the MIT pthread package. The pthread libraries are not installed by
> default, nor are binaries included.  You may want to remove "-g" from the
> default CFLAGS for the pthread library.  You need to install the libraries
> "elfshared/libpthread.so.1.60.beta2" and "elfstatic/libpthread.a" in
> either /usr/local/lib or /usr/lib manually.  You must run ldconfig after
> installing them.
> 
> To compile pthread programs, you need to add -D_MIT_POSIX_THREADS to
> CFLAGS and -lpthread to LDFLAGS.  The network _r functions are still
> missing.
> 
> Due to the implementation of the pthread library, pthread only works
> with the shared libpthread.

Would someone like to test the pthread library that is built?  You'll
need to get the libc5 source and recompile the entire package
yourself.  If libpthread proves to work, I'll include it in either the
next libc5 package or a separate libpthread package.

> Is it for stability reasons?

For stability.  Libc 5.3.12 was brand new when we first started
preparing to release Debian 1.1.

David
-- 
David Engel                        Optical Data Systems, Inc.
[email-masked]                      1101 E. Arapaho Road
(214) 234-6400                     Richardson, TX  75081

---

From: Guy Maor <[email-masked]>
Date: Tue, 4 Jun 1996 15:34:43 -0500 (CDT)

> > The MIT pthread library 1.60 beta2 seems to work.  It passed most of tests

The latest pthread library is 1.60 beta4, released on 10/25/95.
Compiled seperately it works moderately well.  It's a lot of fun to
play with.  You can get more info at
http://www.mit.edu:8001/people/proven/pthreads.html

Presumably libc 5.3.12 contains the newer version, so when 5.3
stabilizes and David upgrades, we'll have it.  Until then, you might
want to get the pthread source from the above site and compile it
seperately.  It compiles out of the box under Linux.

Guy

---

From: Rob Browning <[email-masked]>
Date: 04 Jun 1996 15:09:38 -0500

> > in the MIT pthread package. The pthread libraries are not installed by

[...]

> next libc5 package or a separate libpthread package.

We've been using pthreads in the lab for a while, but we had to get
1.60 beta 4 (I think there's an even newer one now) because beta 2
still had a number of bugs that made it unusable.  It'd be really nice
to have the library included in Debian's libc (or as a separate
package).  Maintaining a separate version of pthreads on top of
Debian's libc5's been a pain.  

Note that we may need a separate pthreads package since pthreads
includes wrappers for gcc/g++ to make sure you compile with the right
headers and libraries.  Or perhaps that wouldn't be an issue if
Debian's libc were already compiled with the support.  I'm not sure.

--
Rob

---

From: Michael Callahan <[email-masked]>
Date: Tue, 04 Jun 1996 19:15:21 -0600

David Engel writes:
   [ chopped pthreads related release notes ]
 >next libc5 package or a separate libpthread package.

I spent the day downloading and then compiling the source for libc-5.3.12
off of sunsite.  It all compiled fine, except for the one struct
definition in include/pthread/mit/sys/compat.h, which I just ifdefed out.

I put the resulting library in /usr/lib, and tried it out
with a really simple test program, and it worked.  I'm also
happy to note that I haven't had any problems with the new
C library yet, although I haven't been beating on it much.

  Michael

---

From: [email-masked] (David Engel)
Date: Tue, 4 Jun 1996 22:13:19 -0500 (CDT)

> http://www.mit.edu:8001/people/proven/pthreads.html

Actually, I saw two newer versions on the MIT ftp site, beta4_1 and
beta5.

> stabilizes and David upgrades, we'll have it.  Until then, you might

Both libc 5.3.12 and 5.4.1 include pthreads 1.60beta4.  I will release
libc 5.3.12 or 5.4.x (if it's released) after Debian 1.1 is released.

> seperately.  It compiles out of the box under Linux.

I am not familiar with pthreads at all, so I'm not comfortable with
deviating from H.J. Lu's version.  Unless someone steps forward to
package pthreads separately, here is what I propose to do.  I will be
updating the kernel headers in libc 5.2.18-x to version 2.0.0 whenever
Linus releases it.  When I do that, I will include H.J.'s pthreads in
the libc5 package.  I will also have it provide a virtual package
called pthreads1.  Packages with threaded binaries should depend on
pthreads1.  This will make it easier to split out pthreads later if we
want to.

David