Compiling Python threads under Solaris 2.5 
Author Message
 Compiling Python threads under Solaris 2.5

Has anyone successfully compiled python 1.3's thread library on Solaris 2.5?

When I try, I get an error to the effect that a pathname containing the magic
string ".../guido/..." is unavailable on my system. When I try substituting a
reasonable alternative, things just get worse.

The culprit is the following from Python/thread_pthread.h:
        #ifdef sun
        #define FLORIDA_HACKS
        #endif

        #ifdef FLORIDA_HACKS
        /* Hacks for Florida State Posix threads implementation */
        #undef _POSIX_THREADS
        #include "/ufs/guido/src/python/Contrib/pthreads/src/pthread.h"
        ...



Wed, 07 Oct 1998 03:00:00 GMT  
 Compiling Python threads under Solaris 2.5

  Piers> Has anyone successfully compiled Python 1.3's thread library
  Piers> on Solaris 2.5?  When I try, I get an error to the effect
  Piers> that a pathname containing the magic string ".../guido/..."
  Piers> is unavailable on my system. When I try substituting a
  Piers> reasonable alternative, things just get worse.

the trouble is that Solaris 2.5 provides BOTH the pthreads API and the
Sun threads API.  python 1.3's autoconf script get confused (since it
doesn't expect Solaris boxes to have pthreads), and decides to try
pthreads.

there's a hack left in the thread_pthread.h which tries to use Guido's
local copy of the florida pthreads if it's on a Sun box and wants
pthreads.

the fix is to manually hack the config.h to force it to use sun
threads or compile on 2.4 ;-)  let me know if you need more info.

this will be fixed in Python 1.4, together with some other threads
nasties.

-- David Arnold   ,=================================================
================='                              +617 3654310 (voice)
CRC for Distributed Systems Technology          +617 3654311   (fax)

Australia                          <http://www.dstc.edu.au/>   (web)

  C++ compilers rarely optimize for the joy of programming - lwall



Wed, 07 Oct 1998 03:00:00 GMT  
 Compiling Python threads under Solaris 2.5

The following quick hack worked fine for me.  Obviously, the
configuration gets confused by finding both Solaris and POSIX threads
on the same machine...

        /F

14 mughi:~/pb/Python-1.3/Python $ diff -c thread.c~ thread.c
*** thread.c~   Thu Mar 21 13:48:30 1996
--- thread.c    Thu Mar 21 13:49:06 1996
***************
*** 121,129 ****
  #include "thread_lwp.h"
  #endif

! #ifdef _POSIX_THREADS
! #include "thread_pthread.h"
! #endif

  #ifdef C_THREADS
  #include "thread_cthread.h"
--- 121,129 ----
  #include "thread_lwp.h"
  #endif

! //#ifdef _POSIX_THREADS
! //#include "thread_pthread.h"
! //#endif

  #ifdef C_THREADS
  #include "thread_cthread.h"



Wed, 07 Oct 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. configuring Python 1.4 for threads with Solaris 2.5

2. Python 1.3 with threads on Solaris 2.5?

3. Compiling Fortran on Solaris 2.5 for 2.4

4. Compile Problem in Sun Solaris 2.5

5. Compiling gcl-2.2 on solaris 2.5 (aka sunos 5.5)

6. compiling tix 4.1.0 under Solaris 2.5

7. Compiling on Solaris 2.5 with CenterLine C++

8. Can't compile on Solaris 2.5

9. Compile Problems on Solaris 2.5

10. compiling tclX on Solaris 2.5

11. compile on Solaris 2.5

12. Troubles compiling Tcl 7.5b1 under Solaris 2.5

 

 
Powered by phpBB® Forum Software