Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18565 - the int() function of python doesn't work as it should
Summary: the int() function of python doesn't work as it should
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Release Team
: 20082 (view as bug list)
Depends on: 14069
  Show dependency tree
Reported: 2003-03-31 18:03 UTC by openfriday
Modified: 2003-04-28 06:12 UTC (History)
3 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description openfriday 2003-03-31 18:03:10 UTC
any string of numbers given, such as (1.1), yeld zero. 

such as;

Python 2.2.2 (#1, Mar 26 2003, 15:04:51) 
[GCC 3.2.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> int(1.1)
>>> int(5.3)
>>> int(3.5)

there was a similar problem with perl and the pentium 4, it was resolved by
installing 5.8. i have recompiled with many different flags to no avail. 

Reproducible: Always
Steps to Reproduce:
get a system with a p4, try the function. 
Actual Results:  
returned a zero

Expected Results:  
here's the output from another computer; 

>>> int(1.1)
>>> int(5.3)
>>> int(3.5)

i'm running a pentium4 2.53ghz/533
Comment 1 openfriday 2003-03-31 18:23:32 UTC
it's come to my attention that the problem is derived from a corruption of glibc. 
Using the -march=pentium4 flag while compiling glibc creates this issue. 
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2003-03-31 18:31:54 UTC

there's also a TONNE of ebuilds in there -- please remove the unnecessary ones.
Comment 3 Alastair Tse (RETIRED) gentoo-dev 2003-03-31 19:18:48 UTC
seemant, dev-lang/python isn't beefcake anymore.


please paste emerge info

have you tried compiling glibc with a lower optimisation? i remember there was a warning in /etc/make.conf about using -march=pentium4, but it doesn't seem to be there anymore. but excessive optimisation in with -march=pentium4 is not recommended.
Comment 4 openfriday 2003-03-31 19:31:19 UTC
this problem can be fixed by recompiling glibc with lower optimizations, i would recommend implementing something in the glibc ebuild to disallow the use of -march=pentium4. I have recompiled it with -march=pentium3 and this issue has been resolved. 
Comment 5 Alastair Tse (RETIRED) gentoo-dev 2003-03-31 21:17:25 UTC
sorry folks, but this isn't a python bug but a glibc/over-optimisation bug.

there some people in the forum with the same problem. could you please re-assign to someone who maintains glibc? thanks :)

we strip flags most from the CFLAGS but we don't strip -march and -mcpu.
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-31 23:32:44 UTC
As the new policy is that no stripping of flags should be done, but a list
of known good ones should be made available, I reassign so that -march=pentium4
can be added to the "known bad list".
Comment 7 Ryan Mack 2003-04-04 19:02:25 UTC
This bug results from a broken glibc modf().  See bug 14069.
Comment 8 Nicholas Jones (RETIRED) gentoo-dev 2003-04-13 14:55:31 UTC
Known glibc/gcc bug.
This is handled already.
Comment 9 Alastair Tse (RETIRED) gentoo-dev 2003-04-28 06:12:59 UTC
*** Bug 20082 has been marked as a duplicate of this bug. ***