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

Bug 576142

Summary: dev-python/cryptography-1.2.2: conflicting types for 'BIO_new_mem_buf' with >=dev-libs/openssl-1.0.2g
Product: Gentoo Linux Reporter: Albert W. Hopkins <marduk>
Component: [OLD] DevelopmentAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal CC: skrattaren, xarthisius
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/pyca/cryptography/issues/2750
Whiteboard:
Package list:
Runtime testing required: ---

Description Albert W. Hopkins 2016-03-01 17:46:47 UTC
It builds fine when built against openssl-1.0.2f, but after upgrading to 1.0.2g I get:


[...]
creating /var/tmp/portage/dev-python/cryptography-1.2.2/work/cryptography-1.2.2-python2_7/temp.linux-x86_64-2.7/var/tmp/portage/dev-python/cryptography-1.2.2/work/cryptography-1.2.2-python2_7/temp.linux-x86_64-2.7
x86_64-pc-linux-gnu-gcc -march=core-avx-i -mtune=haswell -O2 -Qn -s -pipe -fPIC -I/usr/include/python2.7 -c /var/tmp/portage/dev-python/cryptography-1.2.2/work/cryptography-1.2.2-python2_7/temp.linux-x86_64-2.7/_openssl.c -o /var/tmp/portage/dev-python/cryptography-1.2.2/work/cryptography-1.2.2-python2_7/temp.linux-x86_64-2.7/var/tmp/portage/dev-python/cryptography-1.2.2/work/cryptography-1.2.2-python2_7/temp.linux-x86_64-2.7/_openssl.o
/var/tmp/portage/dev-python/cryptography-1.2.2/work/cryptography-1.2.2-python2_7/temp.linux-x86_64-2.7/_openssl.c:726:6: error: conflicting types for 'BIO_new_mem_buf'
 BIO *BIO_new_mem_buf(void *, int);
      ^
In file included from /usr/include/openssl/asn1.h:65:0,
                 from /var/tmp/portage/dev-python/cryptography-1.2.2/work/cryptography-1.2.2-python2_7/temp.linux-x86_64-2.7/_openssl.c:434:
/usr/include/openssl/bio.h:692:6: note: previous declaration of 'BIO_new_mem_buf' was here
 BIO *BIO_new_mem_buf(const void *buf, int len);
      ^
error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1
 * ERROR: dev-python/cryptography-1.2.2::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  133:  Called src_compile
 *   environment, line 3634:  Called distutils-r1_src_compile
 *   environment, line  950:  Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
 *   environment, line  337:  Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 3174:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2283:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2281:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line  599:  Called distutils-r1_run_phase 'distutils-r1_python_compile'
 *   environment, line  941:  Called distutils-r1_python_compile
 *   environment, line  813:  Called esetup.py 'build'
 *   environment, line 1441:  Called die
 * The specific snippet of code:
 *       "${@}" || die "${die_args[@]}" || return ${?}
 * 
 * If you need support, post the output of `emerge --info '=dev-python/cryptography-1.2.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/cryptography-1.2.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-python/cryptography-1.2.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/cryptography-1.2.2/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/cryptography-1.2.2/work/cryptography-1.2.2'
 * S: '/var/tmp/portage/dev-python/cryptography-1.2.2/work/cryptography-1.2.2'
 * 
 * The following package has failed to build, install, or execute postinst:
 * 
 *  (dev-python/cryptography-1.2.2:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/tmp/portage/dev-python/cryptography-1.2.2/temp/build.log'
 *
Comment 1 Albert W. Hopkins 2016-03-01 17:50:09 UTC
# emerge --info =dev-python/cryptography-1.2.2
Portage 2.2.27 (python 3.5.1-final-0, default/linux/amd64/13.0, gcc-5.3.0, glibc-2.22-r2, 4.4.3-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.3-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E3-1225_V2_@_3.20GHz-with-gentoo-2.2
KiB Mem:    32752512 total,  21264240 free
KiB Swap:    3145724 total,   3145724 free
Timestamp of repository gentoo: Tue, 01 Mar 2016 16:37:10 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.3_p42-r2::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo
dev-util/cmake:           3.4.3::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: /var/lib/jenkins/workspace/lighthouse/
    priority: -1000

marduk
    location: /var/lib/layman/marduk
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA google-chrome google-talkplugin Google-TOS skype-4.0.0.7-copyright"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx-i -mtune=haswell -O2 -Qn -s -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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="-march=core-avx-i -mtune=haswell -O2 -Qn -s -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="     --autounmask=n      --binpkg-respect-use=y     --jobs      --keep-going      --misspell-suggestions=n     --oneshot     --quiet-build      --quiet-unmerge-warn   --buildpkg --rebuilt-binaries=y --jobs=5 --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks fixlafiles news noinfo nostrip notitles parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms skiprocheck 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="--jobs=5 --load-average=5.64"
PKGDIR="/var/portage/packages"
PORTAGE_COMPRESS=""
PORTAGE_COMPRESS_FLAGS=""
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--info=progress2"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl aes amd64 avx avx2 cjk fma3 introspection ipv6 mmx mmxext nls opentype pam popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3 systemd unicode utf8 xattr" ABI_X86="64" APACHE2_MODULES="authn_core authz_core authz_host authz_user unixd socache_shmcb auth_digest authn_file authz authz_groupfile dav dav_fs dir group_file mime" APACHE2_MPMS="prefork" CAMERAS="*" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" DRACUT_MODULES="lvm" ELIBC="glibc" FFTOOLS="*" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" NGINX_MODULES_HTTP="auth_basic gzip proxy rewrite uwsgi" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="intel i915 i965"
USE_PYTHON="3.5 2.7"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND

=================================================================
                        Package Settings
=================================================================

dev-python/cryptography-1.2.2::gentoo was built with the following:
USE="-libressl -test" ABI_X86="64" PYTHON_TARGETS="python2_7 python3_5 -pypy -python3_3 -python3_4"
Comment 2 Ryoto Yayame 2016-03-01 18:51:23 UTC
I have the same rebuilding error with stable dev-python/cryptography-1.1.2
Comment 3 Jason A. Donenfeld gentoo-dev 2016-03-01 19:28:00 UTC
Likewise, this is a considerable problem after updating to openssl-1.0.2g.
Comment 5 Ryoto Yayame 2016-03-01 21:19:35 UTC
(In reply to Jason A. Donenfeld from comment #4)
> Fixed it myself.
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=fe3faddb9bf793b16a104bc5f0d304f14e8cf057

Your patch applies on stable version 1.1.2 too, and it now compiles fine. Thanks!


The title should probably be modified to reflect the fact it happens on previous versions too though, and the patch should be applied to previous versions in Portage, if latest version 1.2.2 is not ready for stabilization...
Comment 6 Mike Gilbert gentoo-dev 2016-03-02 03:04:26 UTC
Reopening.
Comment 7 Mike Gilbert gentoo-dev 2016-03-02 03:20:03 UTC
Upstream has a better patch, which I applied to 1.1.2 and 1.2.2.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=223f004279c64d8abffa2e3a051f9f8e23131f1e