The host OS here is Debian 7 (wheezy) a multiarch Debian. The error that's present during building is: running build_ext running build_configure building 'Crypto.PublicKey._fastmath' extension creating /storage/strogdon/gentoo-redlizard/var/tmp/portage/dev-python/pycrypto-2.6-r2/work/pycrypto-2.6-python2_7/temp.linux-x86_64-2.7 creating /storage/strogdon/gentoo-redlizard/var/tmp/portage/dev-python/pycrypto-2.6-r2/work/pycrypto-2.6-python2_7/temp.linux-x86_64-2.7/src x86_64-pc-linux-gnu-gcc -pthread -march=native -pipe -fno-strict-aliasing -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/storage/strogdon/gentoo-redlizard/usr/include/python2.7 -c src/_fastmath.c -o /storage/strogdon/gentoo-redlizard/var/tmp/portage/dev-python/pycrypto-2.6-r2/work/pycrypto-2.6-python2_7/temp.linux-x86_64-2.7/src/_fastmath.o In file included from /usr/include/stdio.h:28:0, from src/_fastmath.c:29: /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory compilation terminated. I have Prefix installed with it's own glibc. On the host predefs.h is under /usr/include/x86_64-linux-gnu/bits/! emerge --info Portage 2.2.7-prefix (prefix/linux/amd64, gcc-4.7.2, unavailable, 3.2.0-4-amd64 x86_64) ================================================================= System uname: Linux-3.2.0-4-amd64-x86_64-Intel-R-_Xeon-R-_CPU_E5-1650_0_@_3.20GHz-with-debian-7.1 KiB Mem: 32945868 total, 9433484 free KiB Swap: 33480700 total, 33480700 free Timestamp of tree: Mon, 30 Sep 2013 19:14:10 +0000 ld GNU ld (GNU Binutils) 2.23 ccache version 3.1.9 [enabled] app-shells/bash: 4.2_p39-r1 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.5-r2::rap, 3.3.2-r2::rap dev-util/ccache: 3.1.9-r2::science dev-util/cmake: 2.8.11.2 dev-util/pkgconfig: 0.28 sys-devel/autoconf: 2.69 sys-devel/automake: 1.12.4 sys-devel/binutils: 2.23 sys-devel/gcc: 4.6.3, 4.7.2-r1 sys-devel/gcc-config: 1.8-r00.1 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.11 (virtual/os-headers) sys-libs/glibc: 2.17::heroxbd Repositories: gentoo_prefix prefix-with-glibc local-overlay rap heroxbd sage-on-gentoo science ACCEPT_KEYWORDS="~amd64-linux" ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/storage/strogdon/gentoo-redlizard/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" MAKEOPTS="-j13" PKGDIR="/storage/strogdon/gentoo-redlizard/usr/portage/packages" PORTAGE_CONFIGROOT="/storage/strogdon/gentoo-redlizard/" 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="/storage/strogdon/gentoo-redlizard/var/tmp" PORTDIR="/storage/strogdon/gentoo-redlizard/usr/portage" PORTDIR_OVERLAY="/storage/strogdon/gentoo-prefix-libc/overlay /storage/strogdon/local-overlay /storage/strogdon/prefix-libc /storage/strogdon/heroxbd /storage/strogdon/sage-on-gentoo /storage/strogdon/sci" SYNC="rsync://prefix.gentooexperimental.org/gentoo-portage-prefix" USE="amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 mmx modules mudflap ncurses nls nptl openmp pcre prefix readline session sse sse2 ssl tcpd unicode 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 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" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" 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" USE_PYTHON="2.7 3.3" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS The source of the failure is the following in setup.py # _fastmath (uses GNU mp library) Extension("Crypto.PublicKey._fastmath", include_dirs=['src/','/usr/include/'], libraries=['gmp'], sources=["src/_fastmath.c"]), Unless I have missed something the /usr/include/ is not needed in the "include_dirs=" Extension option. Without /usr/include the subject package builds in this Prefix as well as in Gentoo. And I can't see that is is would be needed in gentoo_prefix that uses a host glibc. setup.py for the master branch https://github.com/dlitz/pycrypto/blob/master/setup.py doesn't have /usr/include in the "include_dirs=" Extension option.
There is now dev-python/pycrypto-2.6.1 in the tree that has this same failure for me.
You should probably have headers in your prefix if you also provide the glibc. We can't work with the completely broken multiarch crap from Debilian.