Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 267952 - dev-lang/python-2.6.2 - ValueError: cannot convert float NaN to integer
Summary: dev-lang/python-2.6.2 - ValueError: cannot convert float NaN to integer
Status: VERIFIED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-30 06:39 UTC by Alex. P. Burlutsky
Modified: 2010-06-30 22:55 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,333.93 KB, text/plain)
2009-08-27 01:04 UTC, Nikhil Sethi
Details
build.log (build.log,371.95 KB, text/plain)
2009-09-03 21:52 UTC, Jeff Mills
Details
7CggbtaeR2 (build.log,437.19 KB, text/plain)
2009-09-20 14:16 UTC, Dron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex. P. Burlutsky 2009-04-30 06:39:09 UTC
I'm updating portage :

emerge portage

[ebuild  NS   ] dev-lang/python-2.6.2 [2.4.4-r4] USE="berkdb gdbm ncurses readline ssl threads xml -build -doc -examples -ipv6 -sqlite -tk -ucs2 -wininst" 0 kB [0]
[ebuild     U ] dev-python/pycrypto-2.0.1-r8 [2.0.1-r5] USE="-bindist -gmp -test" 0 kB 

Python tring to update from 2.4 to 2.6 and crash with:


ComCompiling /var/tmp/portage/dev-lang/python-2.6.2/image//usr/lib/python2.6/test/test_extcall.py ...
Compiling /var/tmp/portage/dev-lang/python-2.6.2/image//usr/lib/python2.6/test/test_fcntl.py ...
Compiling /var/tmp/portage/dev-lang/python-2.6.2/image//usr/lib/python2.6/test/test_file.py ...
Compiling /var/tmp/portage/dev-lang/python-2.6.2/image//usr/lib/python2.6/test/test_filecmp.py ...
Compiling /var/tmp/portage/dev-lang/python-2.6.2/image//usr/lib/python2.6/test/test_fileinput.py ...
Compiling /var/tmp/portage/dev-lang/python-2.6.2/image//usr/lib/python2.6/test/test_fileio.py ...
piling /var/tmp/portage/dev-lang/python-2.6.2/image//usr/lib/python2.6/test/test_float.py ...
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-2.6.2/image//usr/lib/python2.6/compileall.py", line 156, in <module>
    exit_status = int(not main())
  File "/var/tmp/portage/dev-lang/python-2.6.2/image//usr/lib/python2.6/compileall.py", line 146, in main
    force, rx, quiet):
  File "/var/tmp/portage/dev-lang/python-2.6.2/image//usr/lib/python2.6/compileall.py", line 83, in compile_dir
    if not compile_dir(fullname, maxlevels - 1, dfile, force, rx, quiet):
  File "/var/tmp/portage/dev-lang/python-2.6.2/image//usr/lib/python2.6/compileall.py", line 65, in compile_dir
    ok = py_compile.compile(fullname, None, dfile, True)
  File "/var/tmp/portage/dev-lang/python-2.6.2/image/usr/lib/python2.6/py_compile.py", line 137, in compile
    wr_long(fc, timestamp)
  File "/var/tmp/portage/dev-lang/python-2.6.2/image/usr/lib/python2.6/py_compile.py", line 75, in wr_long
    f.write(chr( x        & 0xff))
ValueError: cannot convert float NaN to integer
make: *** [libinstall] Ошибка 1




Reproducible: Always

Steps to Reproduce:
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-04-30 07:31:15 UTC
I'm not sure if this would be the best solution but did you try to first update to python-2.5?

If nobody comes with a better solution I'd suggest you try something like this:

  emerge --oneshot =python-2.5*
  python-updater
  emerge --oneshot portage

At this point you could stop doing more updates to python if you want. If you still want to go up to python-2.6, continue with the following steps:

  quickpkg --include-config=y python:2.4
  emerge -C python:2.4
  emerge --oneshot python:2.6
  python-updater
  quickpkg --include-config=y python:2.5
  emerge -C python:2.5

This would leave you with only python-2.6 being installed on your system. If you want to keep older python versions, skip the "emerge -C ..." steps.
The "quickpkg ..." lines do backups of the older python versions. This is just for your own safety ;)

