Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634462 - dev-python/m2crypto-0.26.4 - /var/tmp/portage/dev-python/m2crypto-0.26.4/work/M2Crypto-0.26.4/SWIG/libcrypto-compat.h:8:27: fatal error: openssl/ecdsa.h: No such file or directory
Summary: dev-python/m2crypto-0.26.4 - /var/tmp/portage/dev-python/m2crypto-0.26.4/work...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-16 16:50 UTC by Martin Mokrejš
Modified: 2017-12-20 18:18 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2017-10-16 16:50:28 UTC
Seems this package requires a different (older?) version of openssl?

running build_ext
building 'M2Crypto._m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -D__x86_64__ -I/usr/include/python2.7 -I/usr/include -I/usr/include/openssl -includeall -modern -builtin -outdir /scratch/var/tmp/portage/dev-python/m2crypto-0.26.4/work/M2Crypto-0.26.4/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
creating /scratch/var/tmp/portage/dev-python/m2crypto-0.26.4/work/M2Crypto-0.26.4-python2_7/temp.linux-x86_64-2.7
creating /scratch/var/tmp/portage/dev-python/m2crypto-0.26.4/work/M2Crypto-0.26.4-python2_7/temp.linux-x86_64-2.7/SWIG
x86_64-pc-linux-gnu-gcc -O2 -pipe -march=sandybridge -mtune=native -ftree-vectorize -fPIC -I/usr/include/python2.7 -I/usr/include -I/usr/include/openssl -I/scratch/var/tmp/portage/dev-python/m2crypto-0.26.4/work/M2Crypto-0.26.4/SWIG -c SWIG/_m2crypto_wrap.c -o /scratch/var/tmp/portage/dev-python/m2crypto-0.26.4/work/M2Crypto-0.26.4-python2_7/temp.linux-x86_64-2.7/SWIG/_m2crypto_wrap.o -DTHREADING
In file included from SWIG/_m2crypto_wrap.c:3829:0:
/scratch/var/tmp/portage/dev-python/m2crypto-0.26.4/work/M2Crypto-0.26.4/SWIG/libcrypto-compat.h:8:27: fatal error: openssl/ecdsa.h: No such file or directory
compilation terminated.
error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1
 * ERROR: dev-python/m2crypto-0.26.4::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_compile
 *   environment, line 2703:  Called distutils-r1_src_compile
 *   environment, line  829:  Called _distutils-r1_run_foreach_impl 'python_compile'
 *   environment, line  346:  Called python_foreach_impl 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 2243:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 1545:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 1543:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_compile'
 *   environment, line  561:  Called distutils-r1_run_phase 'python_compile'
 *   environment, line  822:  Called python_compile
 *   environment, line 1831:  Called distutils-r1_python_compile '--openssl=/usr'
 *   environment, line  697:  Called esetup.py 'build' '--openssl=/usr'
 *   environment, line 1090:  Called die
 * The specific snippet of code:
 *       "${@}" || die "${die_args[@]}";
 * 
 * If you need support, post the output of `emerge --info '=dev-python/m2crypto-0.26.4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/m2crypto-0.26.4::gentoo'`.
 * The complete build log is located at '/scratch/var/tmp/portage/dev-python/m2crypto-0.26.4/temp/build.log'.
 * The ebuild environment file is located at '/scratch/var/tmp/portage/dev-python/m2crypto-0.26.4/temp/environment'.
 * Working directory: '/scratch/var/tmp/portage/dev-python/m2crypto-0.26.4/work/M2Crypto-0.26.4'
 * S: '/scratch/var/tmp/portage/dev-python/m2crypto-0.26.4/work/M2Crypto-0.26.4'



# emerge -pv openssl

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  r  U #] dev-libs/openssl-1.1.0f:0/1.1::gentoo [1.0.2l:0/0::gentoo] USE="asm bindist sctp zlib -rfc3779 -static-libs {-test} -tls-heartbeat* -vanilla (-gmp%*) (-kerberos%) (-sslv2%) (-sslv3%*)" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="(sse2)" 0 KiB

