Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 539210 - dev-lang/python-{2.7.8,2.7.9-r1} with sys-libs/musl - In file included from .../work/Python-2.7.9/Modules/python.c:11:0: /usr/include/sys/prctl.h:88:8: error: redefinition of ‘struct prctl_mm_map’
Summary: dev-lang/python-{2.7.8,2.7.9-r1} with sys-libs/musl - In file included from ....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2015-02-07 10:52 UTC by James Taylor
Modified: 2015-03-25 16:07 UTC (History)
0 users

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


Attachments
python-2.7.9-r1 build.log (file_539210.txt,25.12 KB, text/plain)
2015-02-07 10:52 UTC, James Taylor
Details
musl sys/prctl.h (file_539210.txt,3.15 KB, text/plain)
2015-02-07 10:53 UTC, James Taylor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Taylor 2015-02-07 10:52:57 UTC
Created attachment 395770 [details]
python-2.7.9-r1 build.log

Python-2.7 fails to build under musl-libc 1.1.6 due to a duplicate include in Modules/python.c, as follows:

#ifdef __linux__
#include <linux/prctl.h>
#include <sys/prctl.h>
#ifndef PR_SET_NAME
#define PR_SET_NAME 15
#endif
#endif

This causes a compilation error since musl exports structs in sys/prctl.h which conflict with the ones from the linux headers.

Steps to Reproduce:

Set up a system using the musl stage3 according to the wiki, then attempt to rebuild python-2.7

Expected result:
Python-2.7 would build and be installed with no errors

Actual result:
Build fails (log attached)

Reproducible:
Always
Comment 1 James Taylor 2015-02-07 10:53:48 UTC
Created attachment 395772 [details]
musl sys/prctl.h
Comment 2 Felix Janda 2015-02-07 11:58:20 UTC
The offending code is from 61_all_process_data.patch in python-gentoo-patches-2.7.9-0. I would suggest just removing the <linux/prctl.h> include since prctl() is not declared there.
Comment 3 Mike Gilbert gentoo-dev 2015-02-07 21:24:34 UTC
+*python-2.7.9-r2 (07 Feb 2015)
+
+  07 Feb 2015; Mike Gilbert <floppym@gentoo.org> +python-2.7.9-r2.ebuild:
+  Drop 61_all_process_data.patch, fixes musl build, bug 539210.
Comment 4 Travis Tilley 2015-03-25 16:01:35 UTC
The exact same issue exists in python 3.3.5.
Comment 5 Travis Tilley 2015-03-25 16:07:45 UTC
If i add this patch to EPATCH_EXCLUDE then python 3.3.5 compiles with musl again. Any chance we can have this fix applied to 3.3.5?