Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 580242

Summary: dev-lang/python-3.3: Gentoo patchset breaks build on musl with duplicate inclusion
Product: Gentoo Linux Reporter: A. Wilcox (awilfox) <awilfox.gentoo>
Component: [OLD] DevelopmentAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal CC: musl
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: patch patch (metapatch?)

Description A. Wilcox (awilfox) 2016-04-16 16:09:28 UTC
Created attachment 430830 [details, diff]
patch patch (metapatch?)

Python 3.3 cannot be built on a Gentoo system using the musl libc because Gentoo patch 61_all_process_data.patch adds #include <linux/prctl.h> and #include <sys/prctl.h>.  On a glibc system, this is superfluous, as sys/prctl.h includes linux/prctl.h already.  On a musl system, this is a fatal error, because sys/prctl.h redefines a few of the macros present in linux/prctl.h.

Removal of the #include <linux/prctl.h> line resolves the build error on musl and still builds fine on glibc systems.
Comment 1 Anthony Basile gentoo-dev 2016-04-16 16:26:37 UTC
I'm going to need your emerge --info because I haven't had any problem.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-04-16 16:29:41 UTC
Is there any reason you're using 3.3? This patch is dropped in current versions of 3.4+. The only reason it's still in 3.3 is that nobody bumped the patchset for quite some time.
Comment 3 A. Wilcox (awilfox) 2016-04-22 21:41:19 UTC
Michał: I was merging Python 3.3 primarily for coverage testing, ensuring the modules I write are compatible with 3.3 for users that still have it for whatever reason.  I have no personal use for it beyond unit tests.

Anthony: My emerge --info is going to look a little strange, as I've written my own profile for sake of musl testing and a few other things, so I hope that won't be an issue.  I can do another test on the default embedded profile if you require it.

Please do note that I am not running with ~amd64, which has a different revbump of python-3.3.  That may be the difference.

Also, as previously stated, I tested this on a standard run-of-the-mill glibc box running the normal KDE profile and had no issues merging it either, so I do know this patch should be safe.

Portage HEAD (python 3.4.3-final-0, adelie/1.0/x86_64, gcc-4.9.3, musl-1.1.14, 4.5.0-ciall x86_64)
=================================================================
System uname: Linux-4.5.0-ciall-x86_64-Intel-R-_Xeon-R-_CPU_E3-1280_v3_@_3.60GHz-with-libc
KiB Mem:    16392864 total,    175872 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 12 Apr 2016 21:00:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-lang/python:          3.4.3-r7::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/musl:            1.1.14::gentoo
Repositories:

gentoo
    location: /usr/portage/gentoo
    sync-type: rsync
    sync-uri: rsync://dha.foxkit.us/gentoo-portage

adelie
    location: /usr/portage/adelie
    sync-type: git
    sync-uri: https://code.foxkit.us/adelie/packages.git

Installed sets: @dev-kit
ABI="amd64"
ABI_X86="64"
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA -AGPL-3 -AGPL-3+"
ARCH="amd64"
CFLAGS="-O2 -ggdb -march=nocona -mtune=core2 -fno-omit-frame-pointer -mfpmath=sse"
CHOST="x86_64-foxkit-linux-musl"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -ggdb -march=nocona -mtune=core2 -fno-omit-frame-pointer -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
PKGDIR="/srv/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="cxx ipv6 modules pam ssl threads unicode x86_64 xattr" ABI_X86="64" ELIBC="musl" KERNEL="linux" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4" USERLAND="GNU"
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-04-23 06:15:33 UTC
Thank you for the patch but I really think we just ought to remove the patch already, like we did for other Python versions. I did this right now.


commit 64b2b1f902ed3dcb5819581973b269efec5b2285
Author: Michał Górny <mgorny@gentoo.org>
Date:   Sat Apr 23 07:47:28 2016

    dev-lang/python: Remove obsolete process_data patch from 3.3, #580242
    
    Remove the obsolete process_data patch from both 3.3 versions.
    The patch was only needed for some packages using python.eclass,
    it is no longer carried by any other Python version (including stable
    ebuilds) and breaks the build on musl.
    
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=580242