This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: #define collision: LONG_BIT
Type: Stage:
Components: Build Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: complex, tim.peters
Priority: normal Keywords:

Created on 2001-04-26 01:08 by complex, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Messages (2)
msg4527 - (view) Author: Viktor Ferenczi (complex) Date: 2001-04-26 01:08
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 -
msg4528 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2001-04-26 01:31
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.
History
Date User Action Args
2022-04-10 16:04:00adminsetgithub: 34415
2001-04-26 01:08:43complexcreate