Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Need to adjust aclocal/tcl.m4 for AIX 4.2.1

Closed / Fixed218949ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:08:31
OriginalBugID: 2915 Bug
Version: 8.2
SubmitDate: '1999-09-27'
LastModified: '1999-11-11'
Severity: CRIT
Status: Released
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 2798
OS: AIX
OSVersion: 4.2.1
Machine: RS6000
FixedDate: '1999-11-11'
FixedInVersion: 8.2.2
ClosedDate: '2000-10-25'


Name:
Christian Klutz

ReproducibleScript:
OS: AIX 4.2.1
    On AIX 4.2.1 the posix threads library is called 'libpthreads.a' not
    'libpthread.a'. On AIX 4.2.1 you must
    compile with 'cc_r' to produce a 'threaded' code.

    At least on our installation, which should be kind of standard ;-)

ObservedBehavior:
tclsh causes a SEGV when started, stacktrace:

    Segmentation fault in pthread_mutex_lock at 0xd01f99e4
    0xd01f99e4 (pthread_mutex_lock+0x160) 906a0000        stw   r3,0x0(r10)
    (dbx) where
    pthread_mutex_lock(??) at 0xd01f99e4
    TclpInitLock() at 0xd1fe9db0
    TclInitSubsystems(??) at 0xd1feb384
    Tcl_FindExecutable(??) at 0xd2018558
    Tcl_Main(??, ??, ??) at 0xd205ac98
    main(??, ??) at 0x100001e8

DesiredBehavior:
;-)

Patch:
*** aclocal.m4  Mon Sep 27 15:08:28 1999
--- new.m4      Mon Sep 27 15:10:51 1999
***************
*** 361,373 ****
        AC_DEFINE(TCL_THREADS)
        AC_DEFINE(_REENTRANT)

!       AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
!       if test "$tcl_ok" = "yes"; then
            # The space is needed
            THREADS_LIBS=" -lpthread"
!       else
            TCL_THREADS=0
            AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...")
        fi
      else
        TCL_THREADS=0
--- 361,385 ----
        AC_DEFINE(TCL_THREADS)
        AC_DEFINE(_REENTRANT)

!         if test "`uname -s`" = "AIX"; then
!           AC_CHECK_LIB(pthreads,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
!           if test "$tcl_ok" = "yes"; then
!             # The space is needed
!             THREADS_LIBS=" -lpthreads"
!             CC=cc_r
!           else
!             TCL_THREADS=0
!             AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...")
!           fi
!         else
!         AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
!         if test "$tcl_ok" = "yes"; then
            # The space is needed
            THREADS_LIBS=" -lpthread"
!         else
            TCL_THREADS=0
            AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...")
+           fi
        fi
      else
        TCL_THREADS=0

PatchFiles:
aclocal.m4, i.e. tcl.m4



added for 8.3 
-- 11/11/1999 hobbs
welch Closed ticket [218949ffff]. [History diff]2000-10-26 08:32:15
dgp Ticket [218949ffff]: 3 changes [History diff]2001-04-05 06:52:49
Log in (anonymous is fine) to add a comment.