Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 317937 - dev-lang/python-{2.6.5-r2,3.1.2-r3} fail to build with Linux <2.6.9 headers
Summary: dev-lang/python-{2.6.5-r2,3.1.2-r3} fail to build with Linux <2.6.9 headers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard: 2.6.5-r3, 2.7_pre20100627, 3.1.2-r4, ...
Keywords: InVCS
: 322653 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-30 20:22 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2010-07-12 19:33 UTC (History)
2 users (show)

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


Attachments
python-2.6.5-python.c-PR_SET_NAME.patch (python-2.6.5-python.c-PR_SET_NAME.patch,417 bytes, text/plain)
2010-04-30 20:23 UTC, Jeremy Olexa (darkside) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-04-30 20:22:19 UTC
Platform is sles 9 ia64:
Linux hostname 2.6.5-7.191-default #1 SMP Tue Jun 28 14:58:56 UTC 2005 ia64 ia64 ia64 GNU/Linux

Python needs a patch or else it will try to use an undefined constant. It appears PR_SET_NAME is defined around the 2.6.9 kernel era.
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-04-30 20:23:11 UTC
Created attachment 229841 [details]
python-2.6.5-python.c-PR_SET_NAME.patch

workaround that I used to successfully compile.
Comment 2 Fabian Groffen gentoo-dev 2010-05-02 11:39:56 UTC
61_all_process_data.patch:+             prctl(PR_SET_NAME, process_name);

so the problem is introduced by a Gentoo patch.
Comment 3 Fabian Groffen gentoo-dev 2010-05-02 11:41:24 UTC
61 is the GENTOO_PYTHON_* stuff patch.

@python: what you think of Jeremy's patch?
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-05-12 22:13:27 UTC
Hi, I know this is low priority but I can't submit upstream for a revert to a Gentoo patch. Guidance?
Comment 5 John Ross Hunt 2010-06-01 22:26:29 UTC
I'm getting the same error on on ppc embedded: Linux dsmg600 2.4.21-pre4 #11 Sat Oct 3 11:50:34 CDT 2009 ppc 82xx Sandpoint GNU/Linux

Upgrading the kernel isn't much of an option unless I solder a serial port to the board and learn how to flash u-boot.

This appears to be a function that sets the process name, no?  Is it really critical for < 2.6.9 kernels?  Perhaps some of the newer prctl constants can be #ifdef'ed out for older kernels.  My concern is that the PR_SET_NAME call will have unpredictable results for older systems that don't define this function.

The prctl.h header is very sparse on my system (I'll include it if it helps).
Comment 6 Fabian Groffen gentoo-dev 2010-06-03 18:25:35 UTC
*** Bug 322653 has been marked as a duplicate of this bug. ***
Comment 7 Fabian Groffen gentoo-dev 2010-06-03 18:28:29 UTC
Can't we just axe this patch, or apply the one from Jeremy in Prefix?  Knowing the python team policies, the patch probably went upstream, and got accepted, so just another case of where we have to fight python upstream's annoyingness.
Comment 8 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-03 18:47:28 UTC
This patch is probably wrong. We will apply better patch.
Comment 9 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-04 15:04:52 UTC
(In reply to comment #8)

Apparently Jeremy Olexa mistested a test file...
Comment 10 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-29 03:51:27 UTC
2.7, 3.2: r345
Comment 11 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-29 05:25:12 UTC
Fixed in 2.7_pre20100627 and 3.2_pre20100627.
Comment 12 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-07-12 16:51:28 UTC
2.6, 3.1: r356
Comment 13 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-07-12 19:32:44 UTC
Fixed in 2.6.5-r3 and 3.1.2-r4.