472,983 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

building Python: up arrow broken on SuSE Linux 8.2


I am trying to upgrade my Python installation. After downloading
sources and building Python 2.3.4, I am unable to use the command
history editing feature in the interactive interpreter (where the
up-arrow would previously give you the last command line to edit,
it now just prints "^[[A".) This is a feature I use often, and it
kinda nullifies that warm fuzzy feeling you get when things are
otherwise working as expected.

Python 2.2.2 was installed via YaST (standard SuSE distribution)
and works fine. Unfortunately, several modules I need are not part
of that installation and there doesn't seem to be a newer installation
via that route (that I know of). I downloaded source and built
Python 2.3.4 in my local directory. There were a lot of warnings like this:

Objects/intobject.c:1125: warning: comparison between signed and unsigned
Objects/intobject.c:1135: warning: comparison between signed and unsigned

I don't know exactly what "normal" output is, but things seem to
have gone pretty well, as this is the output after 'make test':

.... <snip>
test_zlib
226 tests OK.
29 tests skipped:
test_aepack test_al test_bsddb test_bsddb185 test_bsddb3 test_cd
test_cl test_curses test_dbm test_email_codecs test_gdbm test_gl
test_imgfile test_linuxaudiodev test_macfs test_macostools
test_nis test_normalization test_ossaudiodev test_pep277
test_plistlib test_scriptpackages test_socket_ssl
test_socketserver test_sunaudiodev test_timeout test_urllibnet
test_winreg test_winsound
3 skips unexpected on linux2:
test_dbm test_gdbm test_bsddb

(I'm not doing anything with DBM stuff, so I don't think I care about
the three skipped tests.)

I thought the problem may have had something to do with the
curses module, which is apparently not enabled by default. In the
Modules/Setup file, I changed this:

# First, look at Setup.config; configure may have set this for you.
#_curses _cursesmodule.c -lcurses -ltermcap
# Wrapper for the panel library that's part of ncurses and SYSV curses.
#_curses_panel _curses_panel.c -lpanel -lncurses

to this (my system has /usr/lib/libncurses.so.5.3):

# First, look at Setup.config; configure may have set this for you.
#_curses _cursesmodule.c -lcurses -ltermcap
_curses _cursesmodule.c -lncurses
# Wrapper for the panel library that's part of ncurses and SYSV curses.
#_curses_panel _curses_panel.c -lpanel -lncurses
I got a clean compile and the test_curses.py file executes silently:

sand:~/Python-2.3.4/Lib/test> ../../python ./test_curses.py
sand:~/Python-2.3.4/Lib/test>

Unfortunately, that didn't solve the problem.
Has anyone else seen this problem?
Or, more importantly, can someone tell me how to fix this?

Thanks for taking the time to read my post.

-ej

Jul 18 '05 #1
7 2370
Erik Johnson schrieb:
I am trying to upgrade my Python installation. After downloading
sources and building Python 2.3.4, I am unable to use the command
history editing feature in the interactive interpreter (where the
up-arrow would previously give you the last command line to edit,
it now just prints "^[[A".)


Do you have the GNU readline library installed and within Python's
reach (lib in LD_LIBRARY_PATH or in /etc/ld.so.conf with subsequent
call of ldconfig)?

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------
Jul 18 '05 #2

Do you have the GNU readline library installed and within Python's
reach (lib in LD_LIBRARY_PATH or in /etc/ld.so.conf with subsequent
call of ldconfig)?

I think you are on the right path. I later found an Apple article online
that answered essentially my question saying libreadline wasn't included on
the Apple Python distribution the OP was asking about. I now notice this in
the output of configure:

checking for rl_pre_input_hook in -lreadline... no
checking for rl_completion_matches in -lreadline... no
My system has /lib/libreadline.so.4.3. I guess it does not define
these newer functions and so that is why the readline module was not
configured in Setup to start with? That is the presumption I am working on.

So I downloaded & built libreadline version 5.0. I have libreadline.a
and shlib/libreadline.so.5.0 files. Having done Python & other scripting
languages for a while, I have sort of forgotten all the ugly details about C
compilation. I'm trying to figure out how to get Python2.3.4. statically
linked with the .a file and not muck with the system shared libraries and
let other applications fend for themselves. Any advice on how to statically
link in this library so the Python build is happy?

Thanks,
-ej

----- Original Message -----
From: "Peter Maas" <pe***@somewhere.com>
Newsgroups: comp.lang.python
Sent: Wednesday, January 26, 2005 3:22 AM
Subject: Re: building Python: up arrow broken on SuSE Linux 8.2

