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: Build of readline fails
Type: Stage:
Components: Build Versions: Python 2.3
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: nnorwitz, weidmans
Priority: normal Keywords:

Created on 2006-03-15 00:23 by weidmans, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg27778 - (view) Author: Sydney Weidman (weidmans) Date: 2006-03-15 00:23
I was attempting to compile Python-2.3.5 under Fedora
Core 4:

Python 2.3.5 (#14, Mar 14 2006, 17:57:17)
[GCC 4.0.2 20051125 (Red Hat 4.0.2-8)] on linux2

and needed it to have readline support

No matter how I compiled it, the readline module was
never built, and of course readline functionality did
not work.

I tried ./configure --with-readline=/usr and a couple
of other configure options that I thought would help,
but nothing worked. Finally, I tried:

make Modules/readline

which gave the error:

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -I. -I./Include
-L/home/sweidman/Applications/Python-2.3.5 
Modules/readline.c   -o Modules/readline
Modules/readline.c:96: error: static declaration of
‘history_length’ follows non-static declaration
/usr/include/readline/history.h:242: error: previous
declaration of ‘history_length’ was here
make: *** [Modules/readline] Error 1

So without knowing what I was really doing, I commented
out the definition of history_length at
Modules/readline.c:96

After making that change, Python-2.3.5 compiled and ran
fine with readline support working; i.e. "import
readline" gave no errors and the arrow keys bring back
the last command.

So is this a bug or a quirk on my platform or something
else I'm doing wrong?

Thanks for the great software!!
msg27779 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-03-15 08:08
Logged In: YES 
user_id=33168

Python 2.3 isn't supported any longer.  In the current
version, it looks like history_length was renamed to prepend
an underscore (ie, the name became: _history_length).  This
was presumably to fix the same problem.  The name also
changed in write_history_file(), set_history_length(), and
get_history_length().

It's not so much anything you are doing wrong, just a
compatability problem, since FC4 is quite a bit newer than
Python 2.3.  If you upgrade to Python 2.4, you shouldn't
have the problem, or you can run with your local modification.
History
Date User Action Args
2022-04-11 14:56:15adminsetgithub: 43035
2006-03-15 00:23:53weidmanscreate