[Python-bugs-list] [ python-Bugs-522393 ] Doesn't build on SGI

noreply@sourceforge.net noreply@sourceforge.net
Fri, 08 Mar 2002 05:43:21 -0800


Bugs item #522393, was opened at 2002-02-25 12:07
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=522393&group_id=5470

Category: Build
Group: Python 2.2.1 candidate
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Jack Jansen (jackjansen)
Assigned to: Jack Jansen (jackjansen)
Summary: Doesn't build on SGI

Initial Comment:
On the SGI I can't build the current 2.2.1 from CVS.
I get an undefined error on pthread_detach in the link step for python:
ld32: ERROR 33: Unresolved text symbol "pthread_detach" -- 1st referenced by libpython2.2.a(thread.o).


----------------------------------------------------------------------

>Comment By: Jack Jansen (jackjansen)
Date: 2002-03-08 14:43

Message:
Logged In: YES 
user_id=45365

Checked in as configure.in 1.294, configure 1.285.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-03-07 21:39

Message:
Logged In: YES 
user_id=6380

This works for me on Linux.  Jack, I suggest that you check
it in and mark it as a bugfix candidate; hopefully if there
are problems with it  on other platforms will be found out
by someone on a different platform. Make sure to mark it as
a bugfix candidate, unless you want to check it in on the
2.2 maintenance branch yourself.

----------------------------------------------------------------------

Comment By: Jack Jansen (jackjansen)
Date: 2002-02-27 00:04

Message:
Logged In: YES 
user_id=45365

Guido, I'm assigning this to you as 90% of the checkins relating to pthreads are yours. I've attached a patch to configure.in which not only tests availability of pthread_create without special options but also of pthread_detach. If you think has a good chance of being safe for other OSes too please let me know.

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2002-02-25 14:55

Message:
Logged In: YES 
user_id=6656

Oh, the joy of unix.  Special case the snot out of SGI in
configure.in?

----------------------------------------------------------------------

Comment By: Jack Jansen (jackjansen)
Date: 2002-02-25 14:24

Message:
Logged In: YES 
user_id=45365

Ouch! You are right: the trunk also doesn't build, and probably 2.2 doesn't build either. I've never checked this, because I always build --without-thread on SGI.

I've found the problem: libc contains a partial implementation of pthreads, which does include pthread_create but not pthread_detach. For the full implementation you need to add -lpthread to your link step.

But the autoconf test tests only for pthread_create(), so it thinks no extra link options are needed.

I think we should reassign this to a pthread guru, but I'm not sure who qualifies. Simply adding a pthread_detach() call to the autotest may be worse, if I read thread_pthread.h correctly thread_detach() isn't defined in all flavors of pthreads.

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2002-02-25 13:35

Message:
Logged In: YES 
user_id=6656

OK, this is odd.  Does the trunk build?  Did 2.2 build?  I
can't easily find any branch changes that would account for
this.  I haven't looked very hard yet.   Will do so later.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=522393&group_id=5470