[Python-bugs-list] [Bug #114027] Compiling on alpha-osf1v4: libpthreads is called libpthread

noreply@sourceforge.net noreply@sourceforge.net
Tue, 24 Oct 2000 14:01:58 -0700


Bug #114027, was updated on 2000-Sep-10 22:43
Here is a current snapshot of the bug.

Project: Python
Category: Build
Status: Closed
Resolution: Fixed
Bug Group: Platform-specific
Priority: 1
Summary: Compiling on alpha-osf1v4: libpthreads is called libpthread

Details: change -lpthreads into -lpthread

Follow-Ups:

Date: 2000-Sep-16 09:59
By: gvanrossum

Comment:
I don't have enough information to resolve this problem.
What Python version were you using?

Did you use the configure script? It should automtically select -lpthreads or -lpthread depending on which one is present. Did this fail for you? Please check the config.log file to find out more about this.

Since I don't have an Alpha OSF1v1 system, I can't debug this for you!
-------------------------------------------------------

Date: 2000-Sep-18 08:01
By: janw

Comment:
Python-2.0b1, with configure. And it looks like configure doesn't get this right.

I asked a colleague to look a bit more into this. He found the following:
1) You can use either pthreads? or decthreads. If you call configure with decthreads it compiles and runs fine, but the manpage says that decthreads are only there for backwards compatibility.
2) In the pthreads? case there are different possibilities:
- You can include the phtread.h file or not.
- You can call pthread_create with arguments or not.
- You can link with -lpthread or with -lpthreads
The manpage for pthread(2) suggests to use the compiler option -pthread, which boils down to cc -D_REENTRANT and ld -lpthread -lexc (modulo other options).
It looks like configure tries with a testfile without including pthread.h, thusly -lpthreads gets used. The sources *do* include pthread.h, but then you have to link against -lpthread.
Suggested fix: Change configure test file so that pthread.h gets included and call pthread_create(0,0,0,0) (eg. give four dummy arguments).
This works for OSF1, but we did not test if it breaks anything on other platforms.

Hope you can understand the description.
-------------------------------------------------------

Date: 2000-Oct-06 10:23
By: gvanrossum

Comment:
I'm afraid I can't quite decypher what you meant by your (clearly well-intended!) diagnosis. Do you think you could whip up a patch for configure.in? (Your suggestion to change the configure test is not specific enough for me to figure oput what needs to be done.)
-------------------------------------------------------

Date: 2000-Oct-17 15:35
By: gvanrossum

Comment:
Can you check that this is fixed in the final release of Python 2.0 (on pythonlabs.com now)? We changed something for the OSF1 platform that should take care of this.

If you confirm it's fixed I'll close the bug report.
-------------------------------------------------------

Date: 2000-Oct-24 14:01
By: gvanrossum

Comment:
I haven't heard back from the submitter, but I'm closing this anyway, since according to Charles Waldman Python 2.0 (final) builds and runs fine on OSF1/Alpha.
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=114027&group_id=5470