Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509792 - dev-python/m2crypto - swig: /usr/include/openssl/opensslconf.h:23: Error: CPP #error ""No ABI matched, please report a bug to bugs.gentoo.org"". Use the -cpperraswarn option to continue swig processing.
Summary: dev-python/m2crypto - swig: /usr/include/openssl/opensslconf.h:23: Error: CPP...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 2 votes (vote)
Assignee: Multilib team
URL:
Whiteboard:
Keywords:
: 517926 517964 517970 517972 518102 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-05-07 14:41 UTC by oli.paschke
Modified: 2015-10-18 06:13 UTC (History)
26 users (show)

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


Attachments
build.log (build.log,2.97 KB, text/plain)
2014-05-07 14:43 UTC, oli.paschke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description oli.paschke 2014-05-07 14:41:37 UTC
I'm running a fresh Gentoo install (default/linux/amd64/13.0/desktop) as VirtualBox guest and the dev-python/m2crypto package (both stable and testing) fails to emerge due to an unmatched ABI in the opensslconf.h header file.

Reproducible: Always

Steps to Reproduce:
emerge -1 dev-python/m2crypto
Actual Results:  
>>> Configuring source in /var/tmp/portage/dev-python/m2crypto-0.21.1-r1/work/M2Crypto-0.21.1 ... 
 * python2_7: running distutils-r1_run_phase python_configure_all 
swig -python -includeall -I/usr/include -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i 
/usr/include/openssl/opensslconf.h:23: Error: CPP #error ""No ABI matched, please report a bug to bugs.gentoo.org"". Use the -cpperraswarn option to continue swig processing. 
 * ERROR: dev-python/m2crypto-0.21.1-r1::gentoo failed (configure phase): 
 *   swig failed 
 * 
 * Call stack: 
 *     ebuild.sh, line   93:  Called src_configure 
 *   environment, line 3355:  Called distutils-r1_src_configure 
 *   environment, line 1037:  Called _distutils-r1_run_common_phase 'python_configure_all' 
 *   environment, line  221:  Called multibuild_for_best_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_configure_all' 
 *   environment, line 2263:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_configure_all' 
 *   environment, line 2288:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_configure_all' 
 *   environment, line 2286:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_configure_all' 
 *   environment, line  646:  Called distutils-r1_run_phase 'python_configure_all' 
 *   environment, line 1014:  Called python_configure_all 
 *   environment, line 2783:  Called die 
 * The specific snippet of code: 
 *       "${@}" || die 'swig failed'


Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.17, 3.12.13-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.12.13-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:     2056192 total,   1303040 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Mon, 05 May 2014 07:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.3.3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo sabayon
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
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"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/gentoo/ http://mirror.netcologne.de/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sabayon"
SYNC="rsync://rsync3.de.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk iconv ipv6 jpeg lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 readline sdl session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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" 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" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 oli.paschke 2014-05-07 14:43:44 UTC
Created attachment 376544 [details]
build.log
Comment 2 oli.paschke 2014-05-08 10:23:13 UTC
Error due to falsely emerged openssl ebuild from sabayon overlay. Works with stable Gentoo openssl.
Comment 3 Steve Warren 2014-05-22 02:31:33 UTC
fails with dev-libs/openssl-1.0.1g-r1 
works with dev-libs/openssl-1.0.1g

dev-libs/openssl-1.0.1g-r1 is ~arch in portage and dev-libs/openssl-1.0.1g is stable.

In my case, I am not using any overlays.

Maybe this bug should be against dev-libs/openssl-1.0.1g-r1, but I leave that to the devs.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-22 06:10:53 UTC
Ok, I can confirm that. I'd guess swig does preprocessing without defining proper arch defines. What can we do about it?
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-22 06:15:53 UTC
Oh, let's get swig maintainers CC-ed.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-22 07:14:58 UTC
It seems that this is a known issue on Debian multiarch, and people are putting random work-arounds for it e.g. in m2crypto. I see a few possibilities of fixing the generic issue, not all of them can be applied here.


1. on swig side:

1a. make swig define proper arch defines -- possibly using ${CHOST} but can we assume it will be always exported in ebuild env?

1b. hardwire swig to output define for native arch -- and revisit if we ever feel like needing swig multilib,

