[Python-bugs-list] [ python-Bugs-419012 ] #define collision: LONG_BIT
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 25 Apr 2001 18:31:10 -0700
Bugs item #419012, was updated on 2001-04-25 18:08
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=419012&group_id=5470
Category: Build
Group: Platform-specific
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Viktor Ferenczi (complex)
Assigned to: Nobody/Anonymous (nobody)
Summary: #define collision: LONG_BIT
Initial Comment:
Platform: RedHat Linux 7.0, Linux kernel 2.2.17
When building Python 2.1 final release after
./configure --prefix=/usr/local
LONG_BIT definition found in
/usr/local/include/bits/xopen_lim.h causes an error
message originated from LONG_BIT size test in Python.h.
Workaround (only an ugly hack): Insert "#define
LONG_BIT 32" in Python.h before the #ifndef LONG_BIT
line. This causes a #define collision warning, but
Python 2.1 compiles successfully and works.
- Complex -
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2001-04-25 18:31
Message:
Logged In: YES
user_id=31435
The GCC version that comes with Red Hat 7.0 is not fit for
distribution.
In particular, it defines LONG_BIT as 64 on 32-bit machines under
certain circumstances, and letting this go unchecked would cause
it to generate bad code for various Python arithmetic operations.
The solution is to download a valid version of GCC.
See
http://www.python.org/cgi-
bin/moinmoin/FrequentlyAskedQuestions#line53
for more information.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=419012&group_id=5470