Erik Johnson schrieb:
I am trying to upgrade my Python installation. After downloading
sources and building Python 2.3.4, I am unable to use the command
history editing feature in the interactive interpreter (where the
up-arrow would previously give you the last command line to edit,
it now just prints "^[[A".)

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------

Jul 18 '05 #3

"Erik Johnson" <sp**@nospam.org> wrote in message
news:41******@nntp.zianet.com...
So I downloaded & built libreadline version 5.0. I have libreadline.a
and shlib/libreadline.so.5.0 files. Having done Python & other scripting
languages for a while, I have sort of forgotten all the ugly details about C compilation. I'm trying to figure out how to get Python2.3.4. statically
linked with the .a file and not muck with the system shared libraries and
let other applications fend for themselves. Any advice on how to statically link in this library so the Python build is happy?


What I thought might be obvious and easy does not work, BTW...
In the Modules/Setup file I put this...

readline
readline.c -I/home/ej/readline-5.0 -L/home/ej/readline-5.0 -lreadline

re-ran configure and tried the make again. No joy. :(
Now I remember why I ended up using things like Perl & Python in the first
place...
ej@sand:~/Python-2.3.4> make
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototyp
es -I. -I./Include -DPy_BUILD_CORE -o Modules/config.o Modules/config.c
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototyp
es -I. -I./Include -DPy_BUILD_CORE -DPYTHONPATH='":plat-linux2:lib-tk"' \
-DPREFIX='"/usr/local"' \
-DEXEC_PREFIX='"/usr/local"' \
-DVERSION='"2.3"' \
-DVPATH='""' \
-o Modules/getpath.o ./Modules/getpath.c
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-I. -I./Include -DPy_BUILD_CORE -I/home/ej/readline-5.0 -c
../Modules/readline.c -o Modules/readline.o
Modules/readline.c:26:31: readline/readline.h: No such file or directory
Modules/readline.c:27:30: readline/history.h: No such file or directory
Modules/readline.c: In function `parse_and_bind':
Modules/readline.c:49: warning: implicit declaration of function
`rl_parse_and_bind'
Modules/readline.c: In function `read_init_file':
Modules/readline.c:68: warning: implicit declaration of function
`rl_read_init_file'
Modules/readline.c: In function `read_history_file':
Modules/readline.c:89: warning: implicit declaration of function
`read_history'
Modules/readline.c: In function `write_history_file':
Modules/readline.c:111: warning: implicit declaration of function
`write_history'
Modules/readline.c:113: warning: implicit declaration of function
`history_truncate_file'
Modules/readline.c: In function `set_completer_delims':
Modules/readline.c:287: error: `rl_completer_word_break_characters'
undeclared (first use in this function)
Modules/readline.c:287: error: (Each undeclared identifier is reported only
once
Modules/readline.c:287: error: for each function it appears in.)


Jul 18 '05 #4
Erik Johnson wrote:
the Apple Python distribution the OP was asking about.**I*now*notice*this
in the output of configure:

checking for rl_pre_input_hook in -lreadline... no
checking for rl_completion_matches in -lreadline... no
My*system*has*/lib/libreadline.so.4.3.***I*guess*it*does*not*define
these newer functions and so that is why the readline module was not
configured in Setup to start with? That is the presumption I am working
on.


Have you ensured (with yast) that readline-devel is actually installed?

Peter
Jul 18 '05 #5

"Peter Otten" <__*******@web.de> wrote...
Have you ensured (with yast) that readline-devel is actually installed?


I had not previously, but (not surprisingly) version 4.3 is installed. :)

Good idea - I thought maybe I would be able to do an online update (YOU)
to it, but it is taking forever to get a patch list. I don't understand it,
we have a pretty decent internet connection (DSL).

I now have the readline version 5.0 library built locally. Can someone
give me some clues about how to get it statically linked?

Thanks,
-ej
Jul 18 '05 #6
Erik Johnson wrote:
Have you ensured (with yast) that readline-devel is actually installed?


I had not previously, but (not surprisingly) version 4.3 is installed. :)


According to http://cnswww.cns.cwru.edu/php/chet/readline/CHANGES the
features you missed were introduced in readline 4.0 and 4.2, so version 4.3
should be sufficient. So let me ask you again, you have both the readline
and the readline-devel package installed? If yes, and configure still
complains, it may be time to look for something entirely different...

Peter

Jul 18 '05 #7
----- Original Message -----
From: "Peter Otten" <__*******@web.de>
According to http://cnswww.cns.cwru.edu/php/chet/readline/CHANGES the
features you missed were introduced in readline 4.0 and 4.2, so version 4.3 should be sufficient. So let me ask you again, you have both the readline
and the readline-devel package installed? If yes, and configure still
complains, it may be time to look for something entirely different...

Sorry! Sorry! I made a mistake - I went and checked whether readline was
installed and not readline-devel.
I installed readline-devel. (Thank you for re-asking that question.)

Interestingly, configure *still* says...
ej@sand:~/Python-2.3.4> ./configure | grep readline
checking for rl_pre_input_hook in -lreadline... no
checking for rl_completion_matches in -lreadline... no

And the readline module is still not configured by default:
#readline readline.c -lreadline -ltermcap
But... if I change the line (in Modules/Setup) above to:
readline readline.c -lreadline

I get a clean compile and my up-arrow is now fixed!
Thank you so much for your help, Peter! :)

I don't know how to look at what is in a .so file, and I'm not clear on
whether /usr/lib/libreadline.a and the /usr/include/readline headers existed
prior to installing readline-devel or not (I would guess not), but it would
seem that version 4.3 definitely *should* be sufficient (as you pointed
out).
ej@sand:/usr/lib> ls *readline*
libguilereadline-v-12.a libguilereadline-v-12.so.12 libreadline.so
libguilereadline-v-12.la libguilereadline-v-12.so.12.3.0
libguilereadline-v-12.so libreadline.a
ej@sand:/usr/lib> nm libreadline.a | grep letion_match
000008d0 t gen_completion_matches
00001c60 T rl_completion_matches
00000070 T completion_matches
U rl_completion_matches
ej@sand:/usr/lib> nm libreadline.a | grep input_hook
00000030 B rl_pre_input_hook
ej@sand:/usr/lib> cd /usr/include/readline/
ej@sand:/usr/include/readline> ls
chardefs.h keymaps.h rlconf.h rltypedefs.h
history.h readline.h rlstdc.h tilde.h
ej@sand:/usr/include/readline> grep input_hook *
readline.h:extern rl_hook_func_t *rl_pre_input_hook;
ej@sand:/usr/include/readline> grep rl_completion_matches *
readline.h:extern char **rl_completion_matches PARAMS((const char *,
rl_compentry_func_t *));

So, there still seems to be a misbehaviour in the configure script. I'm
sure there must be other people on similar systems that would like to just
type:
../configure
make
make install

and be done with it, running v2.3.4 (or other?) with command line editing
working!
Looks like a bug worth reporting, yeah?

Thanks again for your help! :)
Jul 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Douglass Turner | last post by:
Hello, I'm trying to install a statistics package called RSPython that requires a python shared library to be present on my SuSE 8.1 linux box. My python is provide as an RPM package and as far...
0
by: Jim Williams | last post by:
I am not able to get MYSQL running on Suse Linux Enterprise Server. I tried stopping with the command mysqld and it reported, "Shtudown Complete." Then when I tried to restart it with the...
12
by: Claudio Grondi | last post by:
I have just discovered the existance of Puppy Linux which is a complete operating system with a suite of GUI apps, only about 50 - 60M booting directly off the CDROM ( http://www.puppylinux.org...
1
by: Justin Johnson | last post by:
Hello, I'm trying to build Python 2.5.0 on AIX 5.3 using IBM's compiler (VisualAge C++ Professional / C for AIX Compiler, Version 6). I run configure and make, but makes fails with undefined...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 421 open ( -2) / 3549 closed (+10) / 3970 total ( +8) Bugs : 943 open (-17) / 6471 closed (+25) / 7414 total ( +8) RFE : 260 open...
2
by: enquiring mind | last post by:
-learning python with limited knowledge of linux. -get error msg 21 "file or directory does not exist" -running Suse linux 10. -haven't had a problem before - rebooted several times. -python...
3
by: Mathias Waack | last post by:
After switching my development environment to 64 bit I've got a problem with a python extension for a 32 bit application. Compiling the app under Linux results in the following error: g++ -m32...
6
by: Wiseman | last post by:
Hi, The line: import enchant works perfectly OK when I call a Python progrma (sp.py) from IDLE (WInXP). When I try to run it ftom the command line (python sp.py) the response is:
2
by: Atul | last post by:
Hi, The snippet : entryFontDescr = Entry() print self.entryFontDescr On Windows XP it displays {MS Sans Serif} 8
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.