1c. hardwire swig to use /usr/include/${CHOST} for include path.


2. on openssl side:

2a. add -I/usr/include/${CHOST} to pkg-config files -- won't help here and in similar cases because they don't use pkg-config :).


3. on eclass side:

3a. add -I/usr/include/${CHOST} to CPPFLAGS -- won't help here since usually non-multilib packages will be broken :),

3b. add an '#else' clause that uses native ABI when no reasonable defines are found -- will work-around most of the issues but ugly, error-prone and comes with no sane way of propagation.
Comment 7 Carlos Sura 2014-05-29 02:10:53 UTC
I am under ~amd64 and I am facing the same issue. No layman.

As a quick fix, as I saw above, I've masked: dev-libs/openssl-1.0.1g-r1 
and everything worked fine.
Comment 8 Guy 2014-06-01 19:31:29 UTC
(In reply to Carlos Sura from comment #7)
> I am under ~amd64 and I am facing the same issue. No layman.
> 
> As a quick fix, as I saw above, I've masked: dev-libs/openssl-1.0.1g-r1 
> and everything worked fine.

Just a note for anyone else thinking of doing the above (aside from heartbleed issues etc), won't work if you have certain dependencies:

  (dev-libs/openssl-1.0.1g-r1:0/0::gentoo, installed) pulled in by
    >=dev-libs/openssl-1.0.1g-r1:0[abi_x86_32(-)] required by (app-emulation/emul-linux-x86-baselibs-20140508-r6:0/0::gentoo, installed)
Comment 9 Guy 2014-06-01 19:44:19 UTC
Since it's not explicitly stated, I'd just like to note that this issue applies to dev-python/m2crypto-0.22.3 as well.

While the OP correctly doesn't specify version, the OP log is for dev-python/m2crypto-0.21.1-r1.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-01 21:18:28 UTC
@swig maintainers: ping. Any suggestions on preferred course of action?
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-08 07:55:56 UTC
One more option: we could make multilib wrapped headers have extra '#if defined(SWIG)' clause that would trigger the native file for SWIG. This is probably the easiest course of action, though it requires rebuilding openssl and similar deps.
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-08 13:58:34 UTC
+  08 Jun 2014; Michał Górny <mgorny@gentoo.org> multilib-build.eclass:
+  Work around lack of arch defines in swig, bug #509792.

Please try rebuilding openssl, and then m2crypto.

@base-system, do you plan to bump openssl in near time? We'd use a revbump to propagate the fix.
Comment 13 Petr Zima 2014-06-11 06:51:54 UTC
Also confirming the bug. I will mask the -r2 until the multilib problems get resolved.
Comment 14 Richard Cox 2014-06-11 23:58:49 UTC
Rebuilding openssl worked for me.
Comment 15 Guy 2014-06-16 01:55:27 UTC
Note: If rebuilding openssl does not work for you, check if you have openssl installed in multiple slots - i.e.:

[I] dev-libs/openssl
     Available versions:  
     (0.9.8) 0.9.8y{tbz2} (~)0.9.8y-r1{tbz2}
     (0)    [M]1.0.0j (~)1.0.0m 1.0.1g{tbz2} (~)1.0.1g-r1{tbz2} 1.0.1h-r1 (~)1.0.1h-r2{tbz2} **1.0.2_beta1-r2 **1.0.2_beta1-r3
       {bindist gmp kerberos rfc3779 sse2 static-libs test +tls-heartbeat vanilla zlib ABI_MIPS="n32 n64 o32" ABI_X86="32 64 x32"}
     Installed versions:  0.9.8y-r1(0.9.8){tbz2}(07:12:26 AM 05/31/2014)(gmp kerberos sse2 zlib -bindist -test ABI_MIPS="-n32 -n64 -o32" ABI_X86="32 64 -x32") 1.0.1h-r2{tbz2}(10:52:55 PM 06/05/2014)(gmp kerberos sse2 tls-heartbeat zlib -bindist -rfc3779 -static-libs -test -vanilla ABI_MIPS="-n32 -n64 -o32" ABI_X86="32 64 -x32")
     Homepage:            http://www.openssl.org/
     Description:         full-strength general purpose cryptography library (including SSL and TLS)

If that is the case for you, try rebuilding all installed versions of openssl - in this example:

emerge -1 =dev-libs/openssl-0.9.8y-r1 =dev-libs/openssl-1.0.1h-r2
Comment 16 Ben Phillips 2014-06-20 13:09:35 UTC
Confirmed. Same issue here, but I am using Sabayon.... ;-)

