Skip to content
Tcl Source Code History Of Ticket 219060
Login

History Of Ticket 219060

Artifacts Associated With Ticket 219060

  1. Ticket change [7936f4edbb] (rid 90091) by nobody on 2000-10-26 01:10:02:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 4359 Bug
      Version: 8.3
      SubmitDate: '2000-03-10'
      LastModified: '2000-04-13'
      Severity: MED
      Status: Released
      Submitter: techsupp
      ChangedBy: hobbs
      OS: Digital Unix
      OSVersion: Tru64 Unix 4.0f with current patches
      Machine: alpha ev56-based workstation
      FixedDate: '2000-04-13'
      FixedInVersion: 8.3.1
      ClosedDate: '2000-10-25'
      
      
      Name:
      Tim Mooney
      
      ReproducibleScript:
      Tcl and Tk have autoconf tests that don't correctly detect how to get full POSIX thread support on
      Digital/Tru64 Unix.  The problem is that many of the functions in libpthread.so are named with a __
      prepended to the function name.  If you include `pthread.h', you get defines that map the
      expected names to the actual symbols in the library.  If you don't include pthread.h, you don't have
      those and the AC_CHECK_LIB(pthread,pthread_mutex_init,...) therefore doesn't detect that you
      only need that library.  It then checks for pthread_mutex_init in the older `libpthreads.so', which has
      a DECthreads/early POSIX interface.  It does find it in there,  and `-lpthreads' is then (incorrectly)
      added to the list of libraries.  Meanwhile, `-pthread' is added to CFLAGS and LDFLAGS, so `-lpthread' is automatically linked in.  This means that we're linking with both the newer `pthread' library and the
      earlier `pthreads' library, which may cause problems.
      
      The relevant output from configure for tcl:
      
      checking for building with threads... yes
      checking for pthread_mutex_init in -lpthread... no
      checking for pthread_mutex_init in -lpthreads... yes
      
      DesiredBehavior:
      Tcl & Tk's thread tests need to use AC_TRY_COMPILE to find pthread_mutex_init, since AC_TRY_COMPILE allows you to specify necessary includes.  This only needs to be attempted
      if we didn't find pthread_mutex_init in -lpthread with the AC_CHECK_LIB.
      
      I'm included a patch that fixes this for Tcl & Tk.
      
      Patch:
      The patches are at:
      
      ftp://dogbert.cc.ndsu.nodak.edu/pub/tcl-8.3.0-pthread-configure.patch
      ftp://dogbert.cc.ndsu.nodak.edu/pub/tk-8.3.0-pthread-configure.patch
      
      PatchFiles:
      tcl8.3.0/unix/tcl.m4
          tk8.3.0/unix/aclocal.m4
      
      
      
      This is somewhat correct, but will break on some system (ie AIX4.2).
      The problem is the compile works with pthread.h defined, but AIX
      still has no libpthread (only libpthreads).  On Tru64, there does
      seem to be a __pthread_mutex_init in libpthread, so perhaps the
      correct check is for
          AC_CHECK_LIB(pthread,__pthread_mutex_init,...)
      if the first check fails.
      
      This seems to work on a Tru64 v4 machine.  The better fix? 
      -- 04/08/2000 hobbs
      
      I decided to go with the check for __pthread_mutex_init in pthread
      as that works on Tru64 and AIX4.3 and correctly fails on AIX4.2
      (where the pthread.h compile works, but no libpthread.a exists).
      This is in 8.3.1 for Tcl and Tk (tk doesn't support threads though
      currently). 
      -- 04/13/2000 hobbs
      
    4. foundin initialized to: "obsolete: 8.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "75. Tutorial"
    10. title initialized to:
      tcl & tk's configure fails to correctly detect pthread_mutex
      
    11. type initialized to: "Bug"
  2. Ticket change [3ccab34b3e] (rid 120969) by welch on 2000-10-26 08:34:06:

    1. closedate changed to: "2000-10-26T01:34:06"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [152ea24fe6] (rid 124527) by dgp on 2001-04-05 06:52:47:

    1. closedate changed to: "2001-04-04T23:52:47"
    2. closer changed to: "dgp"
    3. subsystem changed to: "53. Configuration and Build Tools"
    4. title changed to:
      tcl & tk's configure fails to correctly detect pthread_mutex