...
Comment 1 Martin Mokrejš 2017-10-16 16:53:24 UTC
I suspect ecdsa.h was dropped from openssl.

# equery files openssl | grep -i ecdsa
/usr/share/man/man3/ECDSA_SIG_free.3ssl.bz2
/usr/share/man/man3/ECDSA_SIG_new.3ssl.bz2
/usr/share/man/man3/ECDSA_do_sign.3ssl.bz2
/usr/share/man/man3/ECDSA_do_sign_ex.3ssl.bz2
/usr/share/man/man3/ECDSA_do_verify.3ssl.bz2
/usr/share/man/man3/ECDSA_sign.3ssl.bz2
/usr/share/man/man3/ECDSA_sign_ex.3ssl.bz2
/usr/share/man/man3/ECDSA_sign_setup.3ssl.bz2
/usr/share/man/man3/ECDSA_size.3ssl.bz2
/usr/share/man/man3/ECDSA_verify.3ssl.bz2
/usr/share/man/man3/d2i_ECDSA_SIG.3ssl.bz2
/usr/share/man/man3/ecdsa.3ssl.bz2
/usr/share/man/man3/i2d_ECDSA_SIG.3ssl.bz2
#
Comment 2 Brian Evans (RETIRED) gentoo-dev 2017-10-16 17:11:22 UTC
It sounds like you have some old headers somewhere that is throwing this compile for a loop.

I say this because libcrypto-compat.h has at the top:

#if OPENSSL_VERSION_NUMBER < 0x10100000L

So if you really do have only one copy of OpenSSL 1.1.0, there is something else allowing that macro to finish.
Comment 3 Martin Mokrejš 2017-10-16 17:26:15 UTC
Here is full list of scheduled reinstalls, which drives me crazy. I do not want openssl-1.1.0f, I want to stay with 1.0.2l. I put it into package.mask and still somehow it gets selected. Anyway, maybe a hint for you?


