Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 159967 - python doesn't add pthread to LIBS correctly on BSD
Summary: python doesn't add pthread to LIBS correctly on BSD
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 148018 158019 165596 176517
  Show dependency tree
 
Reported: 2007-01-04 07:26 UTC by Roy Marples (RETIRED)
Modified: 2007-05-07 07:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Link to -pthread (python-bsd.patch,434 bytes, patch)
2007-01-04 07:27 UTC, Roy Marples (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Marples (RETIRED) gentoo-dev 2007-01-04 07:26:34 UTC
Python isn't adding pthread to LIBS correctly in it's Makefile for BSD.
Whilst this isn't a problem for python itself - as it's correctly got the -pthread CFLAG, it is a problem for any application that query pythons Makefile to work out what libraries it needs to link to.

The issue stems from a test for sem_init in which appears to be in pthread and in other libs on other OS's.

The quick fix is to adjust the gentoo_obsd patch to include FreeBSD in the hardcoded test.

However, I don't think this is the best approach.
I think the best approach would be that if -pthread is in the CFLAGS or CC then it should be moved to LIBS as this should then satisfy any OS that uses -pthreads and any app can then link correctly.
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-01-04 07:27:42 UTC
Created attachment 105383 [details, diff]
Link to -pthread

Remember to eautoconf after patching :)
Comment 2 Bryan Østergaard (RETIRED) gentoo-dev 2007-05-07 07:57:53 UTC
Fixed in 2.3.6-r1, 2.4.4-r1 and 2.5.1.