sys-auth/sssd-1.13.0 fails configure with "Could not find python2 headers". Tried setting USE to "-python_single_target_python2_7 python_single_target_python3_4 python_targets_python3_4 -python_targets_python2_7" but package still insists on using python 2.7. Reproducible: Always emerge --info Portage 2.2.20 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop/kde/systemd, gcc-4.9.3, glibc-2.20-r2, 4.1.2-gentoo x86_64) ================================================================= System uname: Linux-4.1.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-gentoo-2.2 KiB Mem: 32896468 total, 5386708 free KiB Swap: 6291452 total, 6291452 free Timestamp of repository gentoo: Mon, 13 Jul 2015 16:15:01 +0000 sh bash 4.3_p39 ld GNU ld (Gentoo 2.25 p1.2) 2.25 app-shells/bash: 4.3_p39::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.20.2-r1::gentoo dev-lang/python: 2.7.10::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo dev-util/cmake: 3.2.3::gentoo dev-util/pkgconfig: 0.28-r3::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.17::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25-r1::gentoo sys-devel/gcc: 4.9.3::gentoo sys-devel/gcc-config: 1.8::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.20-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync11.us.gentoo.org/gentoo-portage priority: -1000 desktop location: /usr/local/portage/desktop masters: gentoo priority: 0 server location: /usr/local/portage/server masters: gentoo priority: 1 gnome location: /var/lib/layman/gnome masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" 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 -march=native -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac aalib acl acpi aes alsa amd64 amr apache2 audiofile avahi avx bash-completion berkdb bluray branding btrfs bzip2 cairo caps cdaudio cdda cddb cdparanoia cdr cdrdao chm cleartype cli corefonts cracklib crypt cups curl cxx dbus declarative designer-plugin djvu dri dts dv dvb dvd dvdr ebook emboss encode exif fam fdk ffmpeg firefox flac fortran gdbm gif glamor gmp google gphoto2 gpm gstreamer gtk gtk3 iconv icu ieee1394 imagemagick imap imlib introspection ipv6 jack java jpeg jpeg2k kde kipi kpathsea lame lash lcms libffi libnotify lzma mad marble midi mmap mmx mmxext mng modules mozilla mp3 mp4 mpeg mtp multilib musicbrainz ncurses network nls nodrm nptl nsplugin nvidia ofx ogg opencl openexr opengl openmp pam pango pcre pdf phonon plasma png policykit popcnt ppds pulseaudio qt3support qt4 readline rtmp sasl scanner sdl semantic-desktop session slp smp sndfile spell sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification subversion svg systemd theora threads tiff tk transparency truetype type1 udev udisks unicode unwind upower usb v4l vaapi vcd vdpau vim-syntax vorbis vpx wav wavpack wayland wmf wxwidgets x264 xattr xcomposite xine xinerama xkb xml xscreensaver xv xvid xvmc zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel hdsp hpet hrtimer rtctimer seqdummy virmidi" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="author braindump flow karbon kexi krita sheets stage words" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US en" NGINX_MODULES_HTTP="autoindex fancyindex fastcgi gzip" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19 ruby20" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau intel modesetting" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
emerge -pv sssd and build.log please
emerge -pqv sys-auth/sssd [ebuild U ] sys-auth/sssd-1.13.0 [1.12.5] USE="locator manpages nls python -acl -augeas -autofs -netlink -nfsv4 -samba (-selinux) -ssh -sudo {-test}" ABI_X86="32 (64) (-x32)" PYTHON_SINGLE_TARGET="python2_7 -python3_3 -python3_4" PYTHON_TARGETS="python2_7 python3_3 -python3_4"
Created attachment 407038 [details] sssd-1.13.0-build.log
Can you also give me the output of qlist python | grep Python.h and emerge -pv python:2.7
qlist python | grep Python.h /usr/include/python2.7/Python.h /usr/include/python3.3/Python.h /usr/include/python3.4/Python.h /usr/include/wx-3.0/wx/wxPython/wxPython.h emerge -pv python:2.7 These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-lang/python-2.7.10:2.7::gentoo USE="gdbm ipv6 ncurses readline sqlite ssl threads tk (wide-unicode) xml (-berkdb) -build -doc -examples -hardened -wininst" 0 KiB
any assistance is greatly appreciated...
Please do not randomly CC people
I don't know what's wrong with your system so far... Can you give me the output of /usr/bin/python2.7-config --includes and then ~$ cat > foo.cpp << EOF #include <Python.h> EOF cpp $(/usr/bin/python2.7-config --includes) foo.cpp 1>/dev/null Are you sure your toolchain is ok?
$ /usr/bin/python2.7-config --includes -I/usr/include/python2.7 -I/usr/include/python2.7 $ cat foo.cpp #include <Python.h> $ cpp $(/usr/bin/python2.7-config --includes) foo.cpp 1>/dev/null $ No reason to suspect my toolchain wasn't OK - could compile everything else, including remerging the currently installed sys-auth/sssd-1.12.5 with no issues. However I am currently rebuilding the toolchain just in case.
I am CC'ing python here because I can't figure out what's wrong with your installation.
(In reply to Markos Chandras from comment #10) > I am CC'ing python here because I can't figure out what's wrong with your > installation. Thanks. Adding that there's no change after rebuilding the toolchain. Configure stage still fails.
Got the same failure here, although I'm not using python bindings. It seems, that the python use flag does not work anymore, and the bindings are built. My use flags are: sys-auth/sssd-1.13.0::gentoo [1.12.5::gentoo] USE="acl locator manpages nls -augeas -autofs -netlink -nfsv4 -python -samba (-selinux) -ssh -sudo {-test}" ABI_X86="32 (64) (-x32)" PYTHON_SINGLE_TARGET="python2_7 -python3_3 -python3_4" PYTHON_TARGETS="python2_7 python3_3 -python3_4" There were some packaging changes with python for this version: https://fedorahosted.org/sssd/wiki/Releases/Notes-1.13.0 If you try compiling with ABI_X86="64", it doesn't try to look for the multilib python and fail. With that, I am able to build it, but I will get the python bindings too with USE=-python.
(In reply to Jaakko Perttilä from comment #12) > It seems, that the python use flag does not work anymore, and the bindings > are built. The build log does show that problem: "configure: WARNING: unrecognized options: --without-python-bindings" Looks like a problem with the ebuild not taking some changes into consideration as it's virtually a direct copy of the 1.12.5 ebuild.
Ok can you try the following patch please? Builds ok for me with and without USE=python but clearly my system is not a proper test case. @python: Guys how do you feel about this patch? Index: sssd-1.13.0.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-auth/sssd/sssd-1.13.0.ebuild,v retrieving revision 1.1 diff -u -B -u -r1.1 sssd-1.13.0.ebuild --- sssd-1.13.0.ebuild 11 Jul 2015 21:11:58 -0000 1.1 +++ sssd-1.13.0.ebuild 22 Jul 2015 16:58:19 -0000 @@ -6,7 +6,7 @@ PYTHON_COMPAT=( python{2_7,3_3,3_4} ) -inherit python-single-r1 multilib pam linux-info autotools multilib-minimal systemd toolchain-funcs +inherit python-r1 multilib pam linux-info autotools multilib-minimal systemd toolchain-funcs DESCRIPTION="System Security Services Daemon provides access to identity and authentication" HOMEPAGE="http://fedorahosted.org/sssd/" @@ -95,7 +95,15 @@ multilib_src_configure() { # set initscript to sysv because the systemd option needs systemd to # be installed. We provide our own systemd file anyway. - local myconf=( + local myconf=() + if [[ "${PYTHON_TARGETS}" == *python2* ]]; then + myconf+=($(multilib_native_use_with python python-bindings2)) + fi + if [[ "${PYTHON_TARGETS}" == *python3* ]]; then + myconf+=($(multilib_native_use_with python python-bindings3)) + fi + + myconf+=( --localstatedir="${EPREFIX}"/var --enable-nsslibdir="${EPREFIX}"/$(get_libdir) --with-plugin-path="${EPREFIX}"/usr/$(get_libdir)/sssd @@ -111,7 +119,6 @@ $(multilib_native_use_enable augeas config-lib) $(multilib_native_use_with selinux) $(multilib_native_use_with selinux semanage) - $(multilib_native_use_with python python-bindings) $(use_enable locator krb5-locator-plugin) $(multilib_native_use_with nfsv4 nfsv4-idmapd-plugin) $(use_enable nls )
Sorry posted the wrong patch... but i am still not happy with it... Index: sssd-1.13.0.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-auth/sssd/sssd-1.13.0.ebuild,v retrieving revision 1.1 diff -u -B -u -r1.1 sssd-1.13.0.ebuild --- sssd-1.13.0.ebuild 11 Jul 2015 21:11:58 -0000 1.1 +++ sssd-1.13.0.ebuild 22 Jul 2015 17:09:15 -0000 @@ -6,7 +6,7 @@ PYTHON_COMPAT=( python{2_7,3_3,3_4} ) -inherit python-single-r1 multilib pam linux-info autotools multilib-minimal systemd toolchain-funcs +inherit python-r1 multilib pam linux-info autotools multilib-minimal systemd toolchain-funcs DESCRIPTION="System Security Services Daemon provides access to identity and authentication" HOMEPAGE="http://fedorahosted.org/sssd/" @@ -76,7 +76,6 @@ ) pkg_setup(){ - use python && python-single-r1_pkg_setup linux-info_pkg_setup } @@ -95,7 +94,15 @@ multilib_src_configure() { # set initscript to sysv because the systemd option needs systemd to # be installed. We provide our own systemd file anyway. - local myconf=( + local myconf=() + if [[ "${PYTHON_TARGETS}" == *python2* ]]; then + myconf+=($(multilib_native_use_with python python2-bindings)) + fi + if [[ "${PYTHON_TARGETS}" == *python3* ]]; then + myconf+=($(multilib_native_use_with python python3-bindings)) + fi + + myconf+=( --localstatedir="${EPREFIX}"/var --enable-nsslibdir="${EPREFIX}"/$(get_libdir) --with-plugin-path="${EPREFIX}"/usr/$(get_libdir)/sssd @@ -111,7 +118,6 @@ $(multilib_native_use_enable augeas config-lib) $(multilib_native_use_with selinux) $(multilib_native_use_with selinux semanage) - $(multilib_native_use_with python python-bindings) $(use_enable locator krb5-locator-plugin) $(multilib_native_use_with nfsv4 nfsv4-idmapd-plugin) $(use_enable nls ) @@ -179,7 +185,6 @@ multilib_src_install_all() { einstalldocs prune_libtool_files --all - use python && python_optimize insinto /etc/sssd insopts -m600
(In reply to Markos Chandras from comment #15) Seems to be working here, tried with and without python USE="acl locator manpages nls samba -augeas -autofs -netlink -nfsv4 -python (-selinux) -ssh -sudo {-test}" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python2_7 python3_3 -python3_4" USE="acl locator manpages nls python samba -augeas -autofs -netlink -nfsv4 (-selinux) -ssh -sudo {-test}" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python2_7 python3_3 -python3_4" Thanks.
Thanks. I have committed the fix. Things can't get any worse anyway. Please sync in a couple of hours and re-open if it is still broken for you + 22 Jul 2015; Markos Chandras <hwoarang@gentoo.org> + +files/sssd-1.13.0-fix-init.patch, sssd-1.13.0.ebuild: + Fix python support. Bug #554776. Respect SSSD_OPTIONS in init script. Bug + #553678 +
This patch seriously violates QA rules, for: a) you allow the user to select more than one python3 version when only one will actually be used, b) you don't even use the USE flags to select python but instead rely on some random build system logic which may choose whatever 'eselect python' did (welcome back, python.eclass times) or fail randomly. So please don't do that. If you really want to support two Python versions, you need to add proper REQUIRED_USE (use python_gen_useflags to get all supported impls for each set) and python_foreach_impl() to get details for enabled impls.
(In reply to Michał Górny from comment #18) > This patch seriously violates QA rules, for: > > a) you allow the user to select more than one python3 version when only one > will actually be used, > > b) you don't even use the USE flags to select python but instead rely on > some random build system logic which may choose whatever 'eselect python' > did (welcome back, python.eclass times) or fail randomly. > > So please don't do that. If you really want to support two Python versions, > you need to add proper REQUIRED_USE (use python_gen_useflags to get all > supported impls for each set) and python_foreach_impl() to get details for > enabled impls. Can you please provide an example patch because what you say are all good in theory but my python eclass knowledge is not great.
Well, the idea would be something along these lines: # Require at most one python2*, and at most one python3*. PYTHON_REQUIRED_USE is going to force 'at least one python implementation' here. REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ?? ( $(python_gen_useflags 'python2*') ) ?? ( $(python_gen_useflags 'python3*') ) )" multilib_src_configure() { # disable both first myconf=( --without-python-bindings2 --without-python-bindings3 ) py_src_configure() { # this func will be called at most two times thanks to REQUIRED_USE. # once for py2, once for py3. if python_is_python3; then myconf+=( --with-python-bindings3 PYTHON3="${PYTHON}" ) else myconf+=( --with-python-bindings2 PYTHON2="${PYTHON}" ) fi } # try enabling impls only for native ABI, with USE=python. multilib_is_native_abi && use python && python_foreach_impl py_src_configure #... } Note: PYTHON2, PYTHON3 above are just random guesses/placeholders. You have to figure out which Python-related variables the build system uses, and override *all* of them. I mean, the build system can't call 'python', 'pythonX', 'python-config', 'pythonX-config' or 'pkg-config ... python{,2,3}'.
(In reply to Michał Górny from comment #20) > Well, the idea would be something along these lines: > > # Require at most one python2*, and at most one python3*. > PYTHON_REQUIRED_USE is going to force 'at least one python implementation' > here. > > REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ?? ( $(python_gen_useflags > 'python2*') ) ?? ( $(python_gen_useflags 'python3*') ) )" > > multilib_src_configure() { > # disable both first > myconf=( > --without-python-bindings2 > --without-python-bindings3 > ) > > py_src_configure() { > # this func will be called at most two times thanks to REQUIRED_USE. > # once for py2, once for py3. > > if python_is_python3; then > myconf+=( > --with-python-bindings3 > PYTHON3="${PYTHON}" > ) > else > myconf+=( > --with-python-bindings2 > PYTHON2="${PYTHON}" > ) > fi > } > # try enabling impls only for native ABI, with USE=python. > multilib_is_native_abi && use python && python_foreach_impl > py_src_configure > > #... > } > > Note: PYTHON2, PYTHON3 above are just random guesses/placeholders. You have > to figure out which Python-related variables the build system uses, and > override *all* of them. I mean, the build system can't call 'python', > 'pythonX', 'python-config', 'pythonX-config' or 'pkg-config ... > python{,2,3}'. That solution does seem extremely ugly...
Please re-open if problem is still alive. I do not see this now