# emerge -pv openssl

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  r  U #] dev-libs/openssl-1.1.0f:0/1.1::gentoo [1.0.2l:0/0::gentoo] USE="asm bindist sctp zlib -rfc3779 -static-libs {-test} -tls-heartbeat* -vanilla (-gmp%*) (-kerberos%) (-sslv2%) (-sslv3%*)" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="(sse2)" 0 KiB
[ebuild  rR    ] dev-perl/Net-SSLeay-1.810.0::gentoo  USE="-examples -libressl -minimal {-test}" 0 KiB
[ebuild  rR    ] net-misc/stunnel-5.40::gentoo  USE="ssl tcpd -ipv6 -libressl (-selinux) -stunnel3" 0 KiB
[ebuild  rR    ] net-misc/curl-7.56.0::gentoo  USE="ssl threads -adns -http2 -idn -ipv6 -kerberos -ldap -metalink -rtmp -samba -ssh -static-libs {-test}" ABI_X86="32 (64) (-x32)" CURL_SSL="openssl -axtls -gnutls -libressl -mbedtls -nss (-winssl)" 0 KiB
[ebuild  rR    ] app-crypt/rhash-1.3.5::gentoo  USE="nls openssl -debug -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild  rR    ] dev-qt/qtnetwork-5.9.2:5/5.9::gentoo  USE="bindist ssl -connman -debug -libproxy -networkmanager {-test}" 0 KiB
[ebuild  rR    ] dev-libs/xmlsec-1.2.24-r1::gentoo  USE="gcrypt gnutls nss openssl -doc -libressl -static-libs" 0 KiB
[ebuild  rR    ] www-client/w3m-0.5.3-r9::gentoo  USE="X fbcon gpm gtk nls ssl unicode -imlib -libressl -lynxkeymap -nntp -xface" L10N="-ja" 0 KiB
[ebuild  rR    ] app-crypt/sbsigntool-0.8::gentoo  USE="-libressl" 0 KiB
[ebuild  rR    ] app-arch/libarchive-3.3.2:0/13::gentoo  USE="bzip2 e2fsprogs iconv lzma threads xattr zlib -acl -expat -libressl -lz4 -lzo -nettle -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild  rR    ] app-arch/dump-0.4.46::gentoo  USE="bzip2 readline sqlite ssl zlib -debug -ermt -libressl -lzo (-selinux) -static {-test} -uuid" 0 KiB
[ebuild  rR    ] app-crypt/efitools-1.7.0::gentoo  USE="-libressl" 0 KiB
[ebuild  rR    ] x11-misc/x11vnc-0.9.14_p20161013::gentoo  USE="crypt fbcon ssl -libressl -xinerama -zeroconf" 0 KiB
[ebuild  rR    ] app-admin/apache-tools-2.4.28::gentoo  USE="ssl -libressl" 0 KiB
[ebuild  rR    ] dev-lang/python-2.7.14:2.7::gentoo  USE="gdbm ncurses readline sqlite ssl (threads) tk (wide-unicode) xml (-berkdb) -build -doc -examples -hardened -ipv6 -libressl -wininst" 0 KiB
[ebuild  rR    ] dev-lang/python-3.5.4:3.5/3.5m::gentoo  USE="gdbm ncurses readline sqlite ssl (threads) tk xml -build -examples -hardened -ipv6 -libressl -wininst" 0 KiB
[ebuild  rR    ] dev-lang/python-3.4.6:3.4/3.4m::gentoo  USE="gdbm ncurses readline sqlite ssl (threads) tk xml -build -examples -hardened -ipv6 -libressl -wininst" 0 KiB
[ebuild  rR    ] dev-libs/ace-5.8.3:0/5.8.3::gentoo  USE="X -ciao -ipv6 -libressl -static-libs -tao" 0 KiB
[ebuild  rR    ] app-admin/syslog-ng-3.7.3::gentoo  USE="geoip python tcpd -amqp -caps -dbi -ipv6 -json -libressl -mongodb -pacct -redis -smtp -spoof-source -systemd" PYTHON_TARGETS="python2_7" 0 KiB
[ebuild  rR    ] net-libs/serf-1.3.9:1::gentoo  USE="-kerberos -libressl -static-libs" 0 KiB
[ebuild  rR    ] net-misc/rdesktop-1.8.3-r2::gentoo  USE="alsa xrandr -ao -debug -ipv6 -kerberos -libressl -libsamplerate -oss -pcsc-lite" 0 KiB
[ebuild  rR    ] sys-fs/cryptsetup-1.7.5::gentoo  USE="nls openssl python udev urandom -gcrypt -kernel -libressl -nettle -pwquality -reencrypt -static -static-libs" PYTHON_TARGETS="python2_7 python3_4 python3_5* -python3_6" 0 KiB
[ebuild  rR    ] x11-base/xorg-server-1.19.5:0/1.19.5::gentoo  USE="glamor suid udev xorg -debug -dmx -doc -ipv6 -kdrive -libressl -minimal (-selinux) -static-libs -systemd -tslib -unwind -wayland -xcsecurity -xephyr -xnest -xvfb" 0 KiB
[ebuild  rR    ] www-client/links-2.14:2::gentoo  USE="X bzip2 directfb fbcon gpm jpeg ssl tiff unicode zlib -ipv6 -libevent -libressl -livecd -lzma (-suid) (-svga)" 0 KiB
[ebuild  rR    ] net-analyzer/nmap-7.60::gentoo  USE="nls nse ssl -ipv6 -libressl -libssh2 -ncat -ndiff -nmap-update -nping (-system-lua) -zenmap" LINGUAS="-de -fr -hi -hr -it -ja -pl -pt_BR -ru -zh" PYTHON_TARGETS="python2_7" 0 KiB
[ebuild  rR    ] dev-util/cargo-0.21.0::gentoo  USE="-debug -doc -libressl" 0 KiB
[ebuild  rR    ] dev-vcs/git-2.14.2::gentoo  USE="blksha1 curl gpg iconv nls pcre pcre-jit python threads tk webdav -cgi -cvs -doc -emacs -gnome-keyring -highlight -libressl -mediawiki -mediawiki-experimental -perl (-ppcsha1) -subversion {-test} -xinetd" LINGUAS="-bg -ca -de -fr -is -it -ko -pt_PT -ru -sv -vi -zh_CN" PYTHON_TARGETS="python2_7" 0 KiB
[ebuild  rR    ] dev-lang/ruby-2.4.2:2.4::gentoo  USE="berkdb gdbm rdoc ssl tk -debug -doc -examples -ipv6 -jemalloc -libressl -rubytests -socks5 -static-libs -xemacs" 0 KiB
[ebuild  rR    ] net-misc/openssh-7.6_p1::gentoo  USE="X bindist hpn pam pie sctp ssl -X509 -audit -debug -kerberos -ldap -ldns -libedit -libressl -livecd (-selinux) -skey -static {-test}" 0 KiB
[ebuild  rR    ] app-admin/sudo-1.8.21_p2::gentoo  USE="nls openssl pam sendmail -gcrypt -ldap -offensive -sasl (-selinux) -skey" 0 KiB

