473,594 Members | 2,768 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:112 5: warning: comparison between signed and unsigned
Objects/intobject.c:113 5: 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_code cs test_gdbm test_gl
test_imgfile test_linuxaudio dev test_macfs test_macostools
test_nis test_normalizat ion test_ossaudiode v test_pep277
test_plistlib test_scriptpack ages test_socket_ssl
test_socketserv er test_sunaudiode v 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 2413
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 'cGV0ZXIubWFhc0 BtcGx1c3IuZGU=\ n'.decode('base 64')
-------------------------------------------------------------------
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_ho ok in -lreadline... no
checking for rl_completion_m atches 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***@somewher e.com>
Newsgroups: comp.lang.pytho n
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 'cGV0ZXIubWFhc0 BtcGx1c3IuZGU=\ n'.decode('base 64')
-------------------------------------------------------------------

Jul 18 '05 #3

"Erik Johnson" <sp**@nospam.or g> wrote in message
news:41******@n ntp.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:3 1: readline/readline.h: No such file or directory
Modules/readline.c:27:3 0: 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_b ind'
Modules/readline.c: In function `read_init_file ':
Modules/readline.c:68: warning: implicit declaration of function
`rl_read_init_f ile'
Modules/readline.c: In function `read_history_f ile':
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_trunca te_file'
Modules/readline.c: In function `set_completer_ delims':
Modules/readline.c:287: error: `rl_completer_w ord_break_chara cters'
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*n otice*this
in the output of configure:

checking for rl_pre_input_ho ok in -lreadline... no
checking for rl_completion_m atches in -lreadline... no
My*system*has*/lib/libreadline.so. 4.3.***I*guess* it*does*not*def ine
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_ho ok in -lreadline... no
checking for rl_completion_m atches 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*
libguilereadlin e-v-12.a libguilereadlin e-v-12.so.12 libreadline.so
libguilereadlin e-v-12.la libguilereadlin e-v-12.so.12.3.0
libguilereadlin e-v-12.so libreadline.a
ej@sand:/usr/lib> nm libreadline.a | grep letion_match
000008d0 t gen_completion_ matches
00001c60 T rl_completion_m atches
00000070 T completion_matc hes
U rl_completion_m atches
ej@sand:/usr/lib> nm libreadline.a | grep input_hook
00000030 B rl_pre_input_ho ok
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:exte rn rl_hook_func_t *rl_pre_input_h ook;
ej@sand:/usr/include/readline> grep rl_completion_m atches *
readline.h:exte rn char **rl_completion _matches PARAMS((const char *,
rl_compentry_fu nc_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
4382
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 as I can tell there is no libpython.a or libpython.so. What gives? How do I get these libraries on my machine? Thank you,
0
1908
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 command, "mysqld –user=root" I get the response "mysql.host" doesn't exist. If I try "mysqld – user=mysql", I get numerous errors. I installed Suse Linux Enterprise Server 8 from CDROM and included all options. I saw the MYSQL is part of the...
12
3316
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 ). This approach appears to me very Pythonic, so it were a nice thing to have a full featured Puppy Linux Live CD prepared for Python programming. Have someone already breed a Python Puppy and is so kind to share a copy of it with me?
1
4901
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 symbols. See the output from configure and make below. svnadm /svn/build/python-2.5.0>env CC=cc CXX=xlC ./configure --prefix=$base_dir \ checking MACHDEP... aix5
0
324
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) / 250 closed ( +1) / 510 total ( +3) New / Reopened Patches ______________________
2
3458
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 opened in shell/terminal program Konsole window like this user1@linux!~ - shell - Konsole Sessions View Bookmark Settings Help -first line in window gives me a linux prompt:
3
3018
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 -Wall -g -O2 -I. -Idb -DPYTHON=25 -o mappy.o -c mappy.cpp In file included from /usr/include/python2.5/Python.h:57, from mappy.cpp:29: /usr/include/python2.5/pyport.h:732:2: error: #error "LONG_BIT definition appears wrong for platform (bad...
6
3966
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
1985
by: Atul | last post by:
Hi, The snippet : entryFontDescr = Entry() print self.entryFontDescr On Windows XP it displays {MS Sans Serif} 8
0
7936
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8241
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7997
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
5738
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3853
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3893
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.