I did:

#> equery list -p openssl
 * Searching for openssl ...
[-P-] [  ] dev-libs/openssl-0.9.8y:0.9.8
[IP-] [  ] dev-libs/openssl-0.9.8y-r1:0.9.8
[-P-] [ ~] dev-libs/openssl-0.9.8z_p1-r1:0.9.8
[-P-] [ ~] dev-libs/openssl-0.9.8z_p1-r2:0.9.8
[-P-] [M ] dev-libs/openssl-1.0.0j:0
[-P-] [ ~] dev-libs/openssl-1.0.0m:0
[-P-] [  ] dev-libs/openssl-1.0.1g:0
[-P-] [ ~] dev-libs/openssl-1.0.1g-r1:0
[-P-] [  ] dev-libs/openssl-1.0.1h-r1:0
[IP-] [  ] dev-libs/openssl-1.0.1h-r2:0
[-P-] [ -] dev-libs/openssl-1.0.2_beta1-r2:0
[-P-] [ -] dev-libs/openssl-1.0.2_beta1-r3:0


Then I needed to add the following into package.keywords:

=dev-libs/openssl-1.0.1h-r2 ~amd64
=dev-libs/openssl-0.9.8y-r1 ~amd64


Finally, to defeat problems with circular dependancies, I rebuilt all installed versions of openssl with the following:

#> emerge -1 --nodeps =dev-libs/openssl-0.9.8y-r1 =dev-libs/openssl-1.0.1h-r2 =mit-krb5-1.12.1-r1



Afterward, dev-python/m2crypto-0.22.3 (and subsequently net-wireless/crda-1.1.3-r1) compiled perfectly.

Thanks all.
Comment 17 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-21 06:47:45 UTC
With the version bump to 1.0.1h* + 0.9.8z_p1* I think we can consider this resolves since the upgrade will eventually propagate it to everyone.
Comment 18 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-07-24 11:26:27 UTC
*** Bug 517926 has been marked as a duplicate of this bug. ***
Comment 19 Thomas Deutschmann (RETIRED) gentoo-dev 2014-07-24 11:47:28 UTC
*** Bug 517964 has been marked as a duplicate of this bug. ***
Comment 20 Thomas Deutschmann (RETIRED) gentoo-dev 2014-07-24 11:49:25 UTC
Today I was hit by the same bug when updating from dev-python/m2crypto-0.22.3 to dev-python/m2crypto-0.22.3-r1 (see bug 517964).

Rebuilding dev-libs/openssl did the trick for me.

I am really wondering why you don't bump dev-libs/openssl at all... this will solve the problem for so many people...
Comment 21 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-07-24 12:39:47 UTC
*** Bug 517970 has been marked as a duplicate of this bug. ***
Comment 22 Jeroen Roovers (RETIRED) gentoo-dev 2014-07-24 12:55:39 UTC
*** Bug 517972 has been marked as a duplicate of this bug. ***
Comment 23 Mike Gilbert gentoo-dev 2014-07-24 14:24:25 UTC
Anybody who upgraded to openssl-1.0.1h-r2 between June 5 and June 8 would still be affected by this bug.
Comment 24 Jeroen Roovers (RETIRED) gentoo-dev 2014-07-28 12:06:58 UTC
*** Bug 518102 has been marked as a duplicate of this bug. ***
Comment 25 Frederico 2014-08-07 17:28:11 UTC
Problem is back with openssl-1.0.1i in a fresh system install.
Comment 26 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-07 17:59:28 UTC
(In reply to Frederico from comment #25)
> Problem is back with openssl-1.0.1i in a fresh system install.

I can't reproduce. If you can provide any specific details, I'd very much appreciate that.
Comment 27 Frederico 2014-08-12 13:36:43 UTC
Problem has been solved with "emerge -e world" 


(In reply to Michał Górny from comment #26)
> (In reply to Frederico from comment #25)
> > Problem is back with openssl-1.0.1i in a fresh system install.
> 
> I can't reproduce. If you can provide any specific details, I'd very much
> appreciate that.