Total: 30 packages (1 upgrade, 29 reinstalls), Size of downloads: 0 KiB

The following packages are causing rebuilds:

  (dev-libs/openssl-1.1.0f:0/1.1::gentoo, ebuild scheduled for merge) causes rebuilds for:
    (app-crypt/efitools-1.7.0:0/0::gentoo, ebuild scheduled for merge)
    (www-client/w3m-0.5.3-r9:0/0::gentoo, ebuild scheduled for merge)
    (app-admin/sudo-1.8.21_p2:0/0::gentoo, ebuild scheduled for merge)
    (app-arch/libarchive-3.3.2:0/13::gentoo, ebuild scheduled for merge)
    (net-analyzer/nmap-7.60:0/0::gentoo, ebuild scheduled for merge)
    (net-misc/rdesktop-1.8.3-r2:0/0::gentoo, ebuild scheduled for merge)
    (sys-fs/cryptsetup-1.7.5:0/0::gentoo, ebuild scheduled for merge)
    (dev-libs/ace-5.8.3:0/5.8.3::gentoo, ebuild scheduled for merge)
    (dev-qt/qtnetwork-5.9.2:5/5.9::gentoo, ebuild scheduled for merge)
    (dev-lang/python-2.7.14:2.7/2.7::gentoo, ebuild scheduled for merge)
    (app-crypt/sbsigntool-0.8:0/0::gentoo, ebuild scheduled for merge)
    (dev-perl/Net-SSLeay-1.810.0:0/0::gentoo, ebuild scheduled for merge)
    (dev-lang/ruby-2.4.2:2.4/2.4::gentoo, ebuild scheduled for merge)
    (dev-lang/python-3.4.6:3.4/3.4m::gentoo, ebuild scheduled for merge)
    (dev-libs/xmlsec-1.2.24-r1:0/0::gentoo, ebuild scheduled for merge)
    (dev-util/cargo-0.21.0:0/0::gentoo, ebuild scheduled for merge)
    (net-misc/openssh-7.6_p1:0/0::gentoo, ebuild scheduled for merge)
    (net-misc/stunnel-5.40:0/0::gentoo, ebuild scheduled for merge)
    (net-misc/curl-7.56.0:0/0::gentoo, ebuild scheduled for merge)
    (app-admin/apache-tools-2.4.28:0/0::gentoo, ebuild scheduled for merge)
    (www-client/links-2.14:2/2::gentoo, ebuild scheduled for merge)
    (app-arch/dump-0.4.46:0/0::gentoo, ebuild scheduled for merge)
    (dev-lang/python-3.5.4:3.5/3.5m::gentoo, ebuild scheduled for merge)
    (app-crypt/rhash-1.3.5:0/0::gentoo, ebuild scheduled for merge)
    (net-libs/serf-1.3.9:1/1::gentoo, ebuild scheduled for merge)
    (x11-base/xorg-server-1.19.5:0/1.19.5::gentoo, ebuild scheduled for merge)
    (dev-vcs/git-2.14.2:0/0::gentoo, ebuild scheduled for merge)
    (x11-misc/x11vnc-0.9.14_p20161013:0/0::gentoo, ebuild scheduled for merge)
    (app-admin/syslog-ng-3.7.3:0/0::gentoo, ebuild scheduled for merge)
Comment 4 Mike Gilbert gentoo-dev 2017-10-16 17:46:01 UTC
You probably have openssl in /etc/portage/package.unmask.
Comment 5 Martin Mokrejš 2017-10-16 17:50:03 UTC
(In reply to Mike Gilbert from comment #4)
> You probably have openssl in /etc/portage/package.unmask.

Right, thanks, removed now. I put it in there due to cryptsetup or some python SSL or CRYPTO package.
Comment 6 fuse809 2017-11-29 01:04:18 UTC
Is this the same as the issue I've noticed that dev-python/m2crypto-0.27.0 requires openssl/ecdsa.h, which in turn is only provided by openssl built with the bindist USE flag disabled.
Comment 7 Martin Mokrejš 2017-12-20 15:31:03 UTC
(In reply to fuse809 from comment #6)
> Is this the same as the issue I've noticed that dev-python/m2crypto-0.27.0
> requires openssl/ecdsa.h, which in turn is only provided by openssl built
> with the bindist USE flag disabled.

Thank you for the hint, yes, this helped me to move further:

USE=-bindist emerge -uN openssl
emerge m2crypto

I also had openssl-0.9.8 installed , in addition to openssl-1.0.x, so I unmerged the former.

In the end, I have now m2crypto installed and 

# emerge -pv openssl

[ebuild   R    ] dev-libs/openssl-1.0.2n::gentoo  USE="asm bindist* gmp sctp sslv2 sslv3 tls-heartbeat zlib -kerberos -rfc3779 -static-libs {-test} -vanilla" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="(sse2)" 0 KiB


So USE=bindist is back again but at least I came over the original problem, not sure what was the real solution.
Comment 8 Mike Gilbert gentoo-dev 2017-12-20 15:57:44 UTC
(In reply to Martin Mokrejš from comment #7)
> So USE=bindist is back again but at least I came over the original problem,
> not sure what was the real solution.

Your installed copy of m2crypto is probably broken due to missing symbols in libcrypt.

Switching from USE="bindist" to USE="-bindist" on openssl is perfectly safe. 

Switching from USE="-bindist" to USE="bindist" on openssl is quite dangerous, and will cause broken programs due to missing symbols.
Comment 9 Larry the Git Cow gentoo-dev 2017-12-20 18:18:03 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bbf13ecb09ab886654b57c46422c95d9cbf6d81

commit 1bbf13ecb09ab886654b57c46422c95d9cbf6d81
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2017-12-20 18:17:28 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2017-12-20 18:17:58 +0000

    dev-python/m2crypto: depend on dev-libs/openssl[-bindist]
    
    Closes: https://bugs.gentoo.org/634462
    Package-Manager: Portage-2.3.19_p1, Repoman-2.3.6_p35

 dev-python/m2crypto/m2crypto-0.26.4.ebuild | 2 +-
 dev-python/m2crypto/m2crypto-0.27.0.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)