Please report back if these steps helped you.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2009-04-30 08:34:08 UTC
1) This isn't a blocker of anything.
2) Please post your `emerge --info'.
3) Please attach the entire build log as a file.
4) Then reopen this bug report.
Comment 3 Alex. P. Burlutsky 2009-04-30 11:10:16 UTC
Thank you. 
Update 2.4->2.5->2.6 works for me.
Comment 4 Nikhil Sethi 2009-08-27 01:00:23 UTC
I am getting this on trying to upgrade from 2.5.4-r3 to 2.6.2-r1. See attached build log.


# emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 i586)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-i586-Geode-TM-_Integrated_Processor_by_AMD_PCS-with-glibc2.0
Timestamp of tree: Wed, 26 Aug 2009 17:15:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.4-r3
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i586-pc-linux-gnu"
CFLAGS="-march=k6-2 -Os -pipe -fomit-frame-pointer -fweb -ffast-math"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k6-2 -Os -pipe -fomit-frame-pointer -fweb -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ "
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext bzip2 cli cracklib crypt cups dri isdnlog minimal mmx mmxext nls nptl nptlonly pam perl pppd reflection samba session spl ssl sysfs x86 xorg zeroconf" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 5 Nikhil Sethi 2009-08-27 01:04:24 UTC
Created attachment 202361 [details]
build.log
Comment 6 Jeff Mills 2009-09-03 21:50:08 UTC
I also have this issue when trying to upgrade from 2.5.4-r3.
I will attach a build log also.

# emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0/server, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.22-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.22-gentoo-r8-i686-Pentium_III_-Coppermine-with-glibc2.0
Timestamp of tree: Thu, 03 Sep 2009 08:30:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.4-r3
dev-python/pycrypto: 2.0.1-r8
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer -ffast-math"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo ftp://ftp.planetmirror.com/pub/gentoo/ ftp://mirror.isp.net.au/pub/gentoo/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl apache2 authdaemond berkdb bzip2 cli cracklib crypt ctype dri fortran ftp gdbm gpm iconv imap isdnlog jpeg libwww maildir mmx mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl php5 png posix pppd python readline reflection sasl session slang snmp spl ssl sysfs tcpd tokenizer truetype unicode usb x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 7 Jeff Mills 2009-09-03 21:52:24 UTC
Created attachment 203083 [details]
build.log
Comment 8 Dron 2009-09-20 14:16:07 UTC
Created attachment 204693 [details]
7CggbtaeR2
Comment 9 Dron 2009-09-20 14:19:13 UTC
I have the same situation
uname -a
Linux tyr 2.6.23-gentoo-r3 #1 SMP Fri Dec 21 16:17:49 EET 2007 i686 Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz GenuineIntel GNU/Linux

yr ~ # emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.9_p20081201-r2, 2.6.23-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.23-gentoo-r3-i686-Intel-R-_Core-TM-2_Duo_CPU_E6550_@_2.33GHz-with-glibc2.0
Timestamp of tree: Sat, 19 Sep 2009 22:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-lang/python:     2.5.4-r3
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=nocona -pipe -funsafe-math-optimizations -fpeel-loops -finline-functions -ftracer -ffinite-math-only -fpeephole2 -fno-thread-jumps -fstrength-reduce -fregmove -freorder-blocks -fschedule-insns2 -fdelete-null-pointer-checks -fcaller-saves -frerun-cse-after-loop -fcse-skip-blocks -fno-trapping-math -fsched-spec -falign-functions -fno-defer-pop -fno-if-conversion -mno-push-args -fno-merge-constants"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/storage/SYS/overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl apache2 berkdb bzip2 cli cracklib crypt cups dri extensions fortran gd gdbm gpm iconv ipv4 isdnlog jpeg mbox mmx mudflap ncurses nls nptl nptlonly ntpl ntplonly openmp pam pcre perl png pppd python readline reflection session slang spl sse ssl svg sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Compiling /home/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib/python2.6/test/test_float.py ...
Traceback (most recent call last):
  File "/home/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib/python2.6/compileall.py", line 156, in <module>
    exit_status = int(not main())
  File "/home/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib/python2.6/compileall.py", line 146, in main
    force, rx, quiet):
  File "/home/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib/python2.6/compileall.py", line 83, in compile_dir
    if not compile_dir(fullname, maxlevels - 1, dfile, force, rx, quiet):
  File "/home/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib/python2.6/compileall.py", line 65, in compile_dir
    ok = py_compile.compile(fullname, None, dfile, True)
  File "/home/tmp/portage/dev-lang/python-2.6.2-r1/image/usr/lib/python2.6/py_compile.py", line 137, in compile
    wr_long(fc, timestamp)
  File "/home/tmp/portage/dev-lang/python-2.6.2-r1/image/usr/lib/python2.6/py_compile.py", line 75, in wr_long
    f.write(chr( x        & 0xff))
ValueError: cannot convert float NaN to integer
make: *** [libinstall] Error 1
 *
 * ERROR: dev-lang/python-2.6.2-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_install
 *             environment, line 4020:  Called die
 * The specific snippet of code:
 *       emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed";
 *  The die message:
 *   emake altinstall maninstall failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/home/tmp/portage/dev-lang/python-2.6.2-r1/temp/build.log'.
 * The ebuild environment file is located at '/home/tmp/portage/dev-lang/python-2.6.2-r1/temp/environment'.
 *

>>> Failed to emerge dev-lang/python-2.6.2-r1, Log file:

>>>  '/home/tmp/portage/dev-lang/python-2.6.2-r1/temp/build.log'

Build.log is in attachment

2.4 -> 2.5 -> 2.6 not help 

now I have an dev-lang/python-2.5.4-r3 but error still comes
Comment 10 Dron 2009-09-20 16:28:22 UTC
I have the same situation
uname -a
Linux tyr 2.6.23-gentoo-r3 #1 SMP Fri Dec 21 16:17:49 EET 2007 i686 Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz GenuineIntel GNU/Linux

yr ~ # emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.9_p20081201-r2, 2.6.23-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.23-gentoo-r3-i686-Intel-R-_Core-TM-2_Duo_CPU_E6550_@_2.33GHz-with-glibc2.0
Timestamp of tree: Sat, 19 Sep 2009 22:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-lang/python:     2.5.4-r3
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=nocona -pipe -funsafe-math-optimizations -fpeel-loops -finline-functions -ftracer -ffinite-math-only -fpeephole2 -fno-thread-jumps -fstrength-reduce -fregmove -freorder-blocks -fschedule-insns2 -fdelete-null-pointer-checks -fcaller-saves -frerun-cse-after-loop -fcse-skip-blocks -fno-trapping-math -fsched-spec -falign-functions -fno-defer-pop -fno-if-conversion -mno-push-args -fno-merge-constants"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/storage/SYS/overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl apache2 berkdb bzip2 cli cracklib crypt cups dri extensions fortran gd gdbm gpm iconv ipv4 isdnlog jpeg mbox mmx mudflap ncurses nls nptl nptlonly ntpl ntplonly openmp pam pcre perl png pppd python readline reflection session slang spl sse ssl svg sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Compiling /home/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib/python2.6/test/test_float.py ...
Traceback (most recent call last):
  File "/home/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib/python2.6/compileall.py", line 156, in <module>
    exit_status = int(not main())
  File "/home/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib/python2.6/compileall.py", line 146, in main
    force, rx, quiet):
  File "/home/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib/python2.6/compileall.py", line 83, in compile_dir
    if not compile_dir(fullname, maxlevels - 1, dfile, force, rx, quiet):
  File "/home/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib/python2.6/compileall.py", line 65, in compile_dir
    ok = py_compile.compile(fullname, None, dfile, True)
  File "/home/tmp/portage/dev-lang/python-2.6.2-r1/image/usr/lib/python2.6/py_compile.py", line 137, in compile
    wr_long(fc, timestamp)
  File "/home/tmp/portage/dev-lang/python-2.6.2-r1/image/usr/lib/python2.6/py_compile.py", line 75, in wr_long
    f.write(chr( x        & 0xff))
ValueError: cannot convert float NaN to integer
make: *** [libinstall] Error 1
 *
 * ERROR: dev-lang/python-2.6.2-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_install
 *             environment, line 4020:  Called die
 * The specific snippet of code:
 *       emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed";
 *  The die message:
 *   emake altinstall maninstall failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/home/tmp/portage/dev-lang/python-2.6.2-r1/temp/build.log'.
 * The ebuild environment file is located at '/home/tmp/portage/dev-lang/python-2.6.2-r1/temp/environment'.
 *

>>> Failed to emerge dev-lang/python-2.6.2-r1, Log file:

>>>  '/home/tmp/portage/dev-lang/python-2.6.2-r1/temp/build.log'

Build.log is in attachment

2.4 -> 2.5 -> 2.6 not help 

now I have an dev-lang/python-2.5.4-r3 but error still comes
Comment 11 Dron 2009-09-20 17:22:25 UTC
seems trouble appears with "unsafe-math-optimizations" optimizatoin flag enabled
without it emerge process ended successfully.
Comment 12 Linear Systems Tech Svcs. 2009-10-20 23:18:38 UTC
Seems this bug is still around.  I have already run python-updater from 2.4 to 2.5.  I noticed the comment above this one and thought to the -ffast-math CFLAG we use.  From the continuous messages from packages warning about -ffast-math, I wonder if it classifies as "unsafe-math-optimizations".  Going to try to build it without the -ffast-math.

cms ~ # emerge -pv python

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

Calculating dependencies... done!
[ebuild  NS   ] dev-lang/python-2.6.2-r1 [2.4.4-r14, 2.5.4-r2] USE="berkdb gdbm ipv6 ncurses readline ssl threads xml -build -doc -examples -sqlite -tk -ucs2 -wininst" 0 kB

Total: 1 package (1 in new slot), Size of downloads: 0 kB
cms ~ # emerge --info
Portage 2.1.6.13 (default/linux/amd64/10.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2
.6.30-gentoo-r5-20091019-02 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r5-20091019-02-x86_64-Intel-R-_Xeon-R-_CPU_E5410_@_2.33GHz-with-glibc2.2.5
Timestamp of tree: Mon, 19 Oct 2009 15:45:02 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 1.3.7, 2.1.7
dev-lang/python:     2.4.4-r14, 2.5.4-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -pipe -mmmx -msse -msse2 -m3dnow -ffast-math -mfpmath=sse,387"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=nocona -pipe -mmmx -msse -msse2 -m3dnow -ffast-math -mfpmath=sse,387"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://ftp.ucsb.edu /pub/mirrors/linux/gentoo/ http://mirror.espri.arizona.edu/gentoo/ ftp://distro. ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/ distributions/gentoo/ "
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://128.104.70.17/gentoo-portage"
USE="X acl acpi alsa amd64 apache2 apm audiofile avi berkdb browserplugin bzip2 cairo cdr cli cracklib crypt cups divx4linux dri dvd dvdr exif flash fortran gdbm gif gpm gtk gtk2 iconv imagemagick ipv6 isdnlog java jpeg junit ming mmx modules mozcalendar mozilla mozsvg mozxmlterm mudflap multilib mysql mysqli ncurses nls nptl nptlonly openmp pam pcre perl png pppd python quicktime readline reflection samba sensord session sockets speex spl sse sse2 ssl svg sysfs tcpd theora tiff unicode usb videos wmf xinerama xorg xprint zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
cms ~ # Compiling /var/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib64/python2.6/test/test_file.py ...
Compiling /var/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib64/python2.6/test/test_filecmp.py ...
Compiling /var/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib64/python2.6/test/test_fileinput.py ...
Compiling /var/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib64/python2.6/test/test_fileio.py ...
Compiling /var/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib64/python2.6/test/test_float.py ...
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib64/python2.6/compileall.py", line 156, in <module>
    exit_status = int(not main())
  File "/var/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib64/python2.6/compileall.py", line 146, in main
    force, rx, quiet):
  File "/var/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib64/python2.6/compileall.py", line 83, in compile_dir
    if not compile_dir(fullname, maxlevels - 1, dfile, force, rx, quiet):
  File "/var/tmp/portage/dev-lang/python-2.6.2-r1/image//usr/lib64/python2.6/compileall.py", line 65, in compile_dir
    ok = py_compile.compile(fullname, None, dfile, True)
  File "/var/tmp/portage/dev-lang/python-2.6.2-r1/image/usr/lib64/python2.6/py_compile.py", line 137, in compile
    wr_long(fc, timestamp)
  File "/var/tmp/portage/dev-lang/python-2.6.2-r1/image/usr/lib64/python2.6/py_compile.py", line 75, in wr_long
    f.write(chr( x        & 0xff))
ValueError: cannot convert float NaN to integer
make: *** [libinstall] Error 1
 * 
 * ERROR: dev-lang/python-2.6.2-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_install
 *             environment, line 4198:  Called die
 * The specific snippet of code:
 *       emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed";
 *  The die message:
 *   emake altinstall maninstall failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-lang/python-2.6.2-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/python-2.6.2-r1/temp/environment'.
 * 

>>> Failed to emerge dev-lang/python-2.6.2-r1, Log file:

>>>  '/var/tmp/portage/dev-lang/python-2.6.2-r1/temp/build.log'

 * Messages for package dev-lang/python-2.6.2-r1:

 * "bsddb" module is out-of-date and no longer maintained inside dev-lang/python. It has
 * been additionally removed in Python 3. You should use external, still maintained "bsddb3"
 * module provided by dev-python/bsddb3 which supports both Python 2 and Python 3.
 * 
 * ERROR: dev-lang/python-2.6.2-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_install
 *             environment, line 4198:  Called die
 * The specific snippet of code:
 *       emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed";
 *  The die message:
 *   emake altinstall maninstall failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-lang/python-2.6.2-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/python-2.6.2-r1/temp/environment'.
 *

cms ~ #
Comment 13 Linear Systems Tech Svcs. 2009-10-20 23:19:51 UTC
Build works when -ffast-math is removed from CFLAGS for the building.
Comment 14 Dron 2009-10-21 15:58:12 UTC
-ffast-math flag means that "unsafe-math-optimizations" flag is enabled, so error appears
Comment 15 Rick Warner 2009-12-01 17:11:51 UTC
I had this same problem.  Removing -ffast-math from my CFLAGS solved it.  Why was this bug closed?  A resolution was never provided.

To actually correctly close this bug, a new updated ebuild that filters out ffast-math and unsafe-math-optimizations needs to made.  Shall I do this?
Comment 16 Jeff Mills 2010-04-27 21:51:22 UTC
This bug still exists in 2.6.4-r1
Comment 17 David Voge 2010-06-30 22:55:44 UTC
Also in version dev-lang/python-2.5.4-r4. With MAKEOPTS="- j1" I had no errors.