Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#define collision: LONG_BIT #34415

Closed
complex mannequin opened this issue Apr 26, 2001 · 2 comments
Closed

#define collision: LONG_BIT #34415

complex mannequin opened this issue Apr 26, 2001 · 2 comments
Labels
build The build process and cross-build

Comments

@complex
Copy link
Mannequin

complex mannequin commented Apr 26, 2001

BPO 419012
Nosy @tim-one

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2001-04-26.01:31:10.000>
created_at = <Date 2001-04-26.01:08:43.000>
labels = ['build', 'invalid']
title = '#define collision: LONG_BIT'
updated_at = <Date 2001-04-26.01:31:10.000>
user = 'https://bugs.python.org/complex'

bugs.python.org fields:

activity = <Date 2001-04-26.01:31:10.000>
actor = 'tim.peters'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Build']
creation = <Date 2001-04-26.01:08:43.000>
creator = 'complex'
dependencies = []
files = []
hgrepos = []
issue_num = 419012
keywords = []
message_count = 2.0
messages = ['4527', '4528']
nosy_count = 2.0
nosy_names = ['tim.peters', 'complex']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue419012'
versions = []

@complex
Copy link
Mannequin Author

complex mannequin commented Apr 26, 2001

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 -

@complex complex mannequin closed this as completed Apr 26, 2001
@complex complex mannequin added invalid build The build process and cross-build labels Apr 26, 2001
@tim-one
Copy link
Member

tim-one commented Apr 26, 2001

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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build
Projects
None yet
Development

No branches or pull